Skip to content

feat(Popover): Open as a bottom sheet on phones - #8995

Merged
talissoncosta merged 15 commits into
mainfrom
feat/popover-bottom-sheet
Nov 25, 2026
Merged

talissoncosta merged 15 commits into
mainfrom
feat/popover-bottom-sheet

Conversation

@talissoncosta

@talissoncosta talissoncosta commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor
  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Below 768px, Popover content opens in a bottom sheet instead of an anchored panel: overlay, scroll lock, focus trap, Escape and outside tap to close. The trigger gets aria-haspopup="dialog" and aria-expanded.

  • The sheet has a header with the title and a Close button (44px IconButton), which takes focus on open. Phones have no Escape key, so outside tap was the only way out.
  • BottomSheet is internal to Popover for now; it moves to base/ when something else needs it.
  • useBreakpoint('isPhone') matches Bootstrap's md breakpoint, so JS and SCSS switch at the same width.

This applies to every Popover on purpose, so no consumer has to opt in. Consumers today: the audit log scope filter (ScopeFilter, behind organisation_audit_log) and the PanelSearch sort menu. Both now open as a sheet on phones.

  • Scope filter: its card fills the sheet, the project list scrolls with the sheet, and rows are 44px.
  • Sort menu: the sheet is titled "Sort" and closes on selection.

How did you test this code?

  • Storybook: Popover / MobileSheet opens as a sheet; Default stays anchored.
  • Unit tests for matchesBreakpoint.
  • Audit log scope filter at phone width: opens as a sheet, fills the width, Close and outside tap dismiss it.
  • PanelSearch sort menu (Projects page) at phone width: opens as a "Sort" sheet, picking an option sorts and closes it.
  • Audit log scope filter on desktop: still an anchored popover below the trigger, no overlay or scroll lock; Escape and outside click close it and focus returns to the trigger.

@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
flagsmith-frontend-preview Ready Ready Preview Nov 25, 2026 3:28pm UTC
flagsmith-frontend-staging Ready Ready Preview Nov 25, 2026 3:28pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
docs Ignored Ignored Preview Nov 25, 2026 3:28pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions github-actions Bot added front-end Issue related to the React Front End Dashboard feature New feature or request labels Nov 17, 2026
@talissoncosta
talissoncosta force-pushed the feat/popover-bottom-sheet branch from ee16aff to 9f9f33d Compare November 17, 2026 14:56
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Nov 17, 2026
@talissoncosta
talissoncosta force-pushed the feat/popover-bottom-sheet branch from 9f9f33d to 4fcad7a Compare November 17, 2026 15:23
@github-actions github-actions Bot removed the feature New feature or request label Nov 17, 2026
@github-actions github-actions Bot added the feature New feature or request label Nov 17, 2026
@talissoncosta
talissoncosta marked this pull request as ready for review November 17, 2026 15:24
@talissoncosta
talissoncosta requested a review from a team as a code owner November 17, 2026 15:24
@talissoncosta
talissoncosta requested review from kyle-ssg and removed request for a team November 17, 2026 15:24
@github-actions github-actions Bot removed the feature New feature or request label Nov 17, 2026
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-8995 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-8995 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith:pr-8995 Finished ✅ Results ✅
ghcr.io/flagsmith/flagsmith-api:pr-8995 Finished ✅ Results ✅
ghcr.io/flagsmith/flagsmith-private-cloud:pr-8995 Finished ✅ Results ✅
ghcr.io/flagsmith/flagsmith-frontend:pr-8995 Finished ✅ Results ✅

talissoncosta and others added 12 commits November 25, 2026 09:09
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… modes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t jump

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… position styles

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…neModal class

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0 issues found across 1 file (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: Shared Popover now becomes a modal bottom sheet on phones for every consumer (PanelSearch and audit ScopeFilter), adding overlay, scroll lock, focus trap, and new dismissal behavior. This is a product/UX and accessibility tradeoff rather than a narrowly scoped fix.

Turn on auto-fix | Re-trigger cubic

@Zaimwa9 Zaimwa9 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just one point of attention flagged related to Chromium (at least) and the reduced motion. It could be worth to fix it

The effect ran before the portal mounted the sheet, so focus stayed on the
trigger behind the overlay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0 issues found across 1 file (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: Shared Popover now opens as a modal bottom sheet on phones for every consumer (sort menu, audit scope filter), adding overlay, scroll lock, focus trap, and new dismissal behavior — a product/UX and accessibility tradeoff rather than a bounded fix.

Turn on auto-fix | Re-trigger cubic

@talissoncosta
talissoncosta merged commit 029b425 into main Nov 25, 2026
30 checks passed
@talissoncosta
talissoncosta deleted the feat/popover-bottom-sheet branch November 25, 2026 17:59

This branch was successfully deployed

2 active deployments
Preview – flagsmith-frontend-staging — e1ce9688 Deployed Nov 25, 2026 by vercel[bot]
Preview – flagsmith-frontend-preview — e1ce9688 Deployed Nov 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants