Skip to content

Commit

Permalink
Merge branch 'main' into slorber/poc-rspack
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Oct 3, 2024
2 parents 097ed54 + 7f6472a commit 1c48869
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
node-version: lts/*
cache: yarn
- name: Track build size changes
uses: preactjs/compressed-size-action@f780fd104362cfce9e118f9198df2ee37d12946c # v2
uses: preactjs/compressed-size-action@6fa0e7ca017120c754863b31123c5ee2860fd434 # v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
build-script: build:website:fast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ This feature is experimental and might be subject to breaking API changes in the

## Importing Markdown {#importing-markdown}

You can use Markdown files as components and import them elsewhere, either in Markdown files or in React pages.
You can use Markdown files as components and import them elsewhere, either in Markdown files or in React pages. Each MDX file default-exports its page content as a React component. In the `import` statement, you can default-import this component with any name, but it must be capitalized following React's naming rules.

By convention, using the **`_` filename prefix** will not create any doc page and means the Markdown file is a **"partial"**, to be imported by other files.

Expand Down
6 changes: 6 additions & 0 deletions website/docs/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ Then, in the directory containing `package.json`, run your package manager's ins
npm install
```

:::tip

`npm install` may report several vulnerabilities and recommend running `npm audit` to address them. Typically, these reported vulnerabilities, such as RegExp DOS vulnerabilities, are harmless and can be safely ignored. Also read this article, which reflects our thinking: [npm audit: Broken by Design](https://overreacted.io/npm-audit-broken-by-design/).

:::

To check that the update occurred successfully, run:

```bash
Expand Down
9 changes: 6 additions & 3 deletions website/src/components/APITable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@ function APITableRow(
tabIndex={0}
ref={history.location.hash === anchor ? ref : undefined}
onClick={(e) => {
const isLinkClick =
(e.target as HTMLElement).tagName.toUpperCase() === 'A';
if (!isLinkClick) {
const isTDClick =
(e.target as HTMLElement).tagName.toUpperCase() === 'TD';
const hasSelectedText = !!window.getSelection()?.toString();

const shouldNavigate = isTDClick && !hasSelectedText;
if (shouldNavigate) {
history.push(anchor);
}
}}
Expand Down
4 changes: 4 additions & 0 deletions website/src/components/APITable/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@
cursor: pointer;
transition: box-shadow 0.2s;
}

.apiTable code {
cursor: text;
}
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14983,9 +14983,9 @@ rollup-plugin-terser@^7.0.0:
terser "^5.0.0"

rollup@^2.43.1:
version "2.79.1"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.1.tgz#bedee8faef7c9f93a2647ac0108748f497f081c7"
integrity sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==
version "2.79.2"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.2.tgz#f150e4a5db4b121a21a747d762f701e5e9f49090"
integrity sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==
optionalDependencies:
fsevents "~2.3.2"

Expand Down

0 comments on commit 1c48869

Please sign in to comment.