[DCUBESDQLR-2356] Add file info bar with fileName and fileSize support#1097
[DCUBESDQLR-2356] Add file info bar with fileName and fileSize support#1097
Conversation
There was a problem hiding this comment.
Pull request overview
Adds per-slide file metadata display to FullscreenImageCarousel by introducing an optional top “file info” bar and updating docs/stories/tests accordingly.
Changes:
- Extend
FullscreenCarouselItemPropswith optionalfileNameandfileSize. - Render a top bar (when any item has file info) that shows filename/filesize and contains the magnifier/delete/close actions; otherwise preserve the previous floating overlay actions.
- Add Storybook docs/stories and unit tests covering the new file info behaviors.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/fullscreen-image-carousel/fullscreen-image-carousel.spec.tsx | Adds tests for file info rendering, fallback, and updates on navigation. |
| stories/fullscreen-image-carousel/props-table.tsx | Documents new fileName/fileSize item props in the API table. |
| stories/fullscreen-image-carousel/fullscreen-image-carousel.stories.tsx | Adds a WithFileInfo story showcasing multiple file info combinations and truncation. |
| stories/fullscreen-image-carousel/fullscreen-image-carousel.mdx | Includes the new story in the docs page. |
| src/fullscreen-image-carousel/types.ts | Adds fileName and fileSize to FullscreenCarouselItemProps. |
| src/fullscreen-image-carousel/fullscreen-image-carousel.tsx | Implements file info bar rendering and relocates action buttons into the top bar. |
| src/fullscreen-image-carousel/fullscreen-image-carousel.style.tsx | Updates layout to support the top bar; adds styling for file info text elements. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f6ebf6b to
c069770
Compare
|
Edit: push failed, give me a moment Some small extra changes after a desk check with Xin Yun and Kerri:
Can I have a final review please? 🙏 |
qroll
left a comment
There was a problem hiding this comment.
just one more thing, otherwise lgtm
…upport - Add fileName and fileSize props to FullscreenCarouselItemProps - Top bar shows file name and size when at least one item has file info, otherwise reverts to floating absolute-positioned action buttons - File name falls back to '-' when only fileSize is provided - Action buttons (magnifier, delete, close) moved into the top bar - Fix ImageGalleryContainer height to use flex:1/min-height:0 to prevent vertical scroll when top bar is present - Add WithFileInfo story, update props-table and MDX docs - Add tests covering all new file info bar behaviour
- trim fileName before using in hasFileInfo and displayName - move aria-live/aria-atomic from TopActionButtons to FileInfoTextWrapper - rename misleading test name to match actual assertion
…ated O(n) computation on every render
… center filename vertically - disallow fileSize without fileName via discriminated union - enforce all-or-none fileName across items via union of arrays - vertically center filename in file info bar when fileSize is absent - update stories and tests for new type constraints
e30f1d7 to
9f20cc3
Compare
…age carousel item types directly

Type of changes
Description of changes
fileNameandfileSizeoptional props toFullscreenCarouselItemProps-filename fallback when onlyfileSizeis setbg-inverse) matching the thumbnails strip, showing file name (BodyBL, semibold) and file size (BodyMD) per slideChecklist
Screenshots
Video showing the different item variations in mobile (smallest viewport to show ellipsis):
and also showing a carousel with no items with file name or file size: previous behaviour with no top bar.
Screen.Recording.2026-04-15.at.2.00.54.PM.mov