chore(new-channels): restyle attachments tab#2312
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughSummary by CodeRabbit
WalkthroughReplaced Changes
Possibly related PRs
🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@js/app/packages/channel/Attachments/ChannelAttachmentsTab.tsx`:
- Around line 11-12: In ChannelAttachmentsTab.tsx the outer container uses the
class string "relative flex-1 min-h-0 overflow-hidden" which prevents vertical
scrolling and can clip expanded media; change that to allow scrolling (e.g.,
replace "overflow-hidden" with "overflow-auto" or "overflow-y-auto") so the
outer div (the one with class "relative flex-1 min-h-0 overflow-hidden")
provides a vertical scroll path for oversized attachments.
In `@js/app/packages/channel/Attachments/MediaGallery.tsx`:
- Around line 39-49: The toggle button (onClick using setExpanded and reading
expanded) doesn't expose its state to assistive tech; update the button element
to include aria-expanded={expanded()} and add an aria-controls pointing to the
gallery/container element's id (create a stable id on the gallery component if
missing) so screen readers can associate the control with the content, and mark
the decorative ChevronDownIcon as aria-hidden="true" (or remove it from the
accessibility tree) to avoid redundant announcements; ensure the referenced
container (the media gallery) has the matching id and appropriate hidden/visible
attributes when expanded() changes.
In `@js/app/packages/channel/Attachments/Skeletons.tsx`:
- Around line 27-33: The skeleton media grid has duplicate top padding because
AttachmentSection already applies top padding; remove the extra pt-3 class on
the container div that wraps the ThumbnailSkeleton instances so spacing is
consistent in the skeleton state—update the div inside AttachmentSection (where
MEDIA_SKELETON_COUNT drives the For loop rendering ThumbnailSkeleton) to omit or
replace pt-3 with the appropriate class (or none) so you only rely on
AttachmentSection's padding.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: ed0f5225-ae1a-438d-b06f-ea8893ea5f02
📒 Files selected for processing (5)
js/app/packages/channel/Attachments/AttachmentEntityList.tsxjs/app/packages/channel/Attachments/ChannelAttachmentsTab.tsxjs/app/packages/channel/Attachments/MediaGallery.tsxjs/app/packages/channel/Attachments/SectionHeader.tsxjs/app/packages/channel/Attachments/Skeletons.tsx
No description provided.