• 
      

    Fix the header above reviews/replies and make it a new component.

    Review Request #14971 — Created March 27, 2026 and submitted

    Information

    Review Board
    release-7.1.x

    Reviewers

    The work on user badges regressed some of the display of the header area
    at the top of reviews and in comments. This wasn't helped by the fact
    that this is some of the oldest CSS in the codebases, and it's a huge
    rats nest. Fixing this meant fixing it in multiple places and then
    dealing with overrides.

    Instead of making the situation worse, this change introduces a new
    rb-c-discussion-header component that can be used in each of these
    areas. It's responsible for showing the author information or title, the
    timestamp, and an optional avatar and "new updates" icon.

    This can also be put in compact mode, which places the timestamp below
    the name. Replies enable this and avatars, whereas the review headers do
    not.

    An improved mobile display now uses the compact mode for all cases.
    Previously, the timestamp remained on the right-hand side of the title,
    which left little room for content.

    A Storybook story has been added to help document and maintain this
    component.

    Tested this in mobile and desktop modes on all review request entry
    boxes and in replies (published, existing draft, and new draft).

    Tested in light and dark modes.

    All Python and JavaScript unit tests pass.

    Summary ID
    Fix the header above reviews/replies and make it a new component.
    The work on user badges regressed some of the display of the header area at the top of reviews and in comments. This wasn't helped by the fact that this is some of the oldest CSS in the codebases, and it's a huge rats nest. Fixing this meant fixing it in multiple places and then dealing with overrides. Instead of making the situation worse, this change introduces a new `rb-c-discussion-header` component that can be used in each of these areas. It's responsible for showing the author information or title, the timestamp, and an optional avatar and "new updates" icon. This can also be put in compact mode, which places the timestamp below the name. Replies enable this and avatars, whereas the review headers do not. An improved mobile display now uses the compact mode for all cases. Previously, the timestamp remained on the right-hand side of the title, which left little room for content. A Storybook story has been added to help document and maintain this component.
    146ca9137f142ff9d9db1b399848b9137d07ab0d

    Description From Last Updated

    Looks like reviewboard/static/rb/js/reviewRequestPage/views/tests/baseStatusUpdatesEntryViewTests.es6.js also needs to be updated for this change.

    david david

    Typo: area-label -> aria-label

    david david

    header-details and summary are no longer used at all in templates/reviews/entries/base.html (and I don't see it elsewhere in the codebase). …

    david david

    __title is a grid child, so this property does nothing.

    david david

    Do we not need to pass timestamp in the way that we were doing before?

    david david

    Now that this is fully removed, I see that it's removing the responsive rules that switched to vertical stacking. Can …

    david david

    Probably should be typed as HTMLElement | null

    david david

    Can you double check the spacing with drafts?

    david david
    david
    1. 
        
    2. Show all issues

      Typo: area-label -> aria-label

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

      header-details and summary are no longer used at all in templates/reviews/entries/base.html (and I don't see it elsewhere in the codebase). This gap doesn't seem to make sense, and in fact we might want to just remove this CSS entirely now.

      1. This was part of the original change that led to this work. I had code in my stash to remove all this that just got missed.

    4. Show all issues

      __title is a grid child, so this property does nothing.

    5. Show all issues

      Do we not need to pass timestamp in the way that we were doing before?

      1. With timestamp as timestamp? No, I'm not entirely sure why we had that. blocktrans strings will make use of existing variables as long as they're not any more simple than a bare local variable reference.

    6. 
        
    chipx86
    david
    1. 
        
    2. Show all issues

      Looks like reviewboard/static/rb/js/reviewRequestPage/views/tests/baseStatusUpdatesEntryViewTests.es6.js also needs to be updated for this change.

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

      Now that this is fully removed, I see that it's removing the responsive rules that switched to vertical stacking. Can you test the header on mobile?

      1. Works as well as it did before with the new grid-based layout, but there's room for improvement.

    4. 
        
    chipx86
    david
    1. 
        
    2. Show all issues

      Probably should be typed as HTMLElement | null

    3. Show all issues

      Can you double check the spacing with drafts?

      1. Yep, spacing is fine. This is effectively replaced by the margin-bottom: 1em on the discussion header in .review-comments-inline().

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