Skip to content

Commit

Permalink
docs(components): Adds and expands on deprecation. (#4226)
Browse files Browse the repository at this point in the history
* docs(components): Adds and expands on deprecation.

* Update packages/documentation-framework/templates/mdx.js

* List change.
  • Loading branch information
edonehoo authored Sep 19, 2024
1 parent 0681e9d commit 3935291
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/documentation-framework/templates/mdx.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ const MDXChildTemplate = ({
)}
{(deprecated || source === 'react-deprecated' || source === 'html-deprecated') && (
<InlineAlert title="Deprecated feature" variant="warning">
This implementation has been deprecated in favor of a newer implementation, and is no longer getting maintained or enhanced.
This component implementation has been deprecated in favor of a newer solution, and is no longer being maintained or enhanced.
{newImplementationLink && (
<React.Fragment>
You can find the <Link to={newImplementationLink}>updated implementation here</Link>.
</React.Fragment>
)}
{' '}To learn more about the process, visit our <Link to="/get-started/about-patternfly#patternfly-release-cadence">about page</Link>.
{' '}To learn more about deprecated components, visit <Link to="/get-started/about-patternfly#deprecated-components">about PatternFly.</Link>
</InlineAlert>
)}
{(template || source === 'react-template') && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,23 @@ If you are considering using a beta component, make sure to:
1. Check [the PatternFly Issues GitHub Project board](https://github.com/orgs/patternfly/projects/7/views/5) where we have created a view to categorize most issues by component. Browse any open issues for the beta component to determine how much more the beta component could evolve in the near future.


## Deprecated components

Deprecated components are components that are no longer recommended for use in PatternFly, either due to significant design or code changes. Once deprecated, a component is replaced with a newer implementation, and the previous implementation is no longer maintained or enhanced.

Deprecated components will typically be available to use until the next major release, after which no documentation will be included on the current release website.

![Onsite deprecated component messages](./img/deprecated-component.png)

Deprecation includes:

1. Components that are removed completely, in favor of a different component.
- The newly recommended component will be mentioned and linked on the deprecated component's page.
1. Components that still exist, but have significant implementation changes.
- The new implementation will populate the "React tab," while documentation for the deprecated implementation will be placed under a "React deprecated" tab. You will see an alert on both the React and React deprecated pages.

Deprecated components can be imported from @patternfly/react-core/deprecated.

<!-- This section is WIP ** we need to wait to see how this content gets included **
Flexibility
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"chip": {
"illustration": "./images/component-illustrations/chip.png",
"summary": "A <b>chip</b> is an annotation that displays a value or a set of attribute-value pairs that have been filtered within a data view."
"summary": "A <b>chip</b> is used to communicate a value or a set of attribute-value pairs within workflows that involve filtering a set of objects.<br /><br /><b>Note:</b> The chip component has been deprecated. Our new recommendation is to use <Link to='/components/label'>the label component</Link> instead."
},
"clipboard-copy": {
"illustration": "./images/component-illustrations/clipboard-copy.png",
Expand Down

0 comments on commit 3935291

Please sign in to comment.