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

update(tooltip): Make inverted text readable in dark mode #386

Merged
merged 4 commits into from
Jul 2, 2020

Conversation

Xapphire13
Copy link
Contributor

to: @williaster @hayes @alecklandgraf

Description

When in dark mode, the inverted tooltip text isn't readable. This change fixes that, and also improves the accessibility of the colors for light mode.

In order to make this fix, I needed to have theme mode aware styles or use some other color from the theme; there were no applicable analogs, so I went the route of exposing the current theme mode in the theme. I added a new baseInverse color value to the theme.

Motivation and Context

The colors currently used for the inverted tooltip aren't accessible, causing difficulty for viewers of all eyesights

Testing

  • Tested with storybook

Screenshots

Light Mode

Before After
image image
Notice how the transparency decreases the contrast, making it harder to read

Dark Mode

Before After
image image
Notice how the text is almost completely unreadable

Checklist

  • My code follows the style guide of this project.
  • I have updated or added documentation accordingly.
  • I have read the CONTRIBUTING document.

@airbnb-bot
Copy link
Collaborator

Size Changes

Package Diff ESM Prev ESM CJS Prev CJS
core +0.0% 566.47 KB 566.39 KB 708.52 KB 708.44 KB

Compared to master. File sizes are unminified and ungzipped.

View raw build stats

Previous (master)

{
  "apollo": {
    "esm": 10832,
    "lib": 14147
  },
  "app-shell": {
    "esm": 12906,
    "lib": 19874
  },
  "composer": {
    "esm": 68247,
    "lib": 101805
  },
  "core": {
    "esm": 579985,
    "lib": 725440
  },
  "forms": {
    "esm": 37350,
    "lib": 49298
  },
  "icons": {
    "esm": 156355,
    "lib": 205626
  },
  "layouts": {
    "esm": 15298,
    "lib": 20770
  },
  "metrics": {
    "esm": 5467,
    "lib": 7729
  },
  "test-utils": {
    "esm": 4279,
    "lib": 5937
  }
}

Current

{
  "apollo": {
    "esm": 10832,
    "lib": 14147
  },
  "app-shell": {
    "esm": 12906,
    "lib": 19874
  },
  "composer": {
    "esm": 68247,
    "lib": 101805
  },
  "core": {
    "esm": 580066,
    "lib": 725521
  },
  "forms": {
    "esm": 37350,
    "lib": 49298
  },
  "icons": {
    "esm": 156355,
    "lib": 205626
  },
  "layouts": {
    "esm": 15298,
    "lib": 20770
  },
  "metrics": {
    "esm": 5467,
    "lib": 7729
  },
  "test-utils": {
    "esm": 4279,
    "lib": 5937
  }
}

@alecklandgraf
Copy link
Contributor

@Xapphire13 you need a conventional commit PR title, note these are tied to major,minor,patch releases.

Pull request title requires a conventional changelog prefix. More information: https://github.com/beemojs/conventional-changelog-beemo#commit-message-format

@Xapphire13 Xapphire13 changed the title Shc tooltip inverted update(tooltip): Make inverted text readable in dark mode Jul 1, 2020
@Xapphire13 Xapphire13 force-pushed the shc-tooltip-inverted branch from 3ef3603 to 0cd8d70 Compare July 1, 2020 23:07
@Xapphire13
Copy link
Contributor Author

🚀

@Xapphire13 Xapphire13 merged commit c218858 into master Jul 2, 2020
@Xapphire13 Xapphire13 deleted the shc-tooltip-inverted branch July 2, 2020 00:03
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.

3 participants