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

Add toasts to UI #25449

Merged
merged 32 commits into from Jun 27, 2023
Merged

Add toasts to UI #25449

merged 32 commits into from Jun 27, 2023

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Jun 22, 2023

Fixes #24353

Screenshot 2023-06-22 at 20 29 22

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 22, 2023
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 22, 2023
@silverwind silverwind added type/enhancement An improvement of existing functionality topic/ui Change the appearance of the Gitea UI labels Jun 22, 2023
Copy link
Member

@delvh delvh left a comment

Choose a reason for hiding this comment

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

Apart from that LGTM

@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 Jun 22, 2023
@silverwind
Copy link
Member Author

silverwind commented Jun 22, 2023

Warning added in 1b8e9d8:

Screenshot 2023-06-22 at 23 06 00

@silverwind
Copy link
Member Author

silverwind commented Jun 22, 2023

@delvh do you think it's fine to have the warning toast persist until dismissed? We could also hide it after like 10s, but I guess overall the duration may need to be customized by the caller anyways depending on use case.

@delvh
Copy link
Member

delvh commented Jun 22, 2023

I guess it's fine.
After all, if it is a warning like I detailed above, the user should acknowledge that they read the warning before removing it.

.eslintrc.yaml Outdated Show resolved Hide resolved
@wxiaoguang
Copy link
Contributor

How about reusing the flash warning? Looks like they are conflicted.

I think toast is better than the flash because it is a overlay that can not be missed so easily. We might even want to devise a mechanism that converts the current flashes to toasts.

Yes, toast is a must, especially there are many "fetch" requests. And, the backend Flash mechanism are just buggy and abused in many cases.

@silverwind silverwind marked this pull request as draft June 25, 2023 22:28
@silverwind silverwind marked this pull request as ready for review June 26, 2023 18:14
@silverwind
Copy link
Member Author

Ready again, now devtest has a separate chunk that is only built in development.

@6543 6543 added this to the 1.21.0 milestone Jun 26, 2023
@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 Jun 27, 2023
@6543 6543 enabled auto-merge (squash) June 27, 2023 02:18
@6543 6543 added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jun 27, 2023
@6543 6543 merged commit c71e8ab into go-gitea:main Jun 27, 2023
23 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jun 27, 2023
@silverwind silverwind deleted the toast branch June 27, 2023 08:34
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Sep 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. topic/ui Change the appearance of the Gitea UI type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Toast display for UI
6 participants