Skip to content

Commit

Permalink
chore: prepare docs and other chores for v10
Browse files Browse the repository at this point in the history
  • Loading branch information
balzss committed Jul 31, 2024
1 parent 7a8f03a commit 920b034
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 19 deletions.
21 changes: 12 additions & 9 deletions docs/getting-started/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,34 @@ The following steps will create a React app that uses Instructure UI. Recommende
---
type: code
---

npm create vite@latest my-cool-app
```

During the interactive project generation phase, please choose React and either JavaScript or TypeScript as the project language. After you have installed the dependencies by running `npm install`, you can try it by running `npm run dev`.
During the interactive project generation phase, please choose React and either JavaScript or TypeScript as the project language. After you have installed the dependencies by running `npm install`, you can try it by running `npm run dev`.

##### Add InstUI dependencies to your `package.json`
##### Add InstUI dependencies to your `package.json`

We recommend that you add the `@instructure/ui` meta-package, this contains all of our UI components (substitute the version number with the latest one):

```md
---
type: code
---

{
...
"dependencies": {
...
"@instructure/ui": "^9"
}
...
"dependencies": {
...
"@instructure/ui": "^10"
}
}
```

Run `npm install`, so InstUI is downloaded to your `node_modules` folder and can be used.

##### Try the sample code
##### Try the sample code

Now you are ready to use InstUI, let's try it out. Replace the code in `App.js` with the following:

```js
Expand All @@ -60,7 +63,7 @@ export default App

What does this code do?

- [InstUISettingsProvider](#InstUISettingsProvider) allows to specify the text direction (default is the direction that the user's browser supplies) and the theme to your application. InstUI components require a theme to work, all components are themeable, and themes control their look and feel. There are 3 built-in themes: [`canvas`](#canvas), [`canvasHighContrast`](#canvas-high-contrast), [`instructure`](#instructure). The component examples seen throughout the documentation use the [canvas theme](#canvas) by default.
- [InstUISettingsProvider](#InstUISettingsProvider) allows to specify the text direction (default is the direction that the user's browser supplies) and the theme to your application. InstUI components require a theme to work, all components are themeable, and themes control their look and feel. There are 2 built-in themes: [`canvas`](#canvas) and [`canvasHighContrast`](#canvas-high-contrast). The component examples seen throughout the documentation use the [canvas theme](#canvas) by default.
- [Button](#Button) is an Instructure UI button component

Finally, run `npm run dev` to start up a basic development server.
Expand Down
1 change: 1 addition & 0 deletions packages/__docs__/_redirects
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/v6/* https://v6--preview-instui.netlify.app/:splat 200
/v7/* https://v7--preview-instui.netlify.app/:splat 200
/v8/* https://v8--preview-instui.netlify.app/:splat 200
/v9/* https://v9--preview-instui.netlify.app/:splat 200
6 changes: 3 additions & 3 deletions packages/__docs__/src/CodeSandboxButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ import 'moment/min/locales'
const dependencies = JSON.stringify(
{
dependencies: {
'@instructure/debounce': '^9',
'@instructure/ui': '^9',
'@instructure/ui-icons': '^9',
'@instructure/debounce': '^10',
'@instructure/ui': '^10',
'@instructure/ui-icons': '^10',
'lorem-ipsum': '^2.0.8',
react: '18.2.0',
'react-dom': '18.2.0',
Expand Down
6 changes: 3 additions & 3 deletions packages/__docs__/src/Hero/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ class Hero extends Component<HeroProps> {
</Flex>
<List isUnstyled margin="small none none">
<List.Item>
<Link href="#v9-upgrade-guide">Version 9 Upgrade Guide</Link>
<Link href="#v10-upgrade-guide">Version 10 Upgrade Guide</Link>
</List.Item>
<List.Item>
<Link href="#CHANGELOG">Change Log ({version})</Link>
Expand Down Expand Up @@ -477,11 +477,11 @@ class Hero extends Component<HeroProps> {
<Button
focusColor="inverse"
color="success"
href="#v9-upgrade-guide"
href="#v10-upgrade-guide"
size={bigScreen ? 'large' : 'medium'}
margin="0 x-small x-small 0"
>
9.0 Upgrade Guide
10.0 Upgrade Guide
</Button>
</View>
</View>
Expand Down
8 changes: 4 additions & 4 deletions packages/__docs__/versions.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"latestVersion": "v9",
"previousVersions": ["v8", "v7", "v6"],
"latestVersion": "v10",
"previousVersions": ["v9", "v8", "v7"],
"olderVersionsGitBranchMap": {
"v9": "v9_maintenance",
"v8": "v8_maintenance",
"v7": "v7_maintenance",
"v6": "v6_maintenance"
"v7": "v7_maintenance"
}
}

0 comments on commit 920b034

Please sign in to comment.