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

[Spike] High contrast mode #8036

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from
Draft

Conversation

cee-chen
Copy link
Member

@cee-chen cee-chen commented Sep 23, 2024

Summary

See #7509 (comment)

Screenshots

Extra reading/reference:

QA

General checklist

  • Browser QA
    • Checked in both light and dark modes
    • Checked in mobile
    • Checked in Chrome, Safari, Edge, and Firefox
    • Checked for accessibility including keyboard-only and screenreader modes
  • Docs site QA
  • Code quality checklist
  • Release checklist
    • A changelog entry exists and is marked appropriately.
    • If applicable, added the breaking change issue label (and filled out the breaking change checklist)
  • Designer checklist
    • If applicable, file an issue to update EUI's Figma library with any corresponding UI changes. (This is an internal repo, if you are external to Elastic, ask a maintainer to submit this request)

@cee-chen cee-chen force-pushed the high-contrast-mode branch 3 times, most recently from 51185df to 9fd8832 Compare September 23, 2024 23:15
@cee-chen cee-chen self-assigned this Sep 23, 2024
@cee-chen cee-chen force-pushed the high-contrast-mode branch 3 times, most recently from e6e785b to dd894de Compare September 24, 2024 16:07
TODO: figure out how to compute this using getComputed/buildTheme instead
- and set a border-bottom instead via box-shadow

+ code style cleanup - use optional chaining syntax instead of destructuring and correctly pass all options
+ fix file picker to correctly inherit border color, which is `lightShade` in any case in non-high-contrast mode
+ tweak switches to account for changed border color
- contrast feels low otherwise

- TODO: should we add this to all controls?
… high contrast mode

+ fix obvious components that require this - flyouts, modals, toasts, and mobile table rows
- apply borders instead of shadows so we can apply an extra bottom shadow on clickable panels/cards

- TODO: get designer input, make sure this isn't too many borders
- requires some special finagling with popover arrows to get pseudo-borders (actually drop shadow filters) working
  - has about a pixel gap on closer inspection but this is good enough IMO

- avoid `filter` on the parent panel in order to work with `hasDragDrop` behavior
+ address focus background color TODO
- CSS cleanup: replace line-height with flex centering instead
- this allows us to use borders of any thickness, and removes a lot of unnecessary vertical centering and tweaks (we can now remove all number styles completely)

+ clean up horizontal focus rings and make the focus outline better for current steps
+ massive cleanup/refactor of src-docs theme context, prefer toggle for light/dark mode

+ remove defunct tour on language selector
… ThemeContext

- might as well since we're already handling localStorage things there, saves us from waterfalling props unnecessarily
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @cee-chen

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

Successfully merging this pull request may close these issues.

2 participants