-
Notifications
You must be signed in to change notification settings - Fork 470
feat(ui): collapse AlertDialog into Dialog and simplify its API #9634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
01bd5de
feat(ui,headless): collapse AlertDialog into Dialog, simplify to Root…
maxyinger b1a695f
docs(swingset): tighten the Dialog page
maxyinger b4cd8d0
docs(swingset): build the Dialog panel examples on the real user page
maxyinger 1bc8ba2
fix(ui): drop the duplicate close button from the Destructive dialog
maxyinger 1f5ec5d
docs(swingset): table the Dialog dismissal policy
maxyinger 65cde34
docs(swingset): rename the Dialog exit section
maxyinger 20965ca
docs(swingset): table the Dialog nesting relationships
maxyinger 1328ef9
docs(swingset): use the real profile sidebar in the Dialog panel example
maxyinger 6311846
docs(swingset): return focus to the field after a discard confirmation
maxyinger 1106dff
docs(swingset): guard the stacked Dialog examples with useConfirmedClose
maxyinger c8164f2
docs(swingset): make the Dialog prompt examples forms so Enter confirms
maxyinger c0d35b6
fix(ui): name card dialogs through Card.Title and Card.Description
maxyinger 531b301
feat(ui): make the panel dialog a surface-owned size, and ProfilePage…
maxyinger 6f32014
feat(ui): ProfilePage carries the dialog dismiss itself, like Card.He…
maxyinger 0ac491a
docs(swingset): fold the Dialog panel examples into one
maxyinger c40677e
docs(swingset): show the panel composition in each Dialog story
maxyinger 27a4220
feat(ui): compose dialog surfaces as children of the popup
maxyinger 46f9b7c
refactor(ui): drop the dialog's border-radius counter-scale
maxyinger f15dc04
docs(swingset): complete the Dialog panel composition snippet
maxyinger 0b5a101
Merge remote-tracking branch 'origin/main' into mosaic-dialog-role-in…
maxyinger 104b71a
fix(ui): query the dialog's width bands from inside the container
maxyinger ef04fac
fix(ui): only warn when a panel dialog opens inside another dialog
maxyinger d85ff14
fix(swingset): keep named @container rules in StyleX's dev injector
maxyinger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| --- | ||
| --- | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
packages/swingset/src/lib/loaders/stylex-inject-named-container.cjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /** | ||
| * Corrects a regex in StyleX's dev runtime injector so named container queries survive. | ||
| * | ||
| * `@stylexjs/stylex@0.19.0`'s `getSeenRuleKey` recognises `@container (…)` but not | ||
| * `@container name (…)`. A named query falls through to the plain-selector branch, whose key | ||
| * is the text before the first `{` — the at-rule prelude — so every rule under the same named | ||
| * query shares one key and all but the first are dropped as duplicates. The injected default | ||
| * (carrying the `:not(#\#)` bumps) then beats the container rule in the extracted sheet, and | ||
| * the query silently never applies. Dev only: production uses the extracted CSS. | ||
| * | ||
| * Applied at bundle time to the one module rather than as a package patch, so it stays inside | ||
| * this private dev tool. Delete once upstream's `conditionalRulePattern` accepts a name. | ||
| */ | ||
| const BROKEN = String.raw`/^@(media|supports|container)\s*\([^)]+\)\s*{/`; | ||
| const FIXED = String.raw`/^@(media|supports|container)\b[^{]*{/`; | ||
|
|
||
| module.exports = function stylexInjectNamedContainer(source) { | ||
| if (!source.includes(BROKEN)) { | ||
| this.emitWarning( | ||
| new Error( | ||
| `stylex-inject-named-container: pattern not found in ${this.resourcePath}; StyleX may have fixed it — remove this loader.`, | ||
| ), | ||
| ); | ||
| return source; | ||
| } | ||
| return source.replace(BROKEN, FIXED); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Fill in the changeset package bumps and summary.
The frontmatter is empty and the body has no text. This changeset releases nothing and adds no changelog entry. This PR removes
AlertDialog, replaces the flat<Dialog>wrapper, and movessizetoDialog.Popup, which is a breaking change for@clerk/ui, plus new behavior in@clerk/headless. Consumers need both the version bump and a migration note.📝 Proposed changeset content
Confirm the bump levels against the release plan for these packages.
📝 Committable suggestion
🤖 Prompt for AI Agents
Source: Coding guidelines