sindresorhus/refined-github

Change the `collapse-wiki-sections` trigger #4144

mathieucaroff posted onGitHub

Consider changing the collapsing behavior trigger to something else than the full title. I believe showing a collapse arrow to the left of the title on hover, next to the anchor icon would be a good idea. Like any other collapse arrow, it would have to change to horizontal direction when the section is collapsed.

Possibly, the arrow would stay visible when the title is collapse, so as to inform the user that some content is hidden.

Mildly related #4126

Thank you for making Refined Github


  • I temporarily disabled collapse-markdown-sections because it reacts when I click on the anchor symbol. A behavior hopefully solved by the above linked issue's closing pull request.
posted by mathieucaroff about 4 years ago
  • I realized the PR #4127 has a lot more discussions in it than the issue itself:

@fregante in https://github.com/sindresorhus/refined-github/issues/4127#issuecomment-803179552

Also I think we should add a cursor via CSS to show that clicking does something, probably:

.markdown-body :is(h1, …) {cursor: expand-y or whatever}
.markdown-body :is(a, details) :is(h1, …) {cursor: initial}

@kidonng in https://github.com/sindresorhus/refined-github/issues/4127#issuecomment-803193226

Indeed. Currently it doesn't give any visual clue what has happened if one triggers the feature without knowing it.

In fact, I only realized this feature is implemented after I accidentally triggered it 😅

posted by mathieucaroff about 4 years ago
  • I temporarily disabled collapse-markdown-sections because it reacts when I click on the anchor symbol. A behavior hopefully solved by the above linked issue's closing pull request.

Unfortunately I think we missed that in the mentioned PR.

I believe showing a collapse arrow to the left of the title on hover, next to the anchor icon would be a good idea.

Ideally we should do that (maybe like <details>), but since GitHub is already showing an anchor link for the titles, would an additional arrow looks weird?

posted by kidonng about 4 years ago

Buttons could be added to the left of the anchor button, to be shown on hover, only when the window is wide enough.

However this issue is something that being already taken care of by https://github.com/sindresorhus/refined-github/pull/4127, not yet released

posted by fregante about 4 years ago

Yes, a bit annoying behavior. I click sometimes in random places on the page to make window focused and often these clicks collapse sections :(

posted by deflock about 4 years ago

PR welcome to fix the 2 immediate issues:

  • cursor via CSS
  • don't toggle inside details

so we can release a new version today/tomorrow. We can think of an alternative trigger later

posted by fregante about 4 years ago

https://github.com/sindresorhus/refined-github/pull/4335: This feature will be disabled everywhere except on wikis in the next version (maybe 7-10 days away)

But this issue still applies to Wikis

posted by fregante almost 4 years ago

This feature has now been disabled. The hidden trigger is just confusing. Also it's not clear when a section is collapsed, so this feature needs to be rethought with a visible trigger button.

posted by fregante over 3 years ago

GitHub seems to have enhanced the wiki pages, pages in sidebar are now loaded via AJAX and gained table of contents:

Example: https://github.com/lukesampson/scoop/wiki

image

This may become a reason to just drop this feature, but the sidebar is not very convenient compared to it.

The wiki sidebar makes a good candidate for sticky-sidebar (and possibly related to https://github.com/sindresorhus/refined-github/issues/4664#issuecomment-898896739).

posted by kidonng over 3 years ago

Let's drop the feature, we did the same for the readme. You can open a new issue for a sticky wiki sidebar

posted by fregante over 3 years ago

I have modified #4664 to include https://github.com/sindresorhus/refined-github/issues/4144#issuecomment-902142687; I hope it is okay to mark #4690 as closing this one.

posted by shinenelson over 3 years ago

Fund this Issue

$0.00
Funded

Pull requests