Lucas_Werkmeister_WMDE added a comment.

  One issue I noticed with the current implementation: almost the whole content 
of the constraints widget is bold, because the whole thing is a descendant of 
an `<h4>` element (the label of the value).
  
  F31705249: Screenshot_2020-03-27 File Thonk png - wiki1.png 
<https://phabricator.wikimedia.org/F31705249>
  
  I think one solution would be to use OOUI’s overlay 
<https://www.mediawiki.org/wiki/OOUI/Concepts#Overlays> mechanism to move the 
popup somewhere else in the DOM, where it won’t inherit the `h4` styles. This 
seems to do the trick:
  
    diff --git a/resources/statements/ConstraintsReportHandlerElement.js 
b/resources/statements/ConstraintsReportHandlerElement.js
    index 9cc2851..e9d10a5 100644
    --- a/resources/statements/ConstraintsReportHandlerElement.js
    +++ b/resources/statements/ConstraintsReportHandlerElement.js
    @@ -131,7 +131,8 @@ 
ConstraintsReportHandlerElement.prototype.createPopupWidget = function ( $conten
                        padded: true,
                        head: true,
                        label: $content.find( '.wbqc-reports:first-child > 
.oo-ui-labelElement-label *' ).detach()
    -           }
    +           },
    +           $overlay: true
        } );
        widget.popup.$element.css( 'z-index', 2 );
     
  
  This also allows the popup to break out of the surrounding “structured data” 
panel (you’ll notice it wasn’t centered on the button before).
  
  F31705251: Screenshot from 2020-03-27 16-49-03.png 
<https://phabricator.wikimedia.org/F31705251>

TASK DETAIL
  https://phabricator.wikimedia.org/T239163

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Cparle, Lucas_Werkmeister_WMDE
Cc: Etonkovidova, Ramsey-WMF, Cparle, Jheald, Lucas_Werkmeister_WMDE, 
WMDE-leszek, Aklapper, PDrouin-WMF, Multichill, egardner, Oblanco79, 
Alter-paule, Beast1978, CBogen, Un1tY, Hook696, Daryl-TTMG, RomaAmorRoma, 
E.S.A-Sheild, darthmon_wmde, Kent7301, Meekrab2012, joker88john, CucyNoiD, 
Nandana, NebulousIris, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, 
Adrian1985, Cpaulf30, Lahi, Gq86, Af420, Darkminds3113, Bsandipan, Lordiis, 
GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, 
LawExplorer, WSH1906, Lewizho99, Maathavan, _jensen, rosalieper, Scott_WUaS, 
Abit, Wikidata-bugs, aude, Jdforrester-WMF, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to