Skip to content

Hide command line instructions when merge form is visible #13956

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 3 commits into from
Dec 15, 2020

Conversation

CirnoT
Copy link
Contributor

@CirnoT CirnoT commented Dec 12, 2020

Hides element introduced by #13840 when merge form is visible.

Before:
chrome_2020-12-12_01-36-25

After:
chrome_2020-12-12_01-37-12
chrome_2020-12-12_01-37-42

@CirnoT
Copy link
Contributor Author

CirnoT commented Dec 12, 2020

This is done to avoid anchor link right below the button which looks bad and can cause mis-click/tap. There is no easy way to make the element flow inline when form is visible because the neighboring element must also be inline, which form is not (and can not be).

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 12, 2020
@CirnoT
Copy link
Contributor Author

CirnoT commented Dec 12, 2020

This is a draft because .dib applies !important which screws with dynamic hiding of element.

@silverwind any proposed solutions? I imagine this will crop up more and more as these helpers are being used.

@lunny lunny added the topic/ui Change the appearance of the Gitea UI label Dec 12, 2020
@codecov-io
Copy link

codecov-io commented Dec 12, 2020

Codecov Report

Merging #13956 (c646d1d) into master (3285bab) will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13956      +/-   ##
==========================================
+ Coverage   42.21%   42.23%   +0.02%     
==========================================
  Files         710      710              
  Lines       77226    77233       +7     
==========================================
+ Hits        32600    32621      +21     
+ Misses      39249    39245       -4     
+ Partials     5377     5367      -10     
Impacted Files Coverage Δ
services/mailer/mail.go 60.21% <0.00%> (-1.08%) ⬇️
services/webhook/webhook.go 52.42% <0.00%> (-1.04%) ⬇️
services/wiki/wiki.go 57.94% <0.00%> (-0.61%) ⬇️
modules/migrations/gitea_uploader.go 6.71% <0.00%> (-0.02%) ⬇️
models/action.go 50.71% <0.00%> (ø)
modules/structs/issue.go 0.00% <0.00%> (ø)
routers/api/v1/utils/hook.go 0.00% <0.00%> (ø)
modules/notification/mail/mail.go 39.08% <0.00%> (ø)
routers/repo/issue.go 38.10% <0.00%> (+0.03%) ⬆️
modules/convert/issue.go 87.40% <0.00%> (+0.09%) ⬆️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3285bab...c646d1d. Read the comment docs.

@zeripath
Copy link
Contributor

This is a draft because .dib applies !important which screws with dynamic hiding of element.

How so? Is this on Firefox? - as it appears to work fine on Chrome.

Would it work better if the element was wrapped in a div that was hidden instead ?

@CirnoT
Copy link
Contributor Author

CirnoT commented Dec 12, 2020

Chromium, the .hide() applies style="display: none;" to element but display: inline-block !important; overrides it hence it will always be shown.

chrome_2020-12-12_21-43-17

Would it work better if the element was wrapped in a div that was hidden instead ?

Won't that screw up with inline styling, which is the whole point of adding dib?

@silverwind
Copy link
Member

silverwind commented Dec 14, 2020

Chromium, the .hide() applies style="display: none;" to element but display: inline-block !important; overrides it hence it will always be shown.

Would remove the dib class from the element in this case and apply a regular non-important display: inline-block one in Less instead. I think helpers need to stay !important generally, but this is clearly an exception where it's hindering.

@CirnoT CirnoT marked this pull request as ready for review December 14, 2020 19:37
@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 Dec 14, 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 Dec 14, 2020
@lunny
Copy link
Member

lunny commented Dec 15, 2020

ci failed is unrelated and I have restarted it.

@techknowlogick techknowlogick merged commit 27d0a55 into go-gitea:master Dec 15, 2020
@CirnoT CirnoT deleted the instruct-hide branch December 15, 2020 08:01
@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.

7 participants