-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Prevent flash of dropdown menu on labels list #30215
Conversation
IIRC, it is a must, otherwise the menu overflows on a wrong direction when the screen width is small. Could you check the git log? |
Only issue is that if you open the menu on desktop, then downsize, it will stay right-aligned and be partially outside the screen. |
Okay with these new classes, it stays hidden on page load and always opens left, regardless of screen size. |
Did a quick test, it seems that So I think it is ok to only keep |
The problem is |
IIRC it is used by Fomantic UI JS code to calculate the popup position. |
The https://fomantic-ui.com/modules/dropdown.html#menu-direction
Even thought I do prefer it to open to left, let's remove it for the sake of easier future migration off of it. |
A I see this is a CSS override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry it doesn't seem right by introducing these tw-
helpers.
Fomantic UI JS just calculate the position automatically. For example, when the screen width is small, the first popup menu should be left-aligned.
Added new CSS solution that will work in all these right-aligned headers. It looks better to always left-align in these imho. Fomantic is too dumb to correctly position itself. |
On the labels list, This `left` class caused the dropdown content to flash on page load until JS had hidden it. Remove it as I see no purpose to it. <img width="215" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/9e1de97f-dd89-41e0-9229-5c4a786ba762"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* giteaofficial/main: Remove fomantic input module (go-gitea#30194) Remove most jQuery function calls from the repository topic box (go-gitea#30191) Prevent flash of dropdown menu on labels list (go-gitea#30215) Remove jQuery class from the `repo-issue.js` file (go-gitea#30192) Ignore fomantic folder in linters (go-gitea#30200) Remove `modifies/frontend` from labeler (go-gitea#30198) Make a distinction between `active` and `selected` in the issue author dropdown (go-gitea#30207) Move and simplify tab-size helpers (go-gitea#30196) Fix markdown color code detection (go-gitea#30208)
Backport #30215 by @silverwind On the labels list, This `left` class caused the dropdown content to flash on page load until JS had hidden it. Remove it as I see no purpose to it. <img width="215" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/9e1de97f-dd89-41e0-9229-5c4a786ba762"> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Fixes #31273 (comment). Same method as used in #30215. All left-opening dropdowns need to use it method. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
Fixes go-gitea#31273 (comment). Same method as used in go-gitea#30215. All left-opening dropdowns need to use it method. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
On the labels list, This
left
class caused the dropdown content to flash on page load until JS had hidden it. Remove it as I see no purpose to it.