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

Improve "Reference in new issue" modal #30547

Merged
merged 5 commits into from
Apr 18, 2024
Merged

Conversation

silverwind
Copy link
Member

Fixes: #29994

Also some misc enhancements done to the form in the modal.

Screenshot 2024-04-17 at 23 02 55

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 17, 2024
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 17, 2024
@github-actions github-actions bot added the modifies/templates This PR modifies the template files label Apr 17, 2024
@silverwind silverwind added backport/v1.22 This PR should be backported to Gitea 1.22 and removed modifies/templates This PR modifies the template files labels Apr 17, 2024
@pull-request-size pull-request-size bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 17, 2024
@github-actions github-actions bot added the modifies/templates This PR modifies the template files label Apr 17, 2024
@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 Apr 17, 2024
@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 Apr 17, 2024
@silverwind
Copy link
Member Author

Selection state also fixed:

Screenshot 2024-04-17 at 23 09 23

.ui.search.dropdown > .text {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why only "search dropdown" has these styles, but all ".ui.dropdown .menu > .item" also have "text-overflow: ellipsis" ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure if that's the best selector but it was one of the matching ones in this case. The classname on it is certainly some kind of abuse ui search normal selection dropdown.

Copy link
Member Author

Choose a reason for hiding this comment

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

I removed the search class from the selector, but would not do any more change to this currently. Actually I'm not sure I understand the question.

Copy link
Contributor

@wxiaoguang wxiaoguang Apr 21, 2024

Choose a reason for hiding this comment

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

OK, I think the problem is clear now. We can't "overflow: hidden" to any general "dropdown" selector.

Because even .ui.selection or .ui.search it might contain images like avatars.

The dropdown was not designed to work this way.

Ref: Broken avatar css on main page #30624

image

@silverwind silverwind added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 18, 2024
@silverwind silverwind enabled auto-merge (squash) April 18, 2024 19:10
@silverwind silverwind merged commit dd8e6ae into go-gitea:main Apr 18, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.23.0 milestone Apr 18, 2024
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 18, 2024
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Apr 18, 2024
Fixes: go-gitea#29994

Also some misc enhancements done to the form in the modal.

<img width="840" alt="Screenshot 2024-04-17 at 23 02 55"
src="https://github.com/go-gitea/gitea/assets/115237/e71fba55-55cd-4e48-a497-6b1025c36a43">
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label Apr 18, 2024
silverwind added a commit that referenced this pull request Apr 18, 2024
Backport #30547 by @silverwind

Fixes: #29994

Also some misc enhancements done to the form in the modal.

<img width="840" alt="Screenshot 2024-04-17 at 23 02 55"
src="https://github.com/go-gitea/gitea/assets/115237/e71fba55-55cd-4e48-a497-6b1025c36a43">

Co-authored-by: silverwind <me@silverwind.io>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Apr 19, 2024
* giteaofficial/main:
  [skip ci] Updated translations via Crowdin
  Mock queue backoff duration (go-gitea#30553)
  Improve "Reference in new issue" modal (go-gitea#30547)
  Add a few root files to lint-spell (go-gitea#30530)
  Refactor and fix archive link bug (go-gitea#30535)
  Fixup app.example.ini for task section, which is now queue.task (go-gitea#30555)
  Some following up changes for routes (go-gitea#30550)
  Add form field id generation, remove duplicated ids (go-gitea#30546)
  Fix border-radius on view, blame and code search (go-gitea#30545)
  Disable enter key for accepting code completion in Monaco (go-gitea#30548)
@silverwind silverwind deleted the refnew branch April 21, 2024 20:03
silverwind pushed a commit that referenced this pull request Apr 21, 2024
Follow
#30547 (comment)

Fix #30624

The Fomantic UI Dropdown wasn't designed to work that way, its "text"
element might contain images. So the "overflow" shouldn't be added to
any general dropdown text.


![image](https://github.com/go-gitea/gitea/assets/2114189/f6ceaabd-bc89-4bf2-baa2-a6f0324c1962)
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Apr 21, 2024
Follow
go-gitea#30547 (comment)

Fix go-gitea#30624

The Fomantic UI Dropdown wasn't designed to work that way, its "text"
element might contain images. So the "overflow" shouldn't be added to
any general dropdown text.


![image](https://github.com/go-gitea/gitea/assets/2114189/f6ceaabd-bc89-4bf2-baa2-a6f0324c1962)
lunny pushed a commit that referenced this pull request Apr 22, 2024
Backport #30628 by @wxiaoguang

Follow
#30547 (comment)

Fix #30624

The Fomantic UI Dropdown wasn't designed to work that way, its "text"
element might contain images. So the "overflow" shouldn't be added to
any general dropdown text.


![image](https://github.com/go-gitea/gitea/assets/2114189/f6ceaabd-bc89-4bf2-baa2-a6f0324c1962)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
DennisRasey pushed a commit to DennisRasey/forgejo that referenced this pull request Apr 22, 2024
Follow
go-gitea/gitea#30547 (comment)

Fix #30624

The Fomantic UI Dropdown wasn't designed to work that way, its "text"
element might contain images. So the "overflow" shouldn't be added to
any general dropdown text.

![image](https://github.com/go-gitea/gitea/assets/2114189/f6ceaabd-bc89-4bf2-baa2-a6f0324c1962)

(cherry picked from commit 1e4867730b261352d63098b85cf53ca05867c8c2)
(cherry picked from commit 112df5a)
DennisRasey pushed a commit to DennisRasey/forgejo that referenced this pull request Apr 22, 2024
Follow
go-gitea/gitea#30547 (comment)

Fix #30624

The Fomantic UI Dropdown wasn't designed to work that way, its "text"
element might contain images. So the "overflow" shouldn't be added to
any general dropdown text.

![image](https://github.com/go-gitea/gitea/assets/2114189/f6ceaabd-bc89-4bf2-baa2-a6f0324c1962)

(cherry picked from commit 1e4867730b261352d63098b85cf53ca05867c8c2)
uli-heller pushed a commit to uli-heller/forgejo that referenced this pull request Apr 24, 2024
Follow
go-gitea/gitea#30547 (comment)

Fix #30624

The Fomantic UI Dropdown wasn't designed to work that way, its "text"
element might contain images. So the "overflow" shouldn't be added to
any general dropdown text.

![image](https://github.com/go-gitea/gitea/assets/2114189/f6ceaabd-bc89-4bf2-baa2-a6f0324c1962)

(cherry picked from commit 1e4867730b261352d63098b85cf53ca05867c8c2)
(cherry picked from commit 112df5a)
@wxiaoguang wxiaoguang added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Apr 27, 2024
@wxiaoguang
Copy link
Contributor

-> Fix some UI problems (dropdown/container) #30849

wxiaoguang added a commit that referenced this pull request May 6, 2024
Follow #30345
Follow #30547

`ellipsis` / `white-space` shouldn't be put on the general dropdown components.
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request May 6, 2024
Follow go-gitea#30345
Follow go-gitea#30547

`ellipsis` / `white-space` shouldn't be put on the general dropdown components.
wxiaoguang added a commit that referenced this pull request May 6, 2024
Backport #30849 by wxiaoguang

Follow #30345
Follow #30547

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jul 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created backport/v1.22 This PR should be backported to Gitea 1.22 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/templates This PR modifies the template files size/M Denotes a PR that changes 30-99 lines, ignoring generated 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.

Wrong UI when repo name too long in Reference in new issue
5 participants