• 
      

    Update forms CSS for dark mode.

    Review Request #14189 — Created Sept. 26, 2024 and submitted

    Information

    Review Board
    release-7.1.x

    Reviewers

    This change updates our main forms CSS definitions to use Ink-defined
    colors and spacing throughout. This includes several vaguely
    interrelated pieces:

    • Fixed up colors throughout, removing hard-coded color codes and
      #rb-ns-ui.colors variables in favor of Ink CSS variables.
    • Moved old LESS-based variables into clearly-denoted legacy sections.
    • Updated field help text to use an ink-provided icon and flexbox-based
      layout, fixing up some ugly spacing and alignment.
    • Fixed an issue where opening the inline editor for draft comment
      replies caused the text to jump horizontally (we apparently had a rule
      for the horizontal margins get mistakenly deleted?).
    • Fixed up some existing definitions of CSS variables to use correct
      type prefixes.
    • Went through a variety of forms in the admin UI and verified
      appearance of form fields and fieldsets (both expanded and collapsed).
    • Verified appearance and functionality of textarea/CodeMirror editors
      in review request fields, reviews, and replies.
    • Verified that opening the editor for all inline editable
      textarea/CodeMirror fields did not cause any visual jumps.
    • Verified the appearance of <input> and <textarea> elements in other
      parts of the UI, including review request fields and reviews.
    Summary ID
    Update forms CSS for dark mode.
    This change updates our main forms CSS definitions to use Ink-defined colors and spacing throughout. This includes several vaguely interrelated pieces: - Fixed up colors throughout, removing hard-coded color codes and #rb-ns-ui.colors variables in favor of Ink CSS variables. - Moved old LESS-based variables into clearly-denoted legacy sections. - Updated field help text to use an ink-provided icon and flexbox-based layout, fixing up some ugly spacing and alignment. - Fixed an issue where opening the inline editor for draft comment replies caused the text to jump horizontally (we apparently had a rule for the horizontal margins get mistakenly deleted?). - Fixed up some existing definitions of CSS variables to use correct type prefixes. Testing Done: - Went through a variety of forms in the admin UI and verified appearance of form fields and fieldsets (both expanded and collapsed). - Verified appearance and functionality of textarea/CodeMirror editors in review request fields, reviews, and replies. - Verified that opening the editor for all inline editable textarea/CodeMirror fields did not cause any visual jumps. - Verified the appearance of <input> and <textarea> elements in other parts of the UI, including review request fields and reviews.
    9af51bcd747157b008630caa10a578090be9e158

    Description From Last Updated

    Small nit but would it be worth it to do something about the overflow cutoff here? Maybe ellipses or make …

    maubinmaubin

    Spacing is off by one space

    maubinmaubin

    Could we use a variable here instead? of 2em?

    maubinmaubin

    For styles that are for a component, you'll want to include the component's selector in the list in order to …

    chipx86chipx86

    Same here, where it makes sense.

    chipx86chipx86
    maubin
    1. 
        
    2. Show all issues

      Small nit but would it be worth it to do something about the overflow cutoff here? Maybe ellipses or make the diff scrollable.

      1. I don't think it's really worth spending time on this. I had made my window pretty narrow for the purpose of taking the screenshots, and this UI isn't used very much at all.

      2. Sounds good.

    3. reviewboard/static/rb/css/pages/reviews.less (Diff revision 1)
       
       
       
       
       
      Show all issues

      Spacing is off by one space

    4. Show all issues

      Could we use a variable here instead? of 2em?

    5. 
        
    david
    maubin
    1. 
        
    2. 
        
    chipx86
    1. 
        
    2. Show all issues

      For styles that are for a component, you'll want to include the component's selector in the list in order to ensure that any changes to a parent that impact the styles will be reflected in the component's scope:

      :root,
      .rb-c-admin-form-inline-group {
        ...
      }
      
    3. reviewboard/static/rb/css/ui/forms.less (Diff revision 2)
       
       
      Show all issues

      Same here, where it makes sense.

    4. 
        
    david
    chipx86
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-7.1.x (5f6bb9a)