-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Fix 'add code comment' button being invisible all the time #13389
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #13389 +/- ##
==========================================
- Coverage 42.14% 42.11% -0.04%
==========================================
Files 691 691
Lines 75966 75966
==========================================
- Hits 32019 31994 -25
- Misses 38703 38724 +21
- Partials 5244 5248 +4
Continue to review full report at Codecov.
|
Wonder when that broke. We may need to backport to 1.13. Also, icon seems a bit off-center: Edit: this seems to fix it (thought that should be converted to SVG later): diff --git a/web_src/less/_review.less b/web_src/less/_review.less
index ea5c8394f..975b1ed4a 100644
--- a/web_src/less/_review.less
+++ b/web_src/less/_review.less
@@ -1,8 +1,8 @@
.ui.button.add-code-comment {
font-size: 14px;
height: 16px;
- line-height: 16px !important;
+ line-height: 12px !important;
padding: 0;
position: relative;
width: 16px;
z-index: 5; |
It looks like these rules are meant to show that button: gitea/web_src/less/_review.less Lines 43 to 46 in 8176ba6
Those focus classes are only added by JS: Lines 1241 to 1250 in 8176ba6
I think the reason why they don't trigger is the parent classes I think it's inappropriate that this is done in JS, this should be a pure CSS hover effect, ideally with minimal dependency on the surrounding DOM to not break so easily. For reference, initial commit that added this is 6e64f9d |
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.
Redacting review for now as this is not the right fix.
Made it work on full-line hover like GitHub and removed remnants of JS solution. |
Needs 1.13 backport. |
🚀 |
@CirnoT please send backport :) |
…13389) * Fix 'add code comment' button being invisible all the time * Fix off-center icon * Remove old JS hover hack * Show on full-line hover Co-authored-by: techknowlogick <[email protected]> (cherry picked from commit 7f7e7f3)
…13402) * Fix 'add code comment' button being invisible all the time * Fix off-center icon * Remove old JS hover hack * Show on full-line hover Co-authored-by: techknowlogick <[email protected]> (cherry picked from commit 7f7e7f3)
As title; need to set opacity to non-zero value if we want it shown.