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

[Color Palette] Deprecate euiPaletteComplimentary; Add euiPaletteComplementary #6992

Merged
merged 6 commits into from
Jul 26, 2023

Conversation

breehall
Copy link
Contributor

@breehall breehall commented Jul 25, 2023

closes #6901

Summary

It looks like we made a whoopsie a while ago and misspelled complementary when naming our color palettes. This PR:

  • Adds the @deprecated flag to euiPaletteComplimentary while continuing to export it
  • Creates euiPaletteComplementary and updates references in the docs

I've added euiPaletteComplimentary to the Deprecations schedule. Kibana is only showing two usages at this moment, so this shouldn't be difficult to update during an upgrade.

QA

References to the old color palette name have been updated in the docs. Each example should have no visual changes between staging and prod. The new name should also be displayed (euiPaletteComplementary).

General checklist

  • Checked in both light and dark modes
  • Props have proper autodocs (using @default if default values are missing) and playground toggles
  • Added documentation
  • Checked for breaking changes and labeled appropriately
  • A changelog entry exists and is marked appropriately

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_6992/

@breehall breehall marked this pull request as ready for review July 25, 2023 19:17
@breehall breehall requested a review from 1Copenut July 25, 2023 19:17
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.

There's no need to copy and paste the same exact code twice. We just need to rename the existing palette and then re-export the old name pointing to the new one

src/services/color/eui_palettes.ts Outdated Show resolved Hide resolved
src/services/color/eui_palettes.ts Show resolved Hide resolved
breehall and others added 2 commits July 25, 2023 15:25
Co-authored-by: Cee Chen <549407+cee-chen@users.noreply.github.com>
Co-authored-by: Cee Chen <549407+cee-chen@users.noreply.github.com>
@breehall
Copy link
Contributor Author

There's no need to copy and paste the same exact code twice. We just need to rename the existing palette and then re-export the old name pointing to the new one

@cee-chen Gotcha! Totally make sense. I need to go in and clean up the commit. I'll do that right after I run the release process

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.

LGTM once CI passes.

Let's set a ~3 month deprecation period on this (i.e., beginning of November 2023). Can you update the meta issue accordingly?

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_6992/

Copy link
Contributor

@1Copenut 1Copenut left a comment

Choose a reason for hiding this comment

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

👍 LGTM!

@breehall
Copy link
Contributor Author

Let's set a ~3 month deprecation period on this (i.e., beginning of November 2023). Can you update the meta issue accordingly?

Just updated it to November!

@breehall breehall merged commit 4cd2803 into elastic:main Jul 26, 2023
jbudz pushed a commit to elastic/kibana that referenced this pull request Aug 14, 2023
`85.1.0` ➡️ `86.0.0`

⚠️ The biggest change in this PR is migrating the `react-beautiful-dnd`
dependency to it's open-source forked successor, `@hello-pangea/dnd`.
This new fork has better typescript support and additionally supports
both React 17 and React 18.

## [`86.0.0`](https://github.com/elastic/eui/tree/v86.0.0)

- Added React 18 support (StrictMode not yet supported).
([#7012](elastic/eui#7012))

**Deprecations**

- Deprecated `euiPaletteComplimentary`; Use `euiPaletteComplementary`
instead. ([#6992](elastic/eui#6992))

**Breaking changes**

- Replaced the underlying drag-and-drop library from
`react-beautiful-dnd` to its fork `@hello-pangea/dnd`
([#7012](elastic/eui#7012))
([#7012](elastic/eui#7012))
- No code updates are needed if using only `<EuiDragDropContext>`,
`<EuiDroppable>` and `<EuiDraggable>` with no direct imports from
`react-beautiful-dnd`. In case you were importing things from
`react-beautiful-dnd` and using them together with EUI components, you
need to switch to `@hello-pangea/dnd` which has cross-compatible API.

---------

Co-authored-by: Tomasz Kajtoch <tomasz.kajtoch@elastic.co>
Co-authored-by: Tomasz Kajtoch <tomek@kajto.ch>
Co-authored-by: Cee Chen <549407+cee-chen@users.noreply.github.com>
Co-authored-by: Drew Tate <andrew.tate@elastic.co>
bryce-b pushed a commit to elastic/kibana that referenced this pull request Aug 22, 2023
`85.1.0` ➡️ `86.0.0`

⚠️ The biggest change in this PR is migrating the `react-beautiful-dnd`
dependency to it's open-source forked successor, `@hello-pangea/dnd`.
This new fork has better typescript support and additionally supports
both React 17 and React 18.

## [`86.0.0`](https://github.com/elastic/eui/tree/v86.0.0)

- Added React 18 support (StrictMode not yet supported).
([#7012](elastic/eui#7012))

**Deprecations**

- Deprecated `euiPaletteComplimentary`; Use `euiPaletteComplementary`
instead. ([#6992](elastic/eui#6992))

**Breaking changes**

- Replaced the underlying drag-and-drop library from
`react-beautiful-dnd` to its fork `@hello-pangea/dnd`
([#7012](elastic/eui#7012))
([#7012](elastic/eui#7012))
- No code updates are needed if using only `<EuiDragDropContext>`,
`<EuiDroppable>` and `<EuiDraggable>` with no direct imports from
`react-beautiful-dnd`. In case you were importing things from
`react-beautiful-dnd` and using them together with EUI components, you
need to switch to `@hello-pangea/dnd` which has cross-compatible API.

---------

Co-authored-by: Tomasz Kajtoch <tomasz.kajtoch@elastic.co>
Co-authored-by: Tomasz Kajtoch <tomek@kajto.ch>
Co-authored-by: Cee Chen <549407+cee-chen@users.noreply.github.com>
Co-authored-by: Drew Tate <andrew.tate@elastic.co>
@breehall breehall deleted the color/complementary branch October 6, 2023 16:01
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.

Typo in the complementary palette
4 participants