Skip to content
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

fix(#4049): Express theme should render a border on Popovers and Dialogs with forced-colors: active #4050

Merged
merged 10 commits into from
Aug 8, 2023

Conversation

majornista
Copy link
Collaborator

@majornista majornista commented Feb 13, 2023

Closes #4049

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue #4049.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

  1. In Chrome, open ActionMenu story using Express theme
  2. In Chrome DevTools, under Rendering > Emulate CSS media feature forced-colors, select forced-colors: active.
  3. Confirm that when expanded, the ActionMenu popover has a 1px border using the foreground color for forced-colors: active.
  4. Repeat for other components that open a dropdown menu or listbox, such as ComboBox, DatePicker, DateRangePicker, MenuTrigger, Picker, and SearchAutocomplete.
  5. Open and test each of the Dialog variants, starting with Dialog -- Default, to verify that Dialogs have a border and border-radius.
  6. Full Screen Takeover stories, Dialog - fullscreenTakeover form, DialogContainer - type: fullscreenTakeover, or DialogTrigger - type: fullscreenTakeover, do not have a border or border-radius on the fullscreenTakeover dialog.

🧢 Your Project:

Adobe/Accessibility

@rspbot
Copy link

rspbot commented Feb 13, 2023

@rspbot
Copy link

rspbot commented Feb 14, 2023

@majornista majornista added the small review Easy to review PR label Feb 14, 2023
@rspbot
Copy link

rspbot commented Feb 14, 2023

@rspbot
Copy link

rspbot commented Feb 15, 2023

Copy link
Member

@LFDanLu LFDanLu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for the most part, the only thing I noticed is the following visual defects in the corner of the ComboBox/SearchAutocomplete/other dropdown menus
Screenshot 2023-02-14 172406

More noticeable in the async/long list stories. Not entirely sure what is up, perhaps something to do with the scrollbar + rectangular items

@majornista
Copy link
Collaborator Author

LGTM for the most part, the only thing I noticed is the following visual defects in the corner of the ComboBox/SearchAutocomplete/other dropdown menus

Screenshot 2023-02-14 172406

More noticeable in the async/long list stories. Not entirely sure what is up, perhaps something to do with the scrollbar + rectangular items

.spectrum-Popover has a border-radius, but does not have overflow: hidden. The .spectrum-Menu contained within the .spectrum-Popover does not have a border-radius, and with forced-colors: active the this overflow overlap at the corners becomes noticable.

We may be able to fix this by adding the following to packages/@adobe/spectrum-css-temp/components/popover/index.css:

@media (forced-colors: active) {
  .spectrum-Popover {
    overflow: hidden;
  }
}

Also, the mixed up colors for the ComboBox "Show suggestions" button in forced-colors mode will need to be resolved.

@rspbot
Copy link

rspbot commented Feb 15, 2023

@majornista majornista requested a review from LFDanLu February 15, 2023 17:32
@rspbot
Copy link

rspbot commented Feb 17, 2023

@rspbot
Copy link

rspbot commented Feb 22, 2023

@rspbot
Copy link

rspbot commented Feb 25, 2023

@rspbot
Copy link

rspbot commented Aug 1, 2023

@@ -144,3 +144,10 @@ governing permissions and limitations under the License.
margin-left: calc(var(--spectrum-global-dimension-size-150) * -1);
}
}

@media screen and (max-height: 400px) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where did this value come from?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps from here:

Copy link
Member

@LFDanLu LFDanLu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified the border/border radius on a variety of Popovers/Dialogs/Modals/Trays in WHCM. A bit concerned that there are several non forced-colors: active scoped css changes but Chromatic seems to run clean and doesn't look like there are any noticeable differences when I checked manually. Just one thing I noticed with the combobox popover, lemme know if that issue wasn't fixable with the same overflow: hidden

Comment on lines 174 to 176
.spectrum-Dropdown-popover {
overflow: hidden;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the ComboBox/SearchAutocomplete popover supposed to have this same overflow: hidden as well? Still seeing the following corner defects:
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should probably have the same overflow: hidden to fix the corner defects.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See e035bc5

Copy link
Member

@devongovett devongovett Aug 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can avoid the need for this. In 57bc561 I made it so popovers are overflow: hidden by default, except if they have an arrow. In that case, the dialog inside is overflow: hidden as well. That also fixes the issue with overflow that you had added the extra padding for at 400px breakpoint. The dialog itself should never scroll, because either the content or the grid inside does.

@rspbot
Copy link

rspbot commented Aug 3, 2023

@majornista majornista requested a review from LFDanLu August 3, 2023 16:47
@rspbot
Copy link

rspbot commented Aug 7, 2023

@LFDanLu
Copy link
Member

LFDanLu commented Aug 7, 2023

@adobe adobe deleted a comment from rspbot Aug 7, 2023
@adobe adobe deleted a comment from rspbot Aug 7, 2023
@rspbot
Copy link

rspbot commented Aug 7, 2023

@rspbot
Copy link

rspbot commented Aug 8, 2023

@rspbot
Copy link

rspbot commented Aug 8, 2023

@rspbot
Copy link

rspbot commented Aug 8, 2023

## API Changes

unknown top level export { type: 'identifier', name: 'Column' }
unknown top level export { type: 'identifier', name: 'Column' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }

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

Successfully merging this pull request may close these issues.

Express theme should render a border on Popovers and Dialogs with forced-colors: active
7 participants