Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ref-search button display #1325

Merged
merged 1 commit into from
Apr 26, 2020
Merged

Fix ref-search button display #1325

merged 1 commit into from
Apr 26, 2020

Conversation

Hirse
Copy link
Contributor

@Hirse Hirse commented Apr 26, 2020

Fix what @jung-kim intended to fix in #1311, but got lost in the whitespace-refactor:
Only show search button if there are hidden refs.

It was included in the first commit of that PR, but subsequently lost:

<!-- ko if: refs().length > ungit.config.numRefsToShow -->


Also fixes an issue with the selection of tags and branches to display:
For numRefsToShow = 5, numBranchesToShow = 3, and numTagsToShow = 2,
only enforce the branch and tag numbers if the total number of refs exceeds the limit.
Examples:

  • 3 branches and 2 tags -> 3 branches and 2 tags
  • 5 branches and 1 tag -> 4 branches and 1 tag
  • 5 branches and 2 tags -> 3 branches and 2 tags
  • 2 branches and 5 tags -> 2 branches and 3 tags
    (Previously, the tag limit would have been enforced in this case leading to only 2 tags being displayed, and with the search button change, the 3. tag being not discoverable.)

@campersau campersau merged commit cbb9895 into FredrikNoren:master Apr 26, 2020
@Hirse Hirse deleted the too-many-refs branch April 26, 2020 20:43
@campersau campersau mentioned this pull request May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants