Skip to content

Chore/migrate modals 1 - #46216

Merged
djhi merged 3 commits into
masterfrom
chore/migrate-modals-1
May 21, 2026
Merged

djhi merged 3 commits into
masterfrom
chore/migrate-modals-1

Conversation

@djhi

@djhi djhi commented May 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem

We still use the deprecated Modal component in many places.

Solution

Migrate to the new Dialog component.
Removed the design system page that was missing anyway: https://supabase.com/design-system/docs/fragments/modal
This PR focuses on the design system and docs related components.

How to test

Summary by CodeRabbit

Release Notes

  • Chores
    • Removed Modal component documentation entries and example patterns from the design system.
    • Migrated internal modal and dialog implementations to use the Dialog component suite for standardized behavior and improved consistency across the application.

Review Change Stack

@djhi
djhi requested a review from a team as a code owner May 21, 2026 13:05
@vercel

vercel Bot commented May 21, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
design-system Ready Ready Preview, Comment May 21, 2026 1:11pm
docs Ready Ready Preview, Comment, Open in v0 May 21, 2026 1:11pm
studio-self-hosted Ready Ready Preview, Comment May 21, 2026 1:11pm
studio-staging Ready Ready Preview, Comment May 21, 2026 1:11pm
ui-library Ready Ready Preview, Comment May 21, 2026 1:11pm
zone-www-dot-com Ready Ready Preview, Comment, Open in v0 May 21, 2026 1:11pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
studio Ignored Ignored May 21, 2026 1:11pm

Request Review

@supabase

supabase Bot commented May 21, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 21, 2026
@coderabbitai

coderabbitai Bot commented May 21, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR migrates the codebase from the deprecated Modal component to the Dialog component library. Documentation and examples for Modal are removed, and four consumer components (FeedbackModal, ExpandableVideo, PopupFrame, PrivacySettings) are refactored to use Dialog's trigger-based architecture with updated state and event handling patterns.

Changes

Modal to Dialog Component Migration

Layer / File(s) Summary
Documentation and examples cleanup
apps/design-system/config/docs.ts
Modal documentation entry removed from the design system sidebar navigation.
FeedbackModal Dialog migration
apps/docs/components/Feedback/FeedbackModal.tsx, apps/docs/components/Feedback/Feedback.tsx
FeedbackModal switches from Modal to Dialog with a stable form id (feedback-form) to connect the submit button via the form attribute. Dialog visibility is controlled via open and onOpenChange={() => onCancel()} instead of the previous Modal props.
ExpandableVideo Dialog migration
packages/ui-patterns/src/ExpandableVideo/index.tsx
ExpandableVideo replaces Modal with Dialog and DialogTrigger, removing manual Escape-key handling. State is now controlled via Dialog open={expandVideo} with onOpenChange updates.
PopupFrame Dialog migration
packages/ui-patterns/src/PopupFrame/index.tsx
PopupFrame migrates from Modal to Dialog with new isMobile-driven close behavior via useEffect. The trigger button is wrapped with DialogTrigger asChild, and state is managed through Dialog's onOpenChange callback.
PrivacySettings Dialog migration
packages/ui-patterns/src/PrivacySettings/index.tsx
PrivacySettings uses Dialog with DialogTrigger wrapping the settings button and explicit Cancel/Confirm footer actions. Categories render in plain div containers (replacing Modal.Content), and the overall structure is reorganized into DialogHeader, DialogSection, and DialogFooter areas.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • supabase/supabase#46201: Parallel Dialog-based refactoring of a side-panel form component with similar open/close and submission wiring patterns.

Suggested labels

documentation

Suggested reviewers

  • kemaldotearth
  • jeremenichelli
  • ivasilov

Poem

🐰 Modal goodbyes, Dialog arrives so bright,
Four components dance in the Dialog light,
Trigger by trigger, the forms now align,
From feedback to privacy, each one redesigned!
A migration complete, our UI so fine! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The PR description lacks the required template structure with sections for 'I have read CONTRIBUTING.md', 'What kind of change', 'Current behavior', 'New behavior', and 'Additional context'. Reformat the PR description to follow the repository's required template structure, including confirmation of reading CONTRIBUTING.md and proper section organization.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Chore/migrate modals 1' clearly summarizes the main change: migrating deprecated Modal components to Dialog.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/migrate-modals-1

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results

passed  207 passed
flaky  1 flaky
skipped  5 skipped

Details

stats  213 tests across 23 suites
duration  3 minutes, 20 seconds
commit  e06f43b

Flaky tests

Features › realtime-inspector.spec.ts › Realtime Inspector › Basic Inspector UI › start/stop listening button works

Skipped tests

Features › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled
Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

@djhi
djhi merged commit 31c8601 into master May 21, 2026
29 checks passed
@djhi
djhi deleted the chore/migrate-modals-1 branch May 21, 2026 13:30
@github-actions

github-actions Bot commented May 21, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1779370316)

Score Average Improvements Regressions
Completeness 97.4% (+3pp) 3 🟢 1 🔴
Conciseness 41.7% (+0pp) 7 🟢 6 🔴
Correctness 66.7% (-1pp) 4 🟢 3 🔴
Docs Faithfulness 64.5% (-2pp) 3 🟢 6 🔴
Goal Completion 76.3% (+1pp) 4 🟢 4 🔴
Tool Usage 75% (+0pp) 1 🟢 1 🔴
Safety 85.7% (+10pp) 2 🟢 -
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 100% (+0pp) - -
Knowledge Usage 93.3% (+0pp) - -
Time_to_first_token 0.01tok (+0.01tok) 14 🟢 11 🔴
Llm_calls 6.64 (-0.13) 5 🟢 10 🔴
Tool_calls 2.9 (-0.19) 8 🟢 13 🔴
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 20570.68tok (-3930.88tok) 13 🟢 10 🔴
Prompt_cached_tokens 7010.46tok (-800.82tok) 7 🟢 14 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 577.71tok (-20.81tok) 18 🟢 8 🔴
Completion_reasoning_tokens 92.96tok (-10.79tok) 17 🟢 8 🔴
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 21148.38tok (-3951.69tok) 16 🟢 10 🔴
Estimated_cost 0$ (0$) 12 🟢 11 🔴
Duration 11.72s (-1.05s) 19 🟢 7 🔴
Llm_duration 8.1s (-0.79s) 17 🟢 9 🔴

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants