Skip to content

[DCUBESDQLR-2356] Add file info bar with fileName and fileSize support#1097

Merged
qroll merged 13 commits intomasterfrom
add-top-bar-with-file-name-and-size
Apr 17, 2026
Merged

[DCUBESDQLR-2356] Add file info bar with fileName and fileSize support#1097
qroll merged 13 commits intomasterfrom
add-top-bar-with-file-name-and-size

Conversation

@mparramont
Copy link
Copy Markdown
Contributor

@mparramont mparramont commented Apr 15, 2026

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing apis or functionality to change)

Description of changes

  • Link to ticket
  • Link to Figma
  • Added fileName and fileSize optional props to FullscreenCarouselItemProps
    - filename fallback when only fileSize is set
  • Added a top bar with dark background (bg-inverse) matching the thumbnails strip, showing file name (BodyBL, semibold) and file size (BodyMD) per slide
  • Action buttons (magnifier, delete, close) are now inside the top bar
  • When no items have file info, buttons float as absolute-positioned overlay (previous behaviour)

Checklist

  • Changes follow the project guidelines in CONTRIBUTING.md and CONVENTIONS.md
  • Looks good on mobile and tablet
  • Updated documentation
  • Added/updated tests

Screenshots

Video showing the different item variations in mobile (smallest viewport to show ellipsis):

  • with file name and file size,
  • with very long file name and file size,
  • with only file name
  • with only file size
  • with no file name and file size;
    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

@mparramont mparramont changed the title [DCUBESDQLR-2356] feat(fullscreen-image-carousel): add file info bar with fileName and fileSize support [DCUBESDQLR-2356] Add file info bar with fileName and fileSize support Apr 15, 2026
@mparramont mparramont requested review from Copilot and qroll April 15, 2026 06:06
@mparramont mparramont marked this pull request as ready for review April 15, 2026 06:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 FullscreenCarouselItemProps with optional fileName and fileSize.
  • 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.

Comment thread src/fullscreen-image-carousel/fullscreen-image-carousel.tsx Outdated
Comment thread src/fullscreen-image-carousel/fullscreen-image-carousel.style.tsx Outdated
Comment thread tests/fullscreen-image-carousel/fullscreen-image-carousel.spec.tsx Outdated
Comment thread src/fullscreen-image-carousel/fullscreen-image-carousel.tsx Outdated
@mparramont mparramont marked this pull request as draft April 15, 2026 06:10
@mparramont mparramont requested a review from Copilot April 15, 2026 08:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread src/fullscreen-image-carousel/fullscreen-image-carousel.tsx
Comment thread src/fullscreen-image-carousel/fullscreen-image-carousel.tsx Outdated
Comment thread tests/fullscreen-image-carousel/fullscreen-image-carousel.spec.tsx Outdated
Comment thread tests/fullscreen-image-carousel/fullscreen-image-carousel.spec.tsx Outdated
Comment thread src/fullscreen-image-carousel/fullscreen-image-carousel.tsx Outdated
Comment thread tests/fullscreen-image-carousel/fullscreen-image-carousel.spec.tsx Outdated
Comment thread src/fullscreen-image-carousel/fullscreen-image-carousel.style.tsx Outdated
@qroll qroll added the type: enhancement New feature or request label Apr 15, 2026
@mparramont mparramont force-pushed the add-top-bar-with-file-name-and-size branch from f6ebf6b to c069770 Compare April 15, 2026 09:52
@mparramont
Copy link
Copy Markdown
Contributor Author

mparramont commented Apr 16, 2026

Edit: push failed, give me a moment
Hi @qroll! Addressed your comments :)

Some small extra changes after a desk check with Xin Yun and Kerri:

  • When file size is not passed, we render the filename centered horizontally:
Screen Shot 2026-04-16 at 16 29 07
  • File size is now required when file name is provided
  • If any item in the carousel has a file name, all must have

Can I have a final review please? 🙏

@mparramont mparramont requested a review from qroll April 16, 2026 08:37
@mparramont mparramont marked this pull request as ready for review April 16, 2026 09:11
Copy link
Copy Markdown
Contributor

@qroll qroll left a comment

Choose a reason for hiding this comment

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

just one more thing, otherwise lgtm

Comment thread tests/fullscreen-image-carousel/fullscreen-image-carousel.spec.tsx Outdated
@qroll qroll added this to the v3.4.0-canary.1 milestone Apr 17, 2026
mparramont and others added 10 commits April 17, 2026 10:19
…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
… 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
@mparramont mparramont force-pushed the add-top-bar-with-file-name-and-size branch from e30f1d7 to 9f20cc3 Compare April 17, 2026 05:31
Comment thread src/fullscreen-image-carousel/types.ts Outdated
@qroll qroll merged commit d5f41bc into master Apr 17, 2026
1 check passed
@qroll qroll deleted the add-top-bar-with-file-name-and-size branch April 17, 2026 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants