Skip to content

Commit

Permalink
chore(searchwithin): setup for deprecation (#2529)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdt2 authored Feb 16, 2024
1 parent 15ab077 commit ab72d5d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 23 deletions.
19 changes: 2 additions & 17 deletions components/searchwithin/metadata/searchwithin.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
name: Search within
status: Deprecated
deprecationNotice: Use a [search field](search.html) with a separate control to filter the search instead.
description: Override the width of the component where necessary.
sections:
- name: Migration Guide
description: |
### Component renamed
Since Dropdown is now known as Picker, Replace all `.spectrum-Dropdown*` classnames with `.spectrum-Picker*` and replace all `.spectrum-SearchWithin-dropdown` with `.spectrum-SearchWithin-picker`.
### New Picker markup
Combobox now uses `.spectrum-Picker`. See [Picker migration guide](picker.html#migrationguide) for details.
Since Picker's markup has changed, `.spectrum-SearchWithin-pickerTrigger` is no longer required.
### New ClearButton classes
The `.spectrum-SearchWithin-clearButton` class is now required on the `.spectrum-ClearButton` element.
### New ClearButton markup
See the [ClearButton migration guide](clearbutton.html#migrationguide) for more information.
examples:
- id: searchwithin
name: Standard
Expand Down
10 changes: 4 additions & 6 deletions components/searchwithin/stories/searchwithin.stories.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// Import the component markup template
import { Template } from "./template";
import { Template } from "@spectrum-css/searchwithin/stories/template.js";

import { default as PickerStories } from "@spectrum-css/picker/stories/picker.stories.js";
const ignoreProps = ["rootClass", "position", "isRounded"];

export default {
title: "Components/Search within",
description: "The Search within component is...",
title: "Deprecated/Search within",
component: "SearchWithin",
argTypes: {
...Object.entries(PickerStories.argTypes).reduce((acc, [key, value]) => {
Expand Down Expand Up @@ -36,10 +35,9 @@ export default {
actions: {
handles: [],
},
chromatic: { disable: true },
status: {
type: process.env.MIGRATED_PACKAGES.includes("searchwithin")
? "migrated"
: undefined,
type: "deprecated"
},
},
};
Expand Down

0 comments on commit ab72d5d

Please sign in to comment.