benawad / destiny

Prettier for File Structures
MIT License
3.53k stars 80 forks source link

Feature request - Allow placing files being fractalized _inside_ the folder #170

Open cheapsteak opened 3 years ago

cheapsteak commented 3 years ago

Was ecstatic that this project exists

Then crestfallen to find it follows that hackernoon article's interpretation of "fractal"

Would hugely appreciate an option to configure the rules to be a truer fractal

Since folders are displayed first in their own group, there's a problem where you have to scroll up and down and up and down between a file and its folder as a project scales horizontally to have more things

/src
   /[...]/
   /[...]/
   /[...]/
   ...
   /[...]/
   /[...]/
   /someComponent
   /someOtherComponent
  [....tsx]
  [....tsx]
  [....tsx]
  ...
  [....tsx]
  [....tsx]
  SomeComponent.tsx
  SomeOtherComponent.tsx

When I'm working in the region of SomeComponent.tsx, I would like to be able to zoom in to just SomeComponent.tsx and its dependency files without having to scroll past all of its siblings and its siblings dependencies

Consider also the case of storybooks and tests

Having the file being fractalized inside the folder and next to its storybook and tests imo makes so much more sense

/src
   /[...]/
   /[...]/
   /[...]/
   /[...]/
   /[...]/
   /someComponent
      SomeComponent.tsx
      SomeComponent.story.tsx
      SomeComponent.test.tsx
  [....tsx]
  [....tsx]
  [....tsx]
  [....tsx]
  [....tsx]

compared to

/src
   /[...]/
   /[...]/
   /[...]/
   /[...]/
   /[...]/
   /someComponent
      SomeComponent.story.tsx
      SomeComponent.test.tsx
  [....tsx]
  [....tsx]
  [....tsx]
  [....tsx]
  [....tsx]
  SomeComponent.tsx

This might be the "semicolon" of automated folder structures; perspectives will certainly vary, but imo allowing this to be an option that can be set would make it truly be the prettier (rather than the standardjs) for folder structures

(Thanks for bearing with my rant 🙏 )