Skip to content

Conversation

lucanovera
Copy link
Contributor

@lucanovera lucanovera commented Aug 8, 2025

Description Of Changes

Improve responsive styles in privacy request detail page by collapsing the date into a clock icon with tooltip.

Code Changes

  • Remove styles for previous behavior of wrapping into 3 lines
  • Added clock icon and corresponding tailwind classes for showing/hiding

Steps to Confirm

https://fides-plus-nightly-git-eng-1098-improve-privacy-r-7b09c1-ethyca.vercel.app/privacy-requests/pri_6575ad47-15a1-4138-b1b7-99f7433faa4a

  1. Use link above and login to admin ui (use nightly build credentials)
  2. Using responsive mode in the browser, keep reducing the screen. Check that below 1280px the timestamp collapses into a clock icon and you can hover to see the full timestamp in a tooltip.

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
    • Add a db-migration This indicates that a change includes a database migration label to the entry if your change includes a DB migration
    • Add a high-risk This issue suggests changes that have a high-probability of breaking existing code label to the entry if your change includes a high-risk change (i.e. potential for performance impact or unexpected regression) that should be flagged
    • Updates unreleased work already in Changelog, no new entry necessary
  • Followup issues:
    • Followup issues created
    • No followup issues
  • Database migrations:
    • Ensure that your downrev is up to date with the latest revision on main
    • Ensure that your downgrade() migration is correct and works
      • If a downgrade migration is not possible for this change, please call this out in the PR description!
    • No migrations
  • Documentation:
    • Documentation complete, PR opened in fidesdocs
    • Documentation issue created in fidesdocs
    • If there are any new client scopes created as part of the pull request, remember to update public-facing documentation that references our scope registry
    • No documentation updates required

Copy link

vercel bot commented Aug 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
fides-plus-nightly ⬜️ Ignored Preview Aug 13, 2025 3:21pm
fides-privacy-center ⬜️ Ignored Aug 13, 2025 3:21pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Summary

This PR improves responsive design in the privacy request detail page's activity timeline component. The changes implement a mobile-first approach where timestamps are displayed differently based on screen size - full timestamps appear on desktop (xl breakpoint and above), while mobile devices show a compact time icon with a tooltip containing the timestamp.

The implementation adds responsive behavior through Tailwind CSS utility classes and introduces new component imports from the fidesui library (Tooltip and Icons). However, the SCSS changes remove existing responsive breakpoints that previously allowed timeline entries to wrap on smaller screens, forcing a single-line layout across all screen sizes.

These modifications are part of the admin UI's client-side components, specifically targeting the privacy request events and logs functionality. The changes aim to create a more mobile-friendly user experience by optimizing space usage on smaller screens while maintaining full information accessibility through progressive disclosure patterns.

PR Description Notes:

  • The PR description template is incomplete with placeholder text that needs to be filled in
  • Missing actual issue reference in "Closes []"
  • Code changes, confirmation steps, and other sections contain placeholder text

Important Files Changed

Files Changed
Filename Score Overview
clients/admin-ui/src/features/privacy-requests/events-and-logs/ActivityTimelineEntry.tsx 4/5 Added responsive timestamp display with mobile icon/tooltip pattern
clients/admin-ui/src/features/privacy-requests/events-and-logs/ActivityTimelineEntry.module.scss 2/5 Removed responsive breakpoints forcing single-line layout that may cause mobile overflow issues

Confidence score: 3/5

  • This PR has mixed implementation quality with good responsive patterns but potential mobile layout issues
  • Score reflects well-implemented TypeScript changes but concerning CSS modifications that remove mobile-friendly wrapping behavior
  • Pay close attention to the SCSS file changes that could cause content overflow on mobile devices

Sequence Diagram

sequenceDiagram
    participant User
    participant Browser
    participant ActivityTimelineEntry
    participant Typography
    participant Tooltip
    participant Icons
    participant Tag
    participant AttachmentDisplay

    User->>Browser: "Views privacy request detail page"
    Browser->>ActivityTimelineEntry: "Renders timeline entry component"
    ActivityTimelineEntry->>ActivityTimelineEntry: "Processes item props (author, title, date, type, etc.)"
    ActivityTimelineEntry->>ActivityTimelineEntry: "Formats date using formatDate()"
    ActivityTimelineEntry->>ActivityTimelineEntry: "Determines if item is clickable based on onClick prop"
    ActivityTimelineEntry->>ActivityTimelineEntry: "Checks for attachments"
    
    alt Desktop view (xl breakpoint)
        ActivityTimelineEntry->>Typography: "Renders timestamp text"
        Typography-->>ActivityTimelineEntry: "Returns formatted timestamp"
    else Mobile view (below xl breakpoint)
        ActivityTimelineEntry->>Tooltip: "Creates tooltip with formatted date"
        ActivityTimelineEntry->>Icons: "Renders Time icon"
        Icons-->>ActivityTimelineEntry: "Returns time icon"
        Tooltip-->>ActivityTimelineEntry: "Returns tooltip with icon"
    end
    
    ActivityTimelineEntry->>Typography: "Renders title with ellipsis and tooltip"
    Typography-->>ActivityTimelineEntry: "Returns title component"
    
    ActivityTimelineEntry->>Tag: "Renders type tag with color"
    Tag-->>ActivityTimelineEntry: "Returns colored tag"
    
    opt Has attachments
        ActivityTimelineEntry->>AttachmentDisplay: "Renders attachment display"
        AttachmentDisplay-->>ActivityTimelineEntry: "Returns attachment component"
    end
    
    alt Item is clickable
        ActivityTimelineEntry->>Browser: "Renders as button element"
    else Item is not clickable  
        ActivityTimelineEntry->>Browser: "Renders as div element"
    end
    
    Browser-->>User: "Displays responsive timeline entry"
    
    opt User hovers over timeline item
        User->>Browser: "Hovers over timeline entry"
        Browser->>ActivityTimelineEntry: "Applies hover styles"
        ActivityTimelineEntry-->>Browser: "Shows border highlight"
        Browser-->>User: "Visual feedback on hover"
    end
    
    opt User clicks clickable timeline item
        User->>Browser: "Clicks timeline entry"
        Browser->>ActivityTimelineEntry: "Triggers onClick handler"
        ActivityTimelineEntry->>ActivityTimelineEntry: "Executes item.onClick()"
    end
Loading

2 files reviewed, 2 comments

Edit Code Review Bot Settings | Greptile

@@ -53,14 +53,8 @@ $horizontal-padding: 20px;
gap: 8px;
align-items: center;
justify-content: flex-start;
flex-wrap: wrap;
flex-wrap: nowrap;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Removing flex-wrap responsive behavior may cause horizontal overflow on mobile devices. The previous wrapping logic helped accommodate smaller screens.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intended behavior. We don't support mobile devices on admin-ui. But for smaller screens we only want to collapse the timestamp but keep the entries in 1 line.

Comment on lines +65 to +72
<div className="hidden xl:block">
<Typography.Text
className={styles.timestamp}
data-testid="activity-timeline-timestamp"
>
{formattedDate}
</Typography.Text>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: The data-testid attribute is preserved on desktop but missing on mobile version - this could break tests on smaller screens

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This didn't break any tests as we're only testing for the element to be there. I still added a new data-testid for the icon in case we need to use it in the future.

@lucanovera lucanovera changed the title Draft: Improve responsive styles in privacy request detail page Improve responsive styles in privacy request detail page Aug 13, 2025
@lucanovera
Copy link
Contributor Author

lucanovera commented Aug 13, 2025

@greptileai re-review

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Summary

Note: This review covers only the changes made since the last review (commit 92fb98f), not the entire PR.

The recent changes address previous review feedback by adding a new test ID for the mobile clock icon implementation. The developer has added data-testid="activity-timeline-timestamp-icon" to the clock icon component, ensuring test coverage remains intact across both desktop and mobile responsive states. This change maintains testing consistency while preserving the responsive design improvement that collapses timestamps into clock icons with tooltips on screens below 1280px.

The implementation continues to use Tailwind's responsive utilities (xl:block and xl:hidden) to conditionally show either the full timestamp text or the compact clock icon based on screen size. The SCSS changes removing the previous 3-line wrapping behavior remain unchanged, maintaining the cleaner single-line layout approach.

Important Files Changed

Click to expand file changes
Filename Score Overview
clients/admin-ui/src/features/privacy-requests/events-and-logs/ActivityTimelineEntry.tsx 5/5 Added test ID to mobile clock icon addressing previous review feedback

Confidence score: 5/5

  • This change is safe to merge with minimal risk as it only adds a missing test identifier
  • Score reflects a simple, targeted fix that addresses previous testing concerns without introducing new complexity
  • No files require special attention as this is a straightforward test ID addition

Sequence Diagram

sequenceDiagram
    participant User
    participant Browser
    participant PrivacyRequestPage
    participant ActivityTimelineEntry
    participant ResponsiveLogic
    participant Tooltip

    User->>Browser: "Navigate to privacy request detail page"
    Browser->>PrivacyRequestPage: "Load privacy request detail"
    PrivacyRequestPage->>ActivityTimelineEntry: "Render timeline entries"
    
    ActivityTimelineEntry->>ResponsiveLogic: "Check screen width"
    
    alt Screen width >= 1280px (xl breakpoint)
        ResponsiveLogic->>ActivityTimelineEntry: "Use full timestamp display"
        ActivityTimelineEntry->>Browser: "Show formatted date text"
    else Screen width < 1280px
        ResponsiveLogic->>ActivityTimelineEntry: "Use collapsed timestamp display"
        ActivityTimelineEntry->>Tooltip: "Create tooltip with formatted date"
        ActivityTimelineEntry->>Browser: "Show clock icon"
        User->>Browser: "Hover over clock icon"
        Browser->>Tooltip: "Show tooltip with full timestamp"
        Tooltip->>Browser: "Display formatted date tooltip"
    end
    
    Browser->>User: "Display responsive timeline entry"
Loading

3 files reviewed, no comments

Edit Code Review Bot Settings | Greptile

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Summary

This PR improves the responsive design of the privacy request detail page's activity timeline by replacing the previous 3-line wrapping behavior with a more elegant solution. On screens wider than 1280px (xl breakpoint), timestamps display normally, while on smaller screens they collapse into a clock icon with tooltip functionality. The implementation adds responsive Tailwind classes and imports the necessary Tooltip and Icons components from fidesui. The SCSS changes remove the previous flex-wrap behavior that caused awkward multi-line layouts on mobile devices. This change aligns with modern responsive design patterns where information density is optimized for smaller viewports through progressive disclosure, maintaining accessibility while improving visual hierarchy in the timeline interface.

Important Files Changed

Click to expand
Filename Score Overview
CHANGELOG.md 5/5 Standard changelog entry documenting UI improvements for smaller screens
clients/admin-ui/src/features/privacy-requests/events-and-logs/ActivityTimelineEntry.module.scss 4/5 Removes 3-line wrapping behavior and implements single-line layout with flex-wrap: nowrap
clients/admin-ui/src/features/privacy-requests/events-and-logs/ActivityTimelineEntry.tsx 4/5 Implements responsive timestamp display with clock icon and tooltip for mobile devices

Confidence score: 4/5

  • This PR is safe to merge with minimal risk as it addresses previous reviewer concerns about test compatibility
  • Score reflects well-implemented responsive design improvements with proper accessibility considerations
  • No files require special attention as all changes follow established patterns and preserve functionality

Sequence Diagram

sequenceDiagram
    participant User
    participant ActivityTimelineEntry
    participant ResponsiveLogic
    participant TooltipComponent
    participant CSS
    
    User->>ActivityTimelineEntry: "View privacy request timeline"
    ActivityTimelineEntry->>ResponsiveLogic: "Check screen width"
    
    alt Screen width >= 1280px (xl breakpoint)
        ResponsiveLogic->>ActivityTimelineEntry: "Show full timestamp text"
        ActivityTimelineEntry->>CSS: "Apply .hidden xl:block classes"
        CSS->>User: "Display full timestamp"
    else Screen width < 1280px
        ResponsiveLogic->>ActivityTimelineEntry: "Show clock icon only"
        ActivityTimelineEntry->>CSS: "Apply .xl:hidden classes"
        ActivityTimelineEntry->>TooltipComponent: "Create tooltip with full timestamp"
        CSS->>User: "Display clock icon"
        
        User->>TooltipComponent: "Hover over clock icon"
        TooltipComponent->>User: "Show full timestamp in tooltip"
    end
    
    Note over ActivityTimelineEntry: Responsive design collapses timestamp into clock icon below 1280px
Loading

3 files reviewed, no comments

Edit Code Review Bot Settings | Greptile

@lucanovera lucanovera requested a review from gilluminate August 13, 2025 13:56
Copy link
Contributor

@gilluminate gilluminate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, works good. Nice improvement!

@lucanovera lucanovera merged commit 27b0356 into main Aug 13, 2025
19 of 20 checks passed
@lucanovera lucanovera deleted the ENG-1098-Improve-privacy-request-responsive-styles branch August 13, 2025 15:39
Copy link

cypress bot commented Aug 13, 2025

fides    Run #13231

Run Properties:  status check passed Passed #13231  •  git commit 27b0356455: Improve responsive styles in privacy request detail page (#6437)
Project fides
Branch Review main
Run status status check passed Passed #13231
Run duration 00m 53s
Commit git commit 27b0356455: Improve responsive styles in privacy request detail page (#6437)
Committer Lucano Vera
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 5
View all changes introduced in this branch ↗︎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants