Extract openFirstDashboard() and getMobileFilterButton() helpers to
remove duplicated dashboard-open and filter-locator logic across
mobile-dashboard.spec.ts tests, per bito review feedback.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Three test blocks mocking useNativeFilters were missing the hasFilters
field added to the hook's return type, causing TS2345 in lint-frontend CI.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
MOBILE_SCREENSHOTS_DIR is committed to the repo alongside the generated
images, so this was never hit in practice, but Playwright doesn't create
missing parent directories for screenshot paths — mkdir defensively so
the generator also works standalone against a clean/pruned checkout.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The mobile jest breakpoint mock reported sm:true at a 375px viewport,
which is inconsistent with antd's actual sm (>=576px) breakpoint. The
Playwright beforeAll dashboard-card check also created an unauthenticated
page via browser.newPage() (which doesn't inherit the project's
storageState), so it always hit the login page and skipped the suite.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Convert silent no-op if-guards in mobile dashboard interaction tests to
explicit test.skip() calls so a missing dashboard/menu/refresh option is
reported as skipped rather than a false-positive pass. Also fix a
contradictory comment in the filter drawer tests and align the second
filter-drawer test's locator with the first test's .mobile-filter-button
fallback selector.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Jest module registration order caused Home.test.tsx and DashboardList.test.tsx
to reference mockAntdWithDesktopBreakpoint before it was defined, since
importing it from '@superset-ui/core' pulled in the theme/antd chain first.
Also fixes a stuck view-mode bug when forceViewMode clears, a vacuous
Playwright filter assertion, and an overly-permissive matchMedia mock, all
flagged in review.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- remove redundant inline feature_flag_manager import
- use URL.DASHBOARD_LIST constant in mobile-dashboard e2e spec
- add No-filters tooltip to drawer Clear all button for parity
- drop duplicated dashboard-content-wrapper render test
- consolidate desktop breakpoint mocks onto mockAntdWithDesktopBreakpoint
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds an opt-in, consumption-only mobile experience (feature flag
MOBILE_CONSUMPTION_MODE, default off, @lifecycle: development):
- Dashboards: charts stacked full-width with real plugin dimensions
(ChartHolder reports full column count on mobile; heights capped to
the viewport minus chrome), sticky swipeable tab bars with gradient
overflow affordances, filter bar in a drawer (FilterBar mobileMode),
compact header (title scrolls away; edit/publish/fave/refresh controls
hidden; dashboard info moved into the kebab menu)
- Dashboard list: forced card view, full-width cards, search/filters and
sort in a drawer (single FilterControls instance)
- Home: dashboards-only Recents, compact empty states, desktop-only
sections hidden
- Navigation: hamburger drawer (dashboards, theme/language, user
info/logout with row-tap navigation)
- Route guarding: routes declare mobileSupported in routes.tsx;
everything else renders a MobileUnsupported screen; viewport growth
unblocks automatically (useIsMobile subscribes to matchMedia only when
the flag is on, so flag-off deployments have zero render delta)
- Serves a viewport meta tag (flag-gated) so mobile browsers lay out at
device width instead of the ~980px legacy viewport; exposes
is_feature_enabled to Jinja via the common context processor
- User docs (using-superset/mobile-experience.mdx) with a Playwright
screenshot generator following the docs:screenshots pattern
- Docker dev config enables the flag; jest + Playwright coverage
throughout
Squashed from the iterative mobile-dashboard-support history (preserved
at backup/mobile-pre-rebase-2).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>