This repository was archived by the owner on Sep 30, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Modal] Rebuild with layout primitives #7454
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
a3e312e
[Modal] Rebuild with layout primitives
laurkim 7761699
[Modal.Footer] Rebuild with layout primitives
laurkim 22b76ab
[Modal.Header] Rebuild with layout primitives
laurkim b960dc8
[Modal.Section] Rebuild with layout primitives
laurkim e3e2a71
[Modal.Header] Use `DisplayText` due to `Text` not supporting respons…
laurkim 7e27c75
[Modal.Header] Fix header position for hidden titles
laurkim 9c01997
[Modal.Section] Fix padding when `titleHidden` is true
laurkim 734993c
[Modal] Update tests
laurkim 7215453
[Modal.Dialog] Add `aria-label` for accessibility
laurkim 24e8de9
Add changeset
laurkim 35e8c7f
[Modal.Header] Test `Text` instead of `DisplayText`
laurkim 25e6efc
[Modal] Fix references to updated `Box` props
laurkim f92be30
[Modal.Header] Use `Text` and remove `DisplayText` and css class
laurkim e62c51b
[Modal.Header] Update test to check for `Text` component
laurkim 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,5 @@ | ||
--- | ||
'@shopify/polaris': minor | ||
--- | ||
|
||
Refactored `Modal` and its children components to use layout primitives |
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
15 changes: 0 additions & 15 deletions
15
polaris-react/src/components/Modal/components/Footer/Footer.scss
This file was deleted.
Oops, something went wrong.
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
23 changes: 0 additions & 23 deletions
23
polaris-react/src/components/Modal/components/Header/Header.scss
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 |
---|---|---|
@@ -1,28 +1,5 @@ | ||
@import '../../../../styles/common'; | ||
|
||
.Header { | ||
display: flex; | ||
align-items: flex-start; | ||
flex-shrink: 0; | ||
padding: var(--p-space-4) var(--p-space-5); | ||
border-bottom: var(--p-border-divider); | ||
} | ||
|
||
.titleHidden { | ||
position: absolute; | ||
right: 0; | ||
z-index: 1; | ||
width: 100%; | ||
display: flex; | ||
justify-content: flex-end; | ||
|
||
.Title { | ||
display: none; | ||
} | ||
} | ||
|
||
.Title { | ||
@include text-breakword; | ||
flex: 1; | ||
margin-top: var(--p-space-1); | ||
} |
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
17 changes: 3 additions & 14 deletions
17
polaris-react/src/components/Modal/components/Section/Section.scss
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 |
---|---|---|
@@ -1,24 +1,13 @@ | ||
@import '../../../../styles/common'; | ||
|
||
$close-button-width: calc(var(--p-space-12) + var(--p-space-1)); | ||
|
||
.Section { | ||
flex: 0 0 auto; | ||
padding: var(--p-space-5); | ||
|
||
&:not(:last-of-type) { | ||
border-bottom: var(--p-border-divider); | ||
} | ||
} | ||
|
||
&.subdued { | ||
background: var(--p-surface-subdued); | ||
} | ||
|
||
&.flush { | ||
padding: 0; | ||
} | ||
|
||
&.titleHidden { | ||
padding-right: $close-button-width; | ||
} | ||
.titleHidden { | ||
padding-right: $close-button-width; | ||
} |
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
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.
Uh oh!
There was an error while loading. Please reload this page.