Currently the toggle-file-button feature is not extremely useful, as it basically gets you to the readme quicker, and that's it. Ever since a new link popped up on the right side of the page, it might make sense to remove this feature as mentioned in #3580 and #3587.
But I think it would be very nice to keep this feature, and to give more usefulness by making it persist during navigation -- meaning if the file list is toggled off, it will be off when reloading or navigating to a different repo page.
I seldom browse the repo files directly on GitHub, so having the list hidden by default would save quite a bit of scrolling (and yes I do know and use "Hide Files on GitHub", but it doesn't really help with this kind of repo for example).
Feature checklist:
init() but it creates some annoying jitter on page load)I'm willing to try implementing this if you accept it as a valid feature request.
Thank you for maintaining and improving this indispensable extension! 馃憤
This feature already persists across pages, did you encounter a bug?
That said, I support your point. This feature may not be useful on the repo's home page, but it does in other pages. For example, Telegraf.js has a standalone docs website, but it uses docute and initial loading takes a long time, so I go to see the source instead, where toggle-files-button makes it easy to hide the files section so I can concentrate on the docs. Yeah I know I can click the file to achieve the same effect, but toggle-files-button is more convenient.
In a word, I'm not in favor of dropping this feature.
@cheap-glitch thank you for the detailed and clear issue!
I agree, the reason we wanted to drop the feature was due to the Readme link already existing. However even that, only exists on the root of the repository.
This feature already persists across pages, did you encounter a bug?
Really? That's news to me! I've been using RG on Firefox for quite a while now, and it was never persistent -- even before the big redesign of the repo page.
Should I change the template into a bug report?
This feature already persists across pages, did you encounter a bug?
Hey @kidonng, I don't think this feature is persistent across pages. Just tried it on Firefox, and checked https://github.com/sindresorhus/refined-github/blob/master/source/features/toggle-files-button.tsx, couldn't find anything that handles persistence.
However even that, only exists on the root of the repository.
@yakov116 Yup, we should not drop this feature. /cc @fregante on https://github.com/sindresorhus/refined-github/issues/3580#issuecomment-696236432
I agree, the reason we wanted to drop the feature was due to the Readme link already existing. However even that, only exists on the root of the repository.
Good point, let's not drop the feature for this reason.
I think we can apply this suggestion.
elementReady: https://github.com/sindresorhus/refined-github/issues/2671
Most helpful comment
Good point, let's not drop the feature for this reason.