Skip to content

Commit

Permalink
chore: remove all yml processing and files
Browse files Browse the repository at this point in the history
  • Loading branch information
castastrophe committed Sep 17, 2024
1 parent bcb23a6 commit af4fc4c
Show file tree
Hide file tree
Showing 107 changed files with 8 additions and 25,548 deletions.
15 changes: 0 additions & 15 deletions .storybook/deprecated/cyclebutton/cyclebutton.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .storybook/deprecated/quickaction/quickaction.yml

This file was deleted.

104 changes: 0 additions & 104 deletions .storybook/deprecated/searchwithin/searchwithin.yml

This file was deleted.

76 changes: 0 additions & 76 deletions .storybook/deprecated/splitbutton/splitbutton.yml

This file was deleted.

9 changes: 2 additions & 7 deletions .storybook/guides/deprecation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,7 @@ Before removing the component from the codebase, we need to flag the component a
status: { type: "deprecated" }
},
```
3. Update the status of the component to `Deprecated` in the `*.yml` file. Add any additional migration notes to the `deprecationNotice` keyword. i.e.,
```yaml
name: Quick actions
status: Deprecated
deprecationNotice: Use an [action bar](actionbar.html) to allow users to perform actions on either a single or multiple items at the same time, instead.
```
3. Update the status of the component to `Deprecated` in the `*.mdx` file. Add any additional migration notes that were provided by the design team.
4. Commit these changes and open a pull request to the main branch. i.e., `git commit -m "chore(quickaction): prepare for deprecation"`.
5. Once the pull request is approved, merge the changes into the main branch and publish the update to the package registry.

Expand All @@ -58,7 +53,7 @@ At this point you can choose to either immediate move on to the next steps or gi
Once the deprecation notice has been communicated and the above steps completed, we can remove the component from the codebase safely without breaking local references.

1. Create a new folder with the component name in `.storybook/deprecated`, i.e., `.storybook/deprecated/quickaction`.
2. Copy `*.stories.js` and `metadata/*.yml` into the new folder (directly, not nested inside subfolders).
2. Copy `*.stories.js` and `*.mdx` into the new folder (directly, not nested inside subfolders).
3. Delete the package from the `components` directory.
4. Add the deprecated component's package and last version to the monorepo's root package.json. i.e., `"@spectrum-css/quickaction": "^3.1.1",`.
5. Reach out to one of the package maintainers to officially deprecate the package in the package registry with the provided deprecation notice from design. Do not try to run the deprecation command unless you know that you have publishing permissions on npm. i.e., `npm deprecate @spectrum-css/[email protected] "This package has been deprecated. Use an action bar to allow users to perform actions on either a single or multiple items at the same time, instead."`.
Expand Down
2 changes: 1 addition & 1 deletion .storybook/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"commands": [
"prettier --write --cache --log-level error --ignore-unknown --no-error-on-unmatched-pattern {projectRoot}/assets/*.css && stylelint --fix --cache --allow-empty-input {projectRoot}/assets/*.css",
"eslint --fix --cache --no-error-on-unmatched-pattern {projectRoot}/*.{js,json} {projectRoot}/**/*.js --ignore-pattern \"!.storybook/\"",
"prettier --write --cache --log-level error --ignore-unknown --no-error-on-unmatched-pattern {projectRoot}/*.{md,mdx} {projectRoot}/**/*.{yml,mdx}"
"prettier --write --cache --log-level error --ignore-unknown --no-error-on-unmatched-pattern {projectRoot}/*.{md,mdx} {projectRoot}/**/*.{md,mdx}"
]
}
},
Expand Down
6 changes: 3 additions & 3 deletions components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ Components are released on npm as `@spectrum-css/$COMPONENT`, where `$COMPONENT`
Each component has the following files:

- `index.css` - The scale-specific styles for the component: dimensions, layout, etc (these change between scales)
- `metadata/*.yml` - The markup examples and documentation for the component; also makes additional examples possible that appear separately in the site navigation.
- `themes/*.css` - The theme-specific styles for the component.
- `stories/*.mdx` - The examples and documentation for the component.
- `stories/*.stories.js` and `stories/template.js` - The storybook assets for rendering components in the Storybook tool and eventually to be used for visual regression testing.

## Editing an existing component

1. Run `gulp dev` in the root of the project to begin developing.
2. Edit `components/$COMPONENT/index.css` with dimensions and color properties. The documentation will live reload with your changes.
3. Edit the markup examples within `components/$COMPONENT/metadata/*.yml`. The documentation will live reload with your changes.
3. Edit the markup examples within `components/$COMPONENT/stories/*.mdx`. The documentation will live reload with your changes.

## Adding a new component

Expand All @@ -28,7 +28,7 @@ Each component has the following files:
5. Inside the `stories` directory you will find a `template.js` and an `*.stories.js` file.
- In the `*.stories.js` file, define the available knobs and properties for your component, as well as any standard variations you want to surface in [Storybook](https://storybook.js.org/docs/react/writing-stories/introduction).
- Update the `template.js` file with the markup, using [lit-html syntax](https://lit.dev/docs/templates/overview/) to adjust results based on the provided settings from the Storybook knobs.
6. Edit your `metadata/*.yml` to add markup examples for each of the variants of your component.
6. Edit your `stories/*.mdx` to add markup examples for each of the variants of your component.

Because we use scoped packages, before it can be published with Lerna, you must manually publish the new component as public:

Expand Down
Loading

0 comments on commit af4fc4c

Please sign in to comment.