-
Notifications
You must be signed in to change notification settings - Fork 85
Improve responsive styles in privacy request detail page #6437
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
Improve responsive styles in privacy request detail page #6437
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
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.
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
2 files reviewed, 2 comments
@@ -53,14 +53,8 @@ $horizontal-padding: 20px; | |||
gap: 8px; | |||
align-items: center; | |||
justify-content: flex-start; | |||
flex-wrap: wrap; | |||
flex-wrap: nowrap; |
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.
logic: Removing flex-wrap responsive behavior may cause horizontal overflow on mobile devices. The previous wrapping logic helped accommodate smaller screens.
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.
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.
<div className="hidden xl:block"> | ||
<Typography.Text | ||
className={styles.timestamp} | ||
data-testid="activity-timeline-timestamp" | ||
> | ||
{formattedDate} | ||
</Typography.Text> | ||
</div> |
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.
logic: The data-testid attribute is preserved on desktop but missing on mobile version - this could break tests on smaller screens
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.
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.
…privacy-request-responsive-styles
@greptileai re-review |
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.
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"
3 files reviewed, no comments
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.
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
3 files reviewed, no comments
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.
Looks good, works good. Nice improvement!
fides
|
Project |
fides
|
Branch Review |
main
|
Run status |
|
Run duration | 00m 53s |
Commit |
|
Committer | Lucano Vera |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
0
|
|
0
|
|
0
|
|
5
|
View all changes introduced in this branch ↗︎ |
Description Of Changes
Improve responsive styles in privacy request detail page by collapsing the date into a clock icon with tooltip.
Code Changes
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
Pre-Merge Checklist
CHANGELOG.md
updatedmain
downgrade()
migration is correct and works