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

Use culturally inclusive palette names #7570

Merged
merged 6 commits into from
Mar 13, 2024

Conversation

markov00
Copy link
Member

@markov00 markov00 commented Mar 12, 2024

Summary

This PR rename the positive and negative palettes to be more culturally inclusive. Instead of using green for positive and red for negative I've just used the color name to describe the palette, that is enough and pretty clear to everyone.

fix #4766

In Kibana there are 10 references to euiPaletteNegative and euiPalettePositive, the change is pretty straight forward.

QA

Remove or strikethrough items that do not apply to your PR.

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
    • [ ] Updated the Figma library counterpart - These palettes are not in Figma

Copy link

github-actions bot commented Mar 12, 2024

This PR contains breaking changes. The opener of this pull request is asked to perform the following due diligence steps below, to assist EUI in our next Kibana upgrade:

  • If this PR contains prop/API changes:
    • Search through Kibana for <EuiComponent usages (example search)
    • In the PR description or in a PR comment, include a count or list with the number of component usages in Kibana that will need to be updated (if that amount is "none", include that information as well)
  • If this PR contains CSS changes:
    • Search through Kibana for the changed EUI selectors, e.g. .euiComponent (example search)
    • In the PR description or in a PR comment, include a count or list with the number of custom CSS overrides in Kibana that will need to be updated (if that amount is "none", include that information as well)
  • 🔍 Tip: When searching through Kibana, consider excluding **/target, **/*.snap, **/*.storyshot files to reduce noise and only look at source code usages
  • ⚠️ For extremely risky changes, the EUI team should potentially consider the following precautions:
    • Using a pre-release release candidate to test Kibana CI ahead of time
    • Using kibana-a-la-carte for manual QA, and to give other Kibana teams a staging server to quickly test against

@markov00 markov00 force-pushed the 2024-03-12_rename_pos-neg_palettes branch from 1d4dea8 to 1bc9eeb Compare March 12, 2024 11:22
@markov00 markov00 changed the title refactor: rename positive/negative palettes Use culturally inclusive palette names Mar 12, 2024
@markov00 markov00 marked this pull request as ready for review March 12, 2024 16:55
@markov00 markov00 requested a review from a team as a code owner March 12, 2024 16:55
@cee-chen
Copy link
Contributor

Rather than making this a breaking change, I'd prefer to add in a 3 month deprecation period where we export the old palette names (e.g. export const euiPaletteNegative = euiPaletteRed) as an alias with a /** @deprecated - use `euiPaletteRed` instead */ jsdoc note. We'll still update Kibana accordingly, but this makes upgrading EUI smoother for other consumers.

@markov00 do you mind adding that to this PR? Or if you want I can do so, let me know :)

Copy link
Contributor

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

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

Thanks so much for this PR @markov00, you rock ❤️‍🔥 Going to commit a few small copy nit changes and merge this in!

changelogs/upcoming/7570.md Outdated Show resolved Hide resolved
src/services/color/eui_palettes.ts Outdated Show resolved Hide resolved
@cee-chen cee-chen enabled auto-merge (squash) March 13, 2024 17:46
@cee-chen
Copy link
Contributor

cee-chen commented Mar 13, 2024

Deprecation has been scheduled for June 2024 (#1469)

@kibanamachine
Copy link

Preview staging links for this PR:

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

@cee-chen cee-chen merged commit 2c88903 into main Mar 13, 2024
7 checks passed
@cee-chen cee-chen deleted the 2024-03-12_rename_pos-neg_palettes branch March 13, 2024 18:16
@drewdaemon
Copy link

drewdaemon commented Mar 21, 2024

@markov00 I don't necessarily object to this change, but I'm not sure I understand how this moves us toward cultural inclusivity.

As I understand it, you're saying that not all cultures associate red with negative and green with positive. I think that's a fair point, but it's not like changing the names of these palettes will change anything about what users from various cultures experience in our products.

I could imagine us adjusting the presentation of color based on culture. But, if we did that, it seems like the universal semantic concepts of "positive" and "negative" would serve us better because they are what we're actually trying to communicate. The specific color that would be shown would be an implementation detail.

Practically speaking, I would expect the color to adjust automatically based on locale or something. I would expect to be able to say "I want this theme to convey a positive feeling" and let the robots do the translation.

Just my 2 🪙

cee-chen added a commit to elastic/kibana that referenced this pull request Mar 22, 2024
`v93.3.0`⏩ `v93.4.0`

---

## [`v93.4.0`](https://github.com/elastic/eui/releases/v93.4.0)

- Added the following properties to `EuiButtonGroup`'s `options`
configs: `toolTipContent`, `toolTipProps`, and `title`. These new
properties allow wrapping buttons in `EuiToolTips`, and additionally
customizing or disabling the native browser `title` tooltip.
([#7461](elastic/eui#7461))
- Enhanced `EuiResizeObserver` and `useResizeObserver`'s performance to
not trigger page reflows on resize event
([#7575](elastic/eui#7575))
- Updated `EuiSuperUpdateButton` to support custom button text via an
optional `children` prop
([#7576](elastic/eui#7576))

**Bug fixes**

- Fixed `EuiFlyout` to not repeatedly remove/add a body class on resize
([#7462](elastic/eui#7462))
- Fixed `EuiToast` title text to wrap instead of overflowing out of the
container ([#7568](elastic/eui#7568))
- Fixed a visual bug with `EuiHeaderBreadcrumbs` with popovers
([#7580](elastic/eui#7580))

**Deprecations**

- Deprecated `euiPalettePositive` and `euiPaletteNegative` in favour of
a more culturally inclusive `euiPaletteGreen` and `euiPaletteRed`
([#7570](elastic/eui#7570))
- Deprecated all charts theme exports in favor of `@elastic/charts`
exports: ([#7572](elastic/eui#7572))
- Deprecated `EUI_CHARTS_THEME_<DARK|LIGHT>` in favor of
`<DARK|LIGHT>_THEME` from `@elastic/charts`.
([#7572](elastic/eui#7572))
- Deprecated `EUI_SPARKLINE_THEME_PARTIAL` in favor of
`useSparklineOverrides` theme from the kibana `charts` plugin `theme`
service.

**Accessibility**

- Updated `EuiModal` to set an `aria-modal` attribute and a default
`dialog` role ([#7564](elastic/eui#7564))
- Updated `EuiConfirmModal` to set a default `alertdialog` role
([#7564](elastic/eui#7564))
- Fixed `EuiModal` and `EuiConfirmModal` to properly trap
Safari+VoiceOver's virtual cursor
([#7564](elastic/eui#7564))
@markov00
Copy link
Member Author

but it's not like changing the names of these palettes will change anything about what users from various cultures experience in our products.

I'd just like to disagree with that. If you are required to select a negative color that is instead called "positive" I believe this can make users a bit uncomfortable.
I think that being explicit and clear in our context should be the priority, and specifying that this is a green/red/black or white palette is the way to be explicit. Using a culturally associated semantic name/label is not explicit and can be subject to errors (just imagine that associated with a blind person).
Also, consider that green and red are not associated only with positive and negative, you can use these palettes for many things, so why give them a name that doesn't represent their color and is just inclusive of a subset of meaning?
Looking quickly around color palettes haven't names or just their respective colors or a fantasy name if they come from a research study (viridis, magma, inferno)

I would expect the color to adjust automatically based on the locale or something. I would expect to be able to say "I want this theme to convey a positive feeling" and let the robots do the translation.

This is an interesting idea, definitely something to consider. Probably it will have its problems, but I believe this could be a great enhancement. It will probably need to be "linked" to the user profile because even within the same locale users could have different beliefs/ideas/visions (like the first day of the week: Monday/Sunday)

@drewdaemon
Copy link

drewdaemon commented Mar 25, 2024

I'd just like to disagree with that. If you are required to select a negative color that is instead called "positive" I believe this can make users a bit uncomfortable.

Does this mean that these names show up in our palette switcher UI? In that case, I misunderstood originally and I agree with you that this is a good short-term change.

I assumed this was merely an adjustment to what they are called in the code. From the developer's perspective, I was saying that positive and negative are more powerful terms because they let the developer send a message (e.g. "this is a bad thing", "this is an error") without needing to know or repeatedly code for differences in culture.

As I said above, giving the developer access to semantic terms (code level) and allowing the application to translate these to the appropriate colors (UI level) would be easier than what I originally thought you were trying to accomplish here :)

I would expect the color to adjust automatically based on the locale or something. I would expect to be able to say "I want this theme to convey a positive feeling" and let the robots do the translation.

This is an interesting idea, definitely something to consider. Probably it will have its problems, but I believe this could be a great enhancement. It will probably need to be "linked" to the user profile because even within the same locale users could have different beliefs/ideas/visions (like the first day of the week: Monday/Sunday)

Good points. I see it as being the same as any other translation operation. For text-based information I (the developer) write a string in English in the code. Then, the application translates that string to best communicate my meaning to the user in the UI.

@markov00
Copy link
Member Author

Does this mean that these names show up in our palette switcher UI? In that case, I misunderstood originally and I agree with you that this is a good short-term change.

Currently yes, it could be easily mapped to different labels case by case, but this can be missed everytime you need to show a the list of color palettes. That's why it needs both changes, in code and on UI (todo).

Screenshot 2024-03-26 at 17 19 06

that positive and negative are more powerful terms because they let the developer send a message (e.g. "this is a bad thing", "this is an error") without needing to know or repeatedly code for differences in culture.

I see, I believe we should provide a "cultural" adaptive palette :D similar to what we do with the theme-aware colors

@cee-chen cee-chen mentioned this pull request Jun 3, 2024
3 tasks
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.

Rename positive/negative palettes to be culturally inclusive
5 participants