Skip to content

Fix dropdown delegating and some UI problems #34014

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

Merged
merged 5 commits into from
Mar 26, 2025

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Mar 25, 2025

The old logic is incomplete. See the comment for the improved logic.

Fix #34011

And more fixes:

  1. use empty "alt" for images, otherwise the width is not right when the image fails to load
  2. remove the "dropdown icon" patch, because it has been clearly done in "dropdown.js" now
  3. remove the "dropdown filtered item" patch, added a clear callback, and improve the logic
  4. fix global init when a node is removed and added back gain (eg: the "cherry pick" dialog with a dropdown)

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 25, 2025
@wxiaoguang
Copy link
Contributor Author

Before:

image

After:

image

@wxiaoguang wxiaoguang added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Mar 25, 2025
@wxiaoguang wxiaoguang added this to the 1.24.0 milestone Mar 25, 2025
@silverwind
Copy link
Member

Shouldn't it show one border in that example?

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 25, 2025
@wxiaoguang
Copy link
Contributor Author

Shouldn't it show one border in that example?

This PR only make the old "delegating" logic work again.

The "divider" problem is another one, not related to the "delegating"

@pull-request-size pull-request-size bot added size/M and removed size/S labels Mar 26, 2025
@github-actions github-actions bot added modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files labels Mar 26, 2025
@@ -1,6 +1,6 @@
{{$avatarLink := (.RelAvatarLink ctx)}}
{{if $avatarLink}}
<img class="ui avatar tw-align-middle" src="{{$avatarLink}}" width="24" height="24" alt="{{.FullName}}">
<img class="ui avatar tw-align-middle" src="{{$avatarLink}}" width="24" height="24" alt="" aria-hidden="true">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was not null, so why did you change it? This should not affect the width.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tried it?

image

@pull-request-size pull-request-size bot added size/L and removed size/M labels Mar 26, 2025
@wxiaoguang
Copy link
Contributor Author

wxiaoguang commented Mar 26, 2025

Shouldn't it show one border in that example?

This PR only make the old "delegating" logic work again.

The "divider" problem is another one, not related to the "delegating"

Made some more changes, now the "divider" behavior should be almost perfect:

Screenshots

image

image

image

@wxiaoguang wxiaoguang changed the title Fix dropdown delegating Fix dropdown delegating and some UI problems Mar 26, 2025
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 26, 2025
@wxiaoguang wxiaoguang enabled auto-merge (squash) March 26, 2025 02:28
@wxiaoguang wxiaoguang merged commit d28a7f9 into go-gitea:main Mar 26, 2025
26 checks passed
@wxiaoguang wxiaoguang deleted the fix-dropdown branch March 26, 2025 02:53
wxiaoguang added a commit that referenced this pull request Mar 26, 2025
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 27, 2025
* giteaofficial/main:
  [skip ci] Updated translations via Crowdin
  Download actions job logs from API (go-gitea#33858)
  Fail mirroring more gracefully (go-gitea#34002)
  Fix dropdown module accessing (go-gitea#34026)
  Polyfill WeakRef (go-gitea#34025)
  Fix dropdown delegating and some UI problems (go-gitea#34014)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Archived labels visual bug returned
5 participants