Skip to content

Fix redundant dividers on search for labels #25303

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

Closed
wants to merge 10 commits into from

Conversation

HesterG
Copy link
Contributor

@HesterG HesterG commented Jun 16, 2023

Labels search dropdowns have redundant dividers when searching for labels

Screen Shot 2023-06-16 at 14 42 45

This PR adds data-divider-index and data-divider-group to dynamically toggle the visibility of dividers depending on filtered results. And slightly changed the logic for adding the divider if there are both Labels and OrgLabels exist.

After:

Untitled.mov

Locations of the dropdowns:

On sidebar of issue/pr, and on repo issue/pr list

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 16, 2023
@HesterG HesterG added the topic/ui Change the appearance of the Gitea UI label Jun 16, 2023
@lunny lunny added this to the 1.21.0 milestone Jun 16, 2023
@wxiaoguang
Copy link
Contributor

At first glance, it's quite hacky. I guess it's not the right way.

@silverwind
Copy link
Member

In the video, the extra dividers are still seen while typing, so yes I think the solution can't be right.

@silverwind
Copy link
Member

silverwind commented Jun 16, 2023

BTW, I generally think we should rewrite these labels dropdown to a format similar to GitHub:

image

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jun 16, 2023

Actually, Fomantic UI does very well for "hiding dividers".

We only needs 2 lines:

  $dropdownLabelFilter.dropdown('setting', {'hideDividers': 'empty'});
  $dropdownLabelFilter.dropdown('refreshItems');

@HesterG
Copy link
Contributor Author

HesterG commented Jun 19, 2023

Actually, Fomantic UI does very well for "hiding dividers".

We only needs 2 lines:

  $dropdownLabelFilter.dropdown('setting', {'hideDividers': 'empty'});
  $dropdownLabelFilter.dropdown('refreshItems');

That's great, I will close this.

@HesterG HesterG closed this Jun 19, 2023
@HesterG HesterG deleted the fix-duplicate-divider branch June 19, 2023 00:54
@GiteaBot GiteaBot removed this from the 1.21.0 milestone Jun 19, 2023
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Sep 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. topic/ui Change the appearance of the Gitea UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants