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

chore: update relative paths #2125

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ They provide an unopinionated, white-label layer that can be extended to your ow

## Astro migration

Keep using `/docs` on the root level as we used it in the `master` branch. The documentation is copied into Astro related directories on `npm run start` and when when anything in `/docs` is updated.
- Keep using `/docs` on the root level as we used it in the `master` branch. The documentation is copied into Astro related directories on `npm run start` and when when anything in `/docs` is updated.
- Replace manually all references to assets in all `md` files so that we imply that the path is produced from the directory where the md file is located. F.e. `new URL('../src/wa-combobox/assets/obama.jpeg', import.meta.url).href;` should `new URL('./src/wa-combobox/assets/obama.jpeg', import.meta.url).href;`. Note double dot is replaced with one dot. See this PR for the reference.

### TODO

Expand All @@ -78,11 +79,10 @@ Keep using `/docs` on the root level as we used it in the `master` branch. The d
__mdjs-stories--use-cases.js:40 Uncaught TypeError: shadowRoot.getElementById is not a function
```

- Fix the error with [drawer page](http://localhost:4322/components/drawer). Relativly imported assets doesn't work correctly in some cases:
- Fix the error for `icon resolver`. See [components/icon](http://localhost:4322/components/icon) and [drawer page](http://localhost:4322/components/drawer):

```
lion/src/content/docs/components/drawer/overview.md":
Cannot find module ''../icon/assets/iconset-misc.js''
IconManager.js?v=8cca74f1:22 Uncaught Error: An icon resolver has already been registered for namespace: lion
```

- Navigate to the [combobox page](http://localhost:4322/components/combobox). See that loading assets like `assets/obama.jpeg`. The import
Expand Down
10 changes: 5 additions & 5 deletions docs/components/combobox/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ export const Github = () => html`

```js preview-story
export const Whatsapp = () => {
const obamaImgUrl = new URL('../src/wa-combobox/assets/obama.jpeg', import.meta.url).href;
const trumpImgUrl = new URL('../src/wa-combobox/assets/trump.jpeg', import.meta.url).href;
const bidenImgUrl = new URL('../src/wa-combobox/assets/biden.jpeg', import.meta.url).href;
const bushImgUrl = new URL('../src/wa-combobox/assets/bush.jpeg', import.meta.url).href;
const clintonImgUrl = new URL('../src/wa-combobox/assets/clinton.jpeg', import.meta.url).href;
const obamaImgUrl = new URL('./src/wa-combobox/assets/obama.jpeg', import.meta.url).href;
const trumpImgUrl = new URL('./src/wa-combobox/assets/trump.jpeg', import.meta.url).href;
const bidenImgUrl = new URL('./src/wa-combobox/assets/biden.jpeg', import.meta.url).href;
const bushImgUrl = new URL('./src/wa-combobox/assets/bush.jpeg', import.meta.url).href;
const clintonImgUrl = new URL('./src/wa-combobox/assets/clinton.jpeg', import.meta.url).href;

return html`
<wa-combobox name="combo" label="Filter chats">
Expand Down