Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Hide redundant 'Releases' section from repo sidebar - #3566

Merged
fregante merged 6 commits into
refined-github:masterfrom
shinenelson:remove-redundant-releases-section
Sep 19, 2020
Merged

fregante merged 6 commits into
refined-github:masterfrom
shinenelson:remove-redundant-releases-section

Conversation

@shinenelson

@shinenelson shinenelson commented Sep 16, 2020

Copy link
Copy Markdown
Contributor

The 'Releases' section in the 'Refreshed Repository' design sidebar is redundant when there is already the releases-tab.

This change removes the 'Releases' section from the sidebar.

I'm not sure whether this has been discussed before ( I did dig through some old issues, but could not find any ), but there is one direct link to the latest release that goes away with the section.

I usually find myself either navigating directly to /releases/latest or simply going to the main Releases page and referring to the latest release. I do not know if people use the latest release link as often. But the remaining information is already on the releases-tab.

  1. LINKED ISSUES:
    None

  2. TEST URLS:
    Any repository root page

  3. SCREENSHOT:

    Before :
    Screenshot_2020-09-17 sindresorhus refined-github

    After :
    Screenshot_2020-09-17 sindresorhus refined-github (1)

@shinenelson
shinenelson force-pushed the remove-redundant-releases-section branch from 4c49f97 to 95b80a5 Compare September 16, 2020 21:20
@fregante

Copy link
Copy Markdown
Member

The 'Releases' section in the 'Refreshed Repository' design sidebar is redundant

Is it? The Releases tab points to /releases while that section can point straight to the latest release at /releases/v2.3.4

However… /releases will most likely show the latest release first, so this may be right.

@shinenelson

Copy link
Copy Markdown
Contributor Author

The Releases tab points to /releases while that section can point straight to the latest release at /releases/v2.3.4

The section header and the '+ x releases' link at the bottom of the section, both point to /releases
whereas the tag that lists the latest release - that is the only one that points directly to the latest release. That is why I mentioned that that information might be lost. But I am doubtful how many people actually use that link to go the latest release. I think most people go to the release page and like you said

/releases will most likely show the latest release first

which is my case for the argument that the section is redundant

@fregante fregante changed the title remove redundant 'Releases' section from repo sidebar Remove redundant "Releases" section from repo sidebar Sep 16, 2020
@shinenelson
shinenelson force-pushed the remove-redundant-releases-section branch from 95b80a5 to b37b8bc Compare September 17, 2020 18:47
@shinenelson shinenelson changed the title Remove redundant "Releases" section from repo sidebar hide redundant 'Releases' section from repo sidebar Sep 17, 2020
@shinenelson shinenelson changed the title hide redundant 'Releases' section from repo sidebar Hide redundant 'Releases' section from repo sidebar Sep 17, 2020
@shinenelson
shinenelson force-pushed the remove-redundant-releases-section branch from b37b8bc to 3d01802 Compare September 17, 2020 18:51
@fregante

Copy link
Copy Markdown
Member

Why hide it instead of removing it?

@shinenelson

Copy link
Copy Markdown
Contributor Author

I was thinking in terms of when the sidebar becomes sticky ( #3349 ) and the view has scrolled down quite a bit. There, one would not have quick access to the Releases Tab and would prefer to see the Releases section in the sticky sidebar. At that point, if we wanted to re-activate the section, we would not be able to if the section was completely removed.

I was thinking for the future. Also, there maybe other features or ( even external extensions ) that query the DOM for the Releases section and not finding it would break them. After all, we are not removing an empty section without any content, we are removing a section that is seemingly redundant when the Releases Tab is in view. That information could still be useful when the Releases Tab is not in view.

@fregante

Copy link
Copy Markdown
Member

maybe other features or ( even external extensions ) that query the DOM for the Releases section and not finding it would break them

This is a good reason

would prefer to see the Releases section in the sticky sidebar

This is not. The sticky sidebar depends on the height, so we can't make it taller once it becomes sticky, because it would invalidate the calculation.

Comment thread source/features/releases-tab.tsx Outdated
Comment thread source/features/releases-tab.tsx Outdated
@fregante
fregante merged commit 175e48a into refined-github:master Sep 19, 2020
@fregante

Copy link
Copy Markdown
Member

🎉 🙌

@Geeyun-JY3

Geeyun-JY3 commented Sep 26, 2020

Copy link
Copy Markdown

I think this should be mentioned in the description of releases-tab feature.

@aried3r

aried3r commented Sep 29, 2020

Copy link
Copy Markdown

I think this should be mentioned in the description of releases-tab feature.

I agree, I wish this was behind a feature flag itself. I did use this more than I thought it would, to directly go to the latest release which often contains the release notes/change log (like this repo).

Is there any possibility this would get its own feature flag? I understand this is a heavily opinionated set of refinements so of course if there's no chance for that, I'll just disable releases-tab as a compromise. I'd also be happy to contribute :)

@yakov116

Copy link
Copy Markdown
Member

What if we merged https://github.com/sindresorhus/refined-github/blob/master/source/features/hide-empty-meta.tsx
With ⬆️ and 47a2849 into one feature of clean-repo-sidebar?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

5 participants