Skip to content

Commit c4f765c

Browse files
committed
chore: remove spectrum-config and update other docs
1 parent cb2bc7a commit c4f765c

File tree

4 files changed

+4
-260
lines changed

4 files changed

+4
-260
lines changed

README.md

+2-18
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,7 @@ This will scaffold your component's required architecture by prompting you for 2
4343

4444
_Note_ that your component name should be provided in kebab case and should relate as closely as possible to the Spectrum core naming.
4545

46-
? **Spectrum CSS package name (i.e. colorarea)**
47-
48-
You can find this information in the [Spectrum CSS GitHub project](https://github.com/adobe/spectrum-css) by finding the component package.json (i.e., `components/accordion/package.json`)
49-
50-
For additional information, please see the [generating components documentation](https://opensource.adobe.com/spectrum-web-components/guides/generating-components) and capturing the value of the package name: `"name": "@spectrum-css/accordion"`. In this example, that name is `accordion`. _Note_ that the project scope `@spectrum-css` is stripped out of the response.
46+
For additional information, please see the [generating components documentation](https://opensource.adobe.com/spectrum-web-components/guides/generating-components)
5147

5248
# Storybook
5349

@@ -77,24 +73,11 @@ In the case that you'd like to serve and test a static build of the documentatio
7773
yarn docs:build
7874
```
7975

80-
# Updating Spectrum CSS
81-
82-
There are two mechanisms for broadly updating SWC's Spectrum CSS dependencies:
83-
84-
- `yarn update:spectrum-css` brings all Spectrum CSS dependencies to 'latest'
85-
- `yarn update:spectrum-css:nonbreaking` brings them to the latest minor or patch version
86-
87-
We aim to keep Spectrum CSS as current as possible, to track the Spectrum design system closely.
88-
The `:nonbreaking` variant lets us release patch updates quickly in cases where more work is required to be compatible with 'latest.'
89-
9076
# Advanced development
9177

9278
There are several commands that can be useful in specific scenarios:
9379

9480
- `yarn build:clear-cache` to remove previously created artifacts of the `tsc build` process.
95-
- `yarn spectrum-vars` to ensure that theme files are up-to-date.
96-
- `yarn process-icons` to make sure that the most recent icons are included.
97-
- `yarn process-spectrum` to process the spectrum CSS style sources into the individual packages.
9881
- `yarn build` to make sure the available JS has been built from the current TS source.
9982

10083
## Linting
@@ -187,6 +170,7 @@ There is extended documentation on adding a new component to the library in the
187170
- new-component-name.ts
188171
- spectrum-config.js
189172
- spectrum-new-component-name.css
173+
- new-component-name-overrides.css
190174
- stories
191175
- new-component-name.stories.ts
192176
- test

STYLING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ We will try to keep the concerns separate for the component styling and so depen
2020

2121
## Global styling (WIP)
2222

23-
SWC project uses styles package to manage the global css variables and styles for all three themes. The styles package can be found in `tools/styles`.
23+
SWC project uses styles package to manage the global css tokens for all three themes. The styles package can be found in `tools/styles`.
2424

25-
Hopefully, we'd never need to edit the styles package directly as these files are build from the processing of tokens package in the spectrum-css project.
25+
Hopefully, we'd never need to edit the styles package directly as these files were built from the processing of tokens package in the spectrum-css project before the cutoff.

projects/documentation/content/guides/generating-components.md

-9
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@ The fastest way to get started with creating a new component is to generate it f
1313
$ yarn new-package
1414

1515
? SWC package name (i.e. color-area)
16-
? Spectrum CSS package name (i.e. colorarea)
1716
```
1817

19-
In response to the prompt above, the package name should be the kebab case version of the Spectrum CSS pattern that you are looking to add to the repo. That is, the `SpectrumPattern` that you want to create should be represented as `spectrum-pattern` in your response. From here, the command generates a new package for your pattern with the following file structure in the `/packages` directory:
20-
2118
```
2219
> spectrum-pattern
2320
> src/
@@ -37,8 +34,6 @@ In response to the prompt above, the package name should be the kebab case versi
3734
package.json
3835
```
3936

40-
From here, peek into the `package.json` file and ensure the "devDependency" of `@spectrum-css/spectrumpattern` (replacing "spectrumpattern" with the pattern you're implementing, such as "badge" or "tooltip") listed there is of the most current version.
41-
4237
Outside of your new package, you will need to manually add information about your new package to the `tsconfig-all.json` and `tsconfig-react-wrapper.json` files, as well as the `bundle` package:
4338

4439
Open `tsconfig-all.json`, find "references", and add an entry for your package (`{ "path": "packages/spectrum-pattern" }`) alphabetically (replacing "spectrum-pattern" with the pattern you're implementing, such as "action-button" or "progress-bar"). The `tsconfig-all.json` config is used to build types for the project in parallel with the JS build that is handled outside of `tsc`. This will ensure that the types for your new package are available throughout the library, include at demonstration and test time.
@@ -53,10 +48,6 @@ Include a listing for your package in `bundle/elements.ts` and `bundle/src/index
5348

5449
Finally, run `yarn` in your terminal. This will grab any newly-added packages, as well as to ensure that you have the provided CSS processed for use in your component. You can now see your component in the Storybook, using the command `yarn storybook`, or test its functionality via `yarn test`.
5550

56-
The next place to look is in `node_modules/@spectrum-css/spectrumpattern/metadata/spectrumpattern.yml`. Here, you will find complete Spectrum CSS’s HTML representation of the many states, variants, and capabilities offered by the pattern that you are working with. The content of this file is also found on the <sp-link href="https://opensource.adobe.com/spectrum-css" target="_blank">Spectrum CSS documentation site</sp-link> under the name of the pattern you’re leveraging. Following this as a guide while you implement this component ensures that you will fulfill the expected features of this pattern.
57-
58-
Now that you have this scaffold as a base, check out <sp-link href="guides/developing-components">these instructions</sp-link> on working with web components in general, and the <sp-link href="guides/spectrum-config">annotated `spectrum-config.js`</sp-link> file, which outlines how to translate the Spectrum CSS source into shadow DOM-optimized CSS. You are well on your way to adding a new component package to the project.
59-
6051
If you run into any issues with the instructions above, or the ones linked across this documentation site, please feel free to <sp-link href="https://github.com/adobe/spectrum-web-components/discussions" target="_blank">raise questions</sp-link> or <sp-link href="https://github.com/adobe/spectrum-web-components/issues" target="_blank">issues</sp-link> on GitHub. You can do this either by creating a brand new issue when it specifically relates to the process of generating a component, or by leaving a comment on an already-created issue for a specific pattern when it concerns bringing that component to life.
6152

6253
Thanks for stopping by. We look forward to your contribution!

projects/documentation/content/guides/spectrum-config.md

-231
This file was deleted.

0 commit comments

Comments
 (0)