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

[Docs] Add wiki documentation for EUI deprecations #5218

Merged
merged 3 commits into from
Sep 28, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"**/*.tsx",
"**/*.js",
"**/*.jsx",
"**/*.md"
]
}
36 changes: 36 additions & 0 deletions wiki/deprecations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Deprecations

## General deprecation guidelines

- For all deprecations, we should retain functionality, but mark them in the EUI docs and add them to the [deprecation schedule issue](https://github.com/elastic/eui/issues/1469).
- EUI performs at-will releases, so our deprecation patterns are based on time rather than release number. We provide at least 3 months time to make upgrades, ideally 6.
- We try as often as possible to make this deprecations non-breaking and will only adjust semvar to major when we believe they would cause anything more than a minor visual break. Because of this, we will plan to follow through on deprecation quarterly to avoid creating lots of major bumps.

## Deprecation notices

### Sass

- When deprecating styles or classes, use `@warn` notices to spit output during the build.

### Javascript

- For JS, apply console errors on a case by case basis. We've received feedback these can be overly noisy and remove confidence in the end product.

## Documentation

### Component props

- Add prop documentation with `DEPRECATED` in bold, including instructions on what alternative (if any) to use. For example, [see this deprecation comment](https://github.com/elastic/eui/blob/79960490cd27e9f97c05a2bf58d33056d2c66a62/src/components/card/card.tsx#L127).
cee-chen marked this conversation as resolved.
Show resolved Hide resolved

### Entire components

- Add a badge to the documentation page indicating the component is set for deprecation, with an optional additional callout explaining why and what alternatives (if any) users have. For example, [see this component deprecation](https://github.com/elastic/eui/blob/312e2c48c7db62f435d1c65bf2011e31e55cbfa4/src-docs/src/views/accessibility/accessibility_example.js#L71-L91).

## Actual removal of features

When it comes to actually removing features:

- If your component, prop, or utility, is being used internally in EUI, ensure you've removed cases of it where possible prior to the actual deletion date.
- Optionally check for Kibana's usage of the deprecated functionality and contact the appropriate teams to let them know they should look into removing its usage as well as offering alternatives (if any).
cee-chen marked this conversation as resolved.
Show resolved Hide resolved

Ideally, when the final deprecation date listed in the schedule comes up, there should be little to no friction involved in simply deleting the entire feature from the codebase as both EUI and Kibana will already have moved off the deprecated feature.