Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project clean up #351

Merged
merged 11 commits into from
Mar 11, 2022
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ assignees: hawkticehurst

<!-- A clear and concise description of what you expected to happen. -->

### Current Behavior

<!-- Tell us what happens instead of the expected behavior. -->
<!-- If you are seeing an error, please include the full error message and stack trace. -->

### Screenshots

<!-- If applicable, add screenshots to help explain your problem. -->
Expand Down
10 changes: 9 additions & 1 deletion .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,18 @@ labels: enhancement
🔎 Please search existing issues to avoid creating duplicates.
-->

### Feature/component description
### Feature request

<!-- A clear and concise description of the feature or component you're requesting. -->

### Expected Behavior

<!-- Tell us how the feature should work. -->

### Current Behavior

<!-- Explain how the feature would alter/enhance current behavior. -->

### Use case

<!-- Please provide a use case to help us understand your request in context. -->
Expand Down
8 changes: 0 additions & 8 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,3 @@ This pull request resolves #
### Description of changes

<!-- Include a description of the proposed changes. -->

### Link to forked docs site

<!--
If component changes (especially visual changes) are contained in this PR, we ask that you provide a link to a publicly viewable version of the Storybook docs site so PR reviewers can see your changes without having to install and view your code locally.

Please see `CONTRIBUTING.md` for directions on how this can be done.
-->
2 changes: 1 addition & 1 deletion .storybook/customTheme.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {create} from '@storybook/theming/create';

export default create({
base: 'light',
base: 'dark',
hawkticehurst marked this conversation as resolved.
Show resolved Hide resolved
brandTitle: 'Webview UI Toolkit',
brandUrl: 'https://github.com/microsoft/vscode-webview-ui-toolkit',
});
12 changes: 2 additions & 10 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,14 @@ export const parameters = {
enableShortcuts: false,
},
docs: {
theme: themes.light,
theme: themes.dark,
},
backgrounds: {
default: 'dark',
values: [
{
name: 'light',
value: '#f9f9f9',
},
{
name: 'grey',
value: '#929396',
},
{
name: 'dark',
value: '#252526',
value: '#1e1e1e',
},
],
},
Expand Down
24 changes: 2 additions & 22 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ git checkout -b {branch-name}

### Development server

As you're working, you can view your changes by running the Storybook development server.
As you're working, you can test your changes in a VS Code extension development environment by running the following command and following the directions that it provides.

```
npm start
npm run test:webview
```

## Validate changes
Expand Down Expand Up @@ -95,26 +95,6 @@ You can now finally push your changes to GitHub.
git push origin {branch-name}
```

### Deploy forked docs site

You can also build and deploy the Storybook docs website to your forked repo's GitHub Pages for a live preview of your changes.

_Note: If you're working on visually oriented features or bug fixes we will ask for this link in your PR to view your work._

```
npm run deploy:docs
```

Once deployed, the site should be viewable at the following link: `https://{your-github-username}.github.io/vscode-webview-ui-toolkit/`

The first time you deploy the docs site, navigating to this link will likely result in a 401 error. This is because GitHub Pages defaults to private visibility. To change this:

- Navigate to the "Settings" page of your forked repo
- Click the "Pages" sidebar tab
- Find the "GitHub Pages visibility" dropdown settings option and change it to "Public"
- Complete the confirmation popup dialog
- The site should now be publicly viewable!

### Submit a pull request

Finally, submit a pull request to the [primary toolkit repository](https://github.com/microsoft/vscode-webview-ui-toolkit/compare) through the GitHub website.
Expand Down
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ Features of the library include:
- **Use any tech stack:** The library ships as a set of web components, meaning developers can use the toolkit no matter what tech stack (React, Vue, Svelte, etc.) their extension is built with.
- **Accessible out of the box:** All components ship with web standard compliant ARIA labels and keyboard navigation.

Note that this doesn't change our recommendation of [avoiding the use of webviews](https://code.visualstudio.com/api/references/extension-guidelines#webviews) in extensions unless you absolutely need them.

## Release

The Webview UI Toolkit is currently in a public preview with the goal of reaching `v1.0` sometime in Winter 2022.

## Getting started

Follow the [Getting Started Guide](./docs/getting-started.md).
Expand All @@ -46,6 +40,22 @@ Further documentation can be found in the following places:
- [Visual Studio Code Webview Guidelines](https://code.visualstudio.com/api/references/extension-guidelines#webviews)
- [Visual Studio Code Extension API Docs](https://code.visualstudio.com/api)

## A note on webview usage

Webviews are a powerful way to add custom functionality that is beyond what the VS Code API supports. They are fully customizable, which has historically meant that the responsibility of developing UI that aligns with the VS Code design language and follows our [webview guidelines](https://code.visualstudio.com/api/references/extension-guidelines#webviews) lies in the hands of extension authors.

The Webview UI Toolkit shifts _some_ of this responsibility away from extension developers by providing core components that make it easier to build higher quality webview UIs in VS Code.

With all this said, we still strongly encourage a careful review of whether your extension needs to use webviews or not before building. While webviews provide a great way to add custom functionality it often comes at the cost of performance and accessibility.

The core VS Code API provides a vast array of building blocks for highly performant, accessible, and tighly integrated extension experiences and we will generally encourage their usage before webviews. If you haven't already, feel free to check out this [overview of API capabilities](https://code.visualstudio.com/api/extension-capabilities/overview) to get an idea of what's possible.

Finally, if you are ever unsure if your extension should make use of webviews or not, please open an issue and we would be more than happy to give some feedback and guidance.

## Release

The Webview UI Toolkit is currently in a public preview with the goal of reaching `v1.0` sometime in Winter 2022.

## Contributing

See the [contributing](./CONTRIBUTING.md) documentation.
Expand Down