-
Notifications
You must be signed in to change notification settings - Fork 199
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
feat(popover): migrate s2 popover #3365
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@spectrum-css/picker": patch | ||
--- | ||
|
||
S2 Popover has an updated default position, bottom-start. The correct `.spectrum-Popover--bottom-start` class was added to the open popover selector blocks for picker so that the spacing from the picker to the popover is correctly adjusted. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
"@spectrum-css/popover": major | ||
--- | ||
|
||
S2 Popover Migration | ||
|
||
The S2 popover using new tokens for border color, padding, corner radius and elevation/drop shadows. | ||
|
||
Renamed Mods | ||
|
||
| Old mod | New mod | | ||
| --------------------------------------------- | ------------------------------------ | | ||
| `--mod-popover-shadow-blur` | `--mod-popover-drop-shadow-blur` | | ||
| `--mod-popover-shadow-color` | `--mod-popover-drop-shadow-color` | | ||
| `--mod-popover-shadow-horizontal` | `--mod-popover-drop-shadow-x` | | ||
| `--mod-popover-shadow-vertical` | `--mod-popover-drop-shadow-y` | | ||
| `--mod-popover-content-area-spacing-vertical` | `--mod-popover-content-area-spacing` | |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"@spectrum-css/coachmark": minor | ||
--- | ||
|
||
CSS references to popover custom properties/tokens were updated to reflect some mod name changes in the S2 popover (#3365). The corner radius token was updated to correspond to the new S2 popover corner radius, as well as some updated popover mod names: | ||
|
||
- `--mod-popover-content-area-spacing-vertical` was updated to `--mod-popover-content-area-spacing`. | ||
- `--spectrum-border-width-100` was updated to `--spectrum-corner-radius-large-default` |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,8 @@ | |
/* @passthrough start */ | ||
--mod-buttongroup-justify-content: flex-end; | ||
--mod-popover-border-width: var(--spectrum-border-width-100); | ||
--mod-popover-corner-radius: var(--spectrum-corner-radius-100); | ||
--mod-popover-content-area-spacing-vertical: 0; | ||
--mod-popover-corner-radius: var(--spectrum-corner-radius-large-default); | ||
--mod-popover-content-area-spacing: 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I updated this mod name because I changed popover-content-area-spacing in the popover CSS- there's now padding on all sides of popover instead of just on the top & bottom. However, I am unsure if this is actually the correct styling for the popovers in coachmark. Is this something to address in the coachmark PR #3412? Regardless, we do have this captured in CSS-1067 With the new padding in Popover (especially noticeable in the action menu popover), which means removing Keeping We might need something like this: |
||
--mod-button-edge-to-visual-only: 9px; | ||
/* @passthrough end */ | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,11 +143,14 @@ export const Template = ({ | |
const popoverMarkup = popoverContent.length !== 0 ? Popover({ | ||
isOpen: isOpen && !isDisabled && !isLoading, | ||
withTip: false, | ||
position: "bottom", | ||
position: "bottom-start", | ||
marissahuysentruyt marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The change here I thought then required the CSS selector changes, so if we're not cool with that right now, I'm happy to revert if there are any concerns. |
||
isQuiet, | ||
content: popoverContent, | ||
size, | ||
customStyles: customPopoverStyles, | ||
popoverWrapperStyles: { | ||
"display": "block", | ||
}, | ||
}, context) : ""; | ||
|
||
const helpTextMarkup = helpText ? HelpText({ | ||
|
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.
Just making sure here: the changes in the coachmark CSS are actually a result of the breaking changes from popover. Would that still be considered a minor change in the coachmark CSS?