sindresorhus/refined-github

Drop `hide-readme-header` feature #4157

kidonng posted onGitHub

<!-- If you find any related threads, link them here -->

<!-- Duplicate issues are ok, but they may be closed pretty quickly -->

GitHub is shipping new features like crazy! The latest feature is table of contents for README.

Well, not quite polished yet...

image


While hide-readme-header doesn't interfere with this feature, I see some reasons to drop it:

This is just to raise concern though, I don't think any action should be taken right now. Some other thoughts:

  • If it only works on repo home and for README only, can we extend it to support all Markdown files as well? It's true šŸŽ‰

That feature is great! Makes me wonder if we should drop collapse-markdown-sections instead.

posted by fregante about 4 years ago

I thought about it as well, but collapse-markdown-sections serves more purposes than a regular table of contents. For example you can take a screenshot with some sections folded to fit the content you want into a single screen.

posted by kidonng about 4 years ago

Maybe pull the button out to the left of the readme (assuming the viewport is wide enough)?

<img width="400" alt="Screenshot_2021-03-26 13 27 24" src="https://user-images.githubusercontent.com/25517624/112670256-0f8a4f00-8e37-11eb-8c0a-d714cc898613.png"><img width="300" alt="Screenshot_2021-03-26 13 29 38" src="https://user-images.githubusercontent.com/25517624/112670489-55dfae00-8e37-11eb-9218-90aea51e9156.png">

Rough CSS:

#readme > :first-child {
  height: 0;
  padding: 0 !important;
  border: none !important;
}
#readme > :first-child details {
  position: absolute;
  left: -4em;
  top: 1em;
}
posted by j-f1 about 4 years ago

Alternatively, the space could be used to display the current header (or header breadcrumbs)

posted by j-f1 about 4 years ago

For example you can take a screenshot with some sections folded to fit the content you want into a single screen.

Sounds niche and Iā€™m not convinced šŸ¤”

posted by fregante about 4 years ago

Maybe pull the button out to the left of the readme

Doesn't seem worth the hassle and now the header is better than when the feature was introduced:

  • 2 buttons
  • white background
  • fixed header

Maybe we could just reduce the padding to make it smaller:

padding: 4px 12px 4px 4px !important;
posted by fregante about 4 years ago

Just noticed the header title now points to #readme (I don't remember whether it's there before the table of contents), serving as a quick way to go to the top of the README.

posted by kidonng about 4 years ago

Semi-related: I wonder why this issue still exists šŸ¤” image

EDIT: turns out this is caused by Refined GitHub, but I haven't figured out why.

posted by kidonng almost 4 years ago

Likely due to sticky-sidebar

posted by fregante almost 4 years ago

The feature is expanded to all markup files. Sweet!

https://twitter.com/natfriedman/status/1382424314268372992

EDIT: :P never mind, guess everyone already knows it.

posted by kidonng almost 4 years ago

Fund this Issue

$0.00
Funded

Pull requests