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

Prevent clone protocol button flash on page load #13626

Merged
merged 3 commits into from
Nov 26, 2020

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Nov 18, 2020

Screen Shot 2020-11-18 at 22 07 53

Previously, the saved active button would flash up on page load because of the inherent delay involved in JS execution which is required for this localStorage setting. Prevent these flashes by disabling transitions on page load on the buttons and run the script that activates the button right after.

It's not an ideal solution (which would require server-side storage of user settings like this) but I'd say better than before.

@6543 6543 added the topic/ui Change the appearance of the Gitea UI label Nov 18, 2020
Previously, the saved active buttons would flash on page load because if
delay involved in JS execution. Prevent these flashes bydisabling
transitions on page load and run the script right after. It's not an
ideal solution (which would require server-side storage of user
settings like this) but I'd say better than before.
@silverwind
Copy link
Member Author

Ready for review, it's not a pretty fix but it works pretty well and there is no real way around a inline script in this case unfortunately.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 26, 2020
@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 Nov 26, 2020
@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 Nov 26, 2020
@zeripath zeripath added this to the 1.14.0 milestone Nov 26, 2020
@lafriks lafriks merged commit 7bc0c8c into go-gitea:master Nov 26, 2020
@silverwind silverwind deleted the sshbox branch November 26, 2020 20:54
@go-gitea go-gitea locked and limited conversation to collaborators Jan 18, 2021
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. topic/ui Change the appearance of the Gitea UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants