Skip to content

Commit

Permalink
docs(splitbutton): setup for deprecation (#2526)
Browse files Browse the repository at this point in the history
* update Storybook template to reference package instead of local
* remove Chromatic testing
* add deprecation tag to Storybook & in docs
  • Loading branch information
mdt2 authored Feb 15, 2024
1 parent 8ba9151 commit fc48d5d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Import the component markup template
import { Template } from "./template";
import { Template } from "@spectrum-css/splitbutton/stories/template.js";

export default {
title: "Components/Split button",
title: "Deprecated/Split button",
description:
"A split button surfaces an immediately invokable action via it's main button, as well as a list of alternative actions in its toggle-able menu overlay.",
component: "SplitButton",
Expand Down Expand Up @@ -52,10 +51,9 @@ export default {
actions: {
handles: [],
},
chromatic: { disable: true },
status: {
type: process.env.MIGRATED_PACKAGES.includes("splitbutton")
? "migrated"
: undefined,
type: "deprecated"
},
},
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: Split button
description: Instead of a single split button (now a deprecated component), use a button group to show any additional actions related to the most critical action. Reference [Spectrum documentation](https://spectrum.adobe.com/page/button-group/#Use-a-button-group-to-show-additional-actions) for more information.
sections:
- name: Migration Guide
description: |
### Remove focus-ring class
We've migrated away from the focus-ring class in favor of the native `:focus-visible` pseudo-class due to changes in browser support.
status: Deprecated
deprecationNotice: Use a <a href="buttongroup.html">button group</a> to show any additional actions related to the most critical action. Reference <a href="https://spectrum.corp.adobe.com/page/button-group/#Use-a-button-group-to-show-additional-actions">Spectrum documentation</a> for more information.
examples:
- id: splitbutton
name: CTA
Expand Down
4 changes: 2 additions & 2 deletions components/splitbutton/stories/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { classMap } from "lit/directives/class-map.js";

import { Template as Button } from "@spectrum-css/button/stories/template.js";

import "../index.css";
import "@spectrum-css/splitbutton/index.css";

export const Template = ({
rootClass = "spectrum-SplitButton",
Expand Down Expand Up @@ -48,7 +48,7 @@ export const Template = ({
variant,
size,
iconName: position === "right"
? iconName
? iconName
: typeof labelIconName != "undefined" ? labelIconName : undefined,
iconAfterLabel: true,
label: position === "right" ? undefined : label,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"@nx/devkit": "^18.0.4",
"@spectrum-css/expressvars": "^3.0.9",
"@spectrum-css/quickaction": "^3.1.1",
"@spectrum-css/splitbutton": "^8.1.1",
"@spectrum-css/vars": "^9.0.8",
"colors": "^1.4.0",
"conventional-changelog-spectrum": "^1.0.2",
Expand Down

0 comments on commit fc48d5d

Please sign in to comment.