Skip to content

refactor(goal): remove deprecated config#1408

Merged
nickofthyme merged 5 commits intoelastic:masterfrom
nickofthyme:rm-goal-config
Dec 15, 2021
Merged

refactor(goal): remove deprecated config#1408
nickofthyme merged 5 commits intoelastic:masterfrom
nickofthyme:rm-goal-config

Conversation

@nickofthyme
Copy link
Collaborator

Summary

Removes deprecated config from goal charts. Finalizing changes from #1299.

BREAKING CHANGE

The GoalSpec.config prop is removed. All properties have been moved/renamed under new Theme.goal options with the following exceptions:

  • Config.margin is now controlled by Theme.chartMargins and is no longer a margin ratio as before.
  • Config.backgroundColor is now controlled by Theme.background.color, even though it's not yet used.
  • fontFamily moved into each respective label styles
  • angleStart and angleEnd are moved onto the GoalSpec as optional values.
  • sectorLineWidth, width and height all removed as they were never used.

Details

See #1299

Checklist

  • The proper chart type label has been added (e.g. :xy, :partition)
  • 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

@nickofthyme nickofthyme added breaking change :goal/gauge (old) Old Goal/Gauge chart related issues labels Sep 23, 2021
Copy link
Contributor

@monfera monfera left a comment

Choose a reason for hiding this comment

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

Nice code trimming 🥩

Copy link
Contributor

@rshen91 rshen91 left a comment

Choose a reason for hiding this comment

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

Woah! LGTM thanks for making these changes

@nickofthyme
Copy link
Collaborator Author

@elasticmachine merge upstream

@nickofthyme nickofthyme merged this pull request into elastic:master Dec 15, 2021
@nickofthyme nickofthyme deleted the rm-goal-config branch December 15, 2021 19:35
nickofthyme added a commit that referenced this pull request Dec 15, 2021
BREAKING CHANGE: The `GoalSpec.config` prop is removed. All properties have been moved/renamed under new `Theme.goal` options with the following exceptions:

- `Config.margin` is now controlled by `Theme.chartMargins` and is no longer a margin ratio as before.
- `Config.backgroundColor` is now controlled by `Theme.background.color`, even though it's not yet used.
- `fontFamily` moved into each respective label styles
- `angleStart` and `angleEnd` are moved onto the `GoalSpec` as optional values.
- `sectorLineWidth`, `width` and `height` all removed as they were never used.
nickofthyme pushed a commit that referenced this pull request Dec 17, 2021
# [41.0.0](v40.2.0...v41.0.0) (2021-12-17)

### Bug Fixes

* replace createRef with useRef in Functional Components. ([#1524](#1524)) ([9538417](9538417))

### Code Refactoring

* **goal:** remove deprecated config ([#1408](#1408)) ([312e31d](312e31d))

### Features

* **heatmap:** dark mode with theme controls ([#1406](#1406)) ([f29c8dd](f29c8dd))
* **legend:** custom legend width ([#1467](#1467)) ([51f50df](51f50df))

### BREAKING CHANGES

* **goal:** The `GoalSpec.config` prop is removed. All properties have been moved/renamed under new `Theme.goal` options with the following exceptions:

- `Config.margin` is now controlled by `Theme.chartMargins` and is no longer a margin ratio as before.
- `Config.backgroundColor` is now controlled by `Theme.background.color`, even though it's not yet used.
- `fontFamily` moved into each respective label styles
- `angleStart` and `angleEnd` are moved onto the `GoalSpec` as optional values.
- `sectorLineWidth`, `width` and `height` all removed as they were never used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change :goal/gauge (old) Old Goal/Gauge chart related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants