Comments (2)
Not sure if it's too late to give my feedback and initial thoughts since I see a PR that mentioned this issue got merged into master
....
Thoughts about formatDirName()
Should the formatDirName()
func rewrite take the length of the comment into account? In other words, should
const spacing = `${' '.repeat(output.length - maxCharLengthOfLevel)} `;
be changed to
const spacing = `${' '.repeat(maxCharLengthOfLevel - (output.length + comment.length))} `;
?
Also, I think that naming a variable output
without it actually being the variable that the function ultimately returns is confusing. Perhaps consider renaming the output
variable to something like dirRelativeLink
or dirSection
?
Thoughts about the new Tree Core architecture, or Tree Gen structure
Are you proposing that a list of the following objects be maintained, one object for each line in the generated tree printout?
{
maxCharLengthOfLevel: number - Will help us calculate spacing for comments,
numberOfFoldersPerLevel: number,
numberOfFilesPerLevel: number,
}
What are your plans for keeping the values in each of these objects consistent? For example, if there's only one line in the entire tree printout where the corresponding object's numberOfFoldersPerLevel
key equals, say, 3, and that line then gets deleted, will any of the values in the other objects need to be updated? In other words, is it possible for any updates or deletions of lines in the tree printout displayed on the page to knock your Tree Core data structure out of sync?
from 0.2.1-readme-dirs.
@nchaloult I will update the TreeCore and TreeGen architecture accordingly the cool part is that TreeGen doesn't need to be re-created on every single deletion :)
from 0.2.1-readme-dirs.
Related Issues (10)
- Write a more helpful README HOT 3
- Write logic to generate project structure HOT 1
- Build component to display the generated Markdown "tree printout" HOT 1
- Implement the agreed-upon design aesthetic HOT 1
- Include comments for common dirs in "tree printout" generation algorithm
- Missing Directory Support HOT 1
- Architecture for Tree Core HOT 4
- Architecture for DeleteQueue with Undo System HOT 2
- Unicode character for last item in directory
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 0.2.1-readme-dirs.