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

feat(theme): move annotation default styles to Theme #2357

Merged
merged 6 commits into from
Mar 13, 2024

Conversation

nickofthyme
Copy link
Collaborator

@nickofthyme nickofthyme commented Mar 12, 2024

Summary

As part of the work to reclaim the charts theme from eui we need to adopt the line annotation styles defined here. These styles are dependent on the theme type so to adopt this in @elastic/charts we added lineAnnotation & rectAnnotation to the Theme.

The new defaults are used from the theme and ignore DEFAULT_ANNOTATION_LINE_STYLE and DEFAULT_ANNOTATION_RECT_STYLE. To use these old default please use the desired legacy theme export.

Details

image
  • moves default styles to theme under lineAnnotation & rectAnnotation
  • deprecated standalone default style exports (i.e. DEFAULT_ANNOTATION_LINE_STYLE and DEFAULT_ANNOTATION_RECT_STYLE)
  • updates default annotation colors per theme

Issues

related to #2069

Checklist

  • The proper chart type label has been added (e.g. :xy, :partition)
  • The proper feature labels have been added (e.g. :interactions, :axis)
  • All related issues have been linked (i.e. closes #123, fixes #123)
  • New public API exports have been added to packages/charts/src/index.ts
  • Unit tests have been added or updated to match the most common scenarios
  • The proper documentation and/or storybook story has been added or updated
  • Visual changes have been tested with light and dark themes

- moves default styles to theme under lineAnnotation & rectAnnotation
- deprecated standalone default style exports
- updates default annotation colors per theme
@nickofthyme nickofthyme added :annotation Annotation (line, rect, text) related issue :all Applies to all chart types :theme labels Mar 12, 2024
@nickofthyme nickofthyme changed the title feat(theme): move annotation default styles to Theme feat(theme): move annotation default styles to Theme Mar 12, 2024
@nickofthyme
Copy link
Collaborator Author

buildkite update screenshots

Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

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

Everything looks fine to me! Thanks

@nickofthyme

This comment was marked as resolved.

@nickofthyme nickofthyme enabled auto-merge (squash) March 13, 2024 16:33
@nickofthyme nickofthyme removed the request for review from gvnmagni March 13, 2024 16:34
@nickofthyme
Copy link
Collaborator Author

buildkite update screenshots

@nickofthyme nickofthyme merged commit fe19ae2 into elastic:main Mar 13, 2024
13 checks passed
@nickofthyme nickofthyme deleted the anno-line-themes branch March 13, 2024 17:43
nickofthyme pushed a commit that referenced this pull request Mar 13, 2024
# [64.1.0](v64.0.2...v64.1.0) (2024-03-13)

### Features

* **theme:** move annotation default styles to `Theme` ([#2357](#2357)) ([fe19ae2](fe19ae2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:all Applies to all chart types :annotation Annotation (line, rect, text) related issue :theme
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants