Closed jamestalmage closed 8 years ago
I can work on this a little later on. In my latest PR ( #40 ) , I moved the toggle button to the top ( #37 ), and set the dimming as an un-configurable default ( #38 ) , and with the forced-dimming, the UI now begs for the dotfiles files to be grouped together, so I see this request as a natural extension of the work going on in PR #40.
My first instinct is to make copies of each dotfile table row and append them to the top of the files table, and either delete or hide the copied table row from view.
The problem is that this "reorganizing" feature means slow DOM manipulation and a noticeable delay in the initial shifting/hiding of the files, which could be a little annoying. So does anyone have advice/optimizations in mind to make something like this run smoothly?
We are going to default to hidden, right? So when they first show up we are hiding them. Which seems pretty fast. So hide them first, then move them around
That is a good idea for the initial loading, but if you have toggled to show the dotfiles, and then you browse away from the files table (like clicking on the Issues tab, or clicking into a directory, and then clicking back to the Code tab or root file menu), there will certainly be a visible "jump" as the files re-order themselves. But people will probably forgive us for that, I just wanted to make the re-shuffle as fast as possible.
Otherwise, I suppose we have the possibility to default to hidden always, meaning: if you toggle to show the files, then browse away from the root view, and back again, the files will be hidden again.
What do you think? Keep the toggled state and the "visible jump", or hide again on re-visit of the root file list?
I don't mind the "always hidden", since I will always know that the "show dotfiles" will just show the files again if I need them....
Oh. I didn't know you were saving state. I like that, but it shouldn't be for long, and it should be per repo. If I am looking at dotfiles, I'm only doing it for a few minutes, and I may indeed back out or .gitignore
into .npmignore
for some reason, so save state, but go back to hiding after... 5 minutes?
I think the visual reshuffling is fine in the saved state case.
FYI: I started working on this, and then my life changed (babies! diapers! yay!) 💩 👍 🎉 👶 🍼 ... so I might be a bit slow getting around to this...so if anyone else is itching to get this feature implemented, then they are free to take over! If not, I can return to this when I get a chance between feedings and diaper changes. haha.
I'd be interested in giving this a shot if that was cool?
@champagst , please do! Anyone is welcome to work on this. I started working on it, then suddenly my daughter was born, and I am running on zero sleep on top of all my deadlines.
💩 👍 🎉 👶 🍼
⛄ Thanks! Congrats on the kid! 🎉
The current ordering in the default GitHub listing is:
I think it would be great if reordered the list (when expanded), to:
Put together with #37 (moving the button to the top), this essentially makes the hide/show button like an expanding drawer.