Add responsive card layout to admin activity events table#1353
Open
Add responsive card layout to admin activity events table#1353
Conversation
Uses Kevin Powell's responsive table technique: on mobile (<768px), table rows become stacked cards with labeled fields via data-label attributes and CSS ::before pseudo-elements. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the goal of this PR and why is this important?
How did you approach the change?
<thead>, convert each<tr>to a block-level card, and usetd::before { content: attr(data-label) }to show column headers inlinedata-labelattributes to each<td>in the events table.responsive-tableCSS class inapplication.tailwind.cssWhy custom CSS instead of Tailwind utilities? The responsive card pattern requires the same set of styles on every
<td>(display, grid,::beforepseudo-element withcontent: attr(data-label), etc.). Doing this with Tailwind utilities would mean repeating ~10 utility classes on every single<td>across every row. A single.responsive-tableCSS class keeps the HTML clean and DRY — the only addition to each<td>is thedata-labelattribute.UI Testing Checklist
Anything else to add?
.responsive-tableclass is reusable for other tables in the app🤖 Generated with Claude Code