Skip to content

feat: enhance preview media controls layout and migrate to bubble menu - #3138

Merged
AlexAndBear merged 9 commits into
mainfrom
fix/preview-mobile-controls-layout
Aug 17, 2026
Merged

feat: enhance preview media controls layout and migrate to bubble menu#3138
AlexAndBear merged 9 commits into
mainfrom
fix/preview-mobile-controls-layout

Conversation

@AlexAndBear

@AlexAndBear AlexAndBear commented Aug 16, 2026

Copy link
Copy Markdown
Member

Description

Enhance the preview media controls by migrating to the OcBubbleMenu component from the design system and improving the mobile layout behavior.

Changes included:

  • Migrate to design system: Replace custom styled container with OcBubbleMenu for consistent styling and improved maintainability
  • Logical grouping: Organize controls into logical groups with visual dividers:
    • Navigation (previous / x of x / next)
    • Image actions (shrink, enlarge, rotate left, rotate right, reset)
    • View actions (hide photo roll, fullscreen)
    • Resource actions (favorite, delete)
  • Mobile layout improvements:
    • Keep navigation as full-width row on mobile with proper padding (px-2) to prevent controls from touching edges
    • Center wrapped secondary controls and normalize spacing on intermediate widths
    • Hide divider after navigation group on mobile for better visual hierarchy
  • Consistent breakpoints: Align fullscreen visibility breakpoint with sm to match navigation behavior

Before

image

After

image

Related Issue

How Has This Been Tested?

  • test environment: local dev + unit tests
  • test case 1: verified media controls layout behavior across mobile/intermediate/desktop widths
  • test case 2: verified bubble menu component integration and styling
  • test case 3: pnpm test:unit --run packages/web-app-preview/tests/unit/components/MediaControls.spec.ts
  • test case 4: pnpm exec prettier --check packages/web-app-preview/src/components/MediaControls.vue

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@AlexAndBear AlexAndBear self-assigned this Aug 16, 2026
@github-project-automation github-project-automation Bot moved this to Qualification in OpenCloud Team Board Aug 16, 2026
@AlexAndBear AlexAndBear moved this from Qualification to In Progress in OpenCloud Team Board Aug 16, 2026
@AlexAndBear

AlexAndBear commented Aug 16, 2026

Copy link
Copy Markdown
Member Author

@kulmann was thinking about using the same bubble menu like for the epub reader in a next iteration, worth a try ?

also rearranged the grouping because it was kinda off, adding vertical lines helps the user to navigate

image image

@AlexAndBear AlexAndBear changed the title fix: center wrapped preview toolbar actions and improve mobile navigation row fix: rearrange logical groups and improve mobile toolbar layout Aug 16, 2026
@kulmann

kulmann commented Aug 17, 2026

Copy link
Copy Markdown
Member

@AlexAndBear bubble menu is worth a try, good idea.

All the changes you already have are really helpful: mobile layout, grouping, vertical separator lines all improve the usability 馃挭

@AlexAndBear
AlexAndBear force-pushed the fix/preview-mobile-controls-layout branch from 9e6efb3 to 0c0a0be Compare August 17, 2026 06:45
Reorganize preview media controls into logical groups with improved mobile layout:
- Keep navigation (previous/next) as full-width row on mobile
- Add control groups: navigation, image actions, view actions, resource actions
- Normalize spacing between control groups using gap utilities
Change fullscreen button visibility from md to sm breakpoint to match the navigation group behavior for consistent responsive layout.
Add visual dividers between control groups and wrap related controls:
- Image actions group (shrink, zoom, rotate left, rotate right, reset)
- View actions group (photo roll toggle, fullscreen)
- Resource actions group (favorite, delete)
- Use consistent gap-1 spacing within groups
Hide divider after navigation group on mobile to improve visual hierarchy, while keeping other dividers visible for better control grouping.
Replace custom styled container with OcBubbleMenu from design system for consistent styling and improved maintainability.

Add horizontal padding (px-2) on mobile navigation group to prevent prev/next controls from touching container edges.
@AlexAndBear
AlexAndBear force-pushed the fix/preview-mobile-controls-layout branch from 0c0a0be to 1e3926e Compare August 17, 2026 06:54
@AlexAndBear AlexAndBear changed the title fix: rearrange logical groups and improve mobile toolbar layout feat: enhance preview media controls layout and migrate to bubble menu Aug 17, 2026
@AlexAndBear

AlexAndBear commented Aug 17, 2026

Copy link
Copy Markdown
Member Author
image image

Increase horizontal padding from px-2 to px-4 to ensure hover backgrounds stay within the rounded bubble menu container.
@AlexAndBear
AlexAndBear force-pushed the fix/preview-mobile-controls-layout branch from c38a50c to 7131833 Compare August 17, 2026 07:04
Switch from shallowMount to mount in MediaControls.spec.ts to properly
render child components (oc-bubble-menu, oc-button, oc-icon) and allow
test selectors to find DOM elements.
@AlexAndBear
AlexAndBear force-pushed the fix/preview-mobile-controls-layout branch from cfcf98e to ee48813 Compare August 17, 2026 07:18
@AlexAndBear
AlexAndBear merged commit a293eea into main Aug 17, 2026
30 checks passed
@AlexAndBear
AlexAndBear deleted the fix/preview-mobile-controls-layout branch August 17, 2026 13:01
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenCloud Team Board Aug 17, 2026
@openclouders openclouders mentioned this pull request Aug 17, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Enhance preview media controls layout and migrate to bubble menu

3 participants