mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-12 05:48:57 +00:00
Revert Scalar to a previous version to mitigate an app crash happening when switching between API pages. (#2670)
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@gitbook/react-openapi': minor
|
||||
'gitbook': minor
|
||||
---
|
||||
|
||||
Revert scalar to 1.0.87 to mitigate an issue with ApiClientModalProvider
|
||||
@@ -78,6 +78,26 @@ Any published GitBook site can be accessed through your local development instan
|
||||
|
||||
All pull-requests will be tested against both visual and performances testing to prevent regressions.
|
||||
|
||||
## Fonts and Icons
|
||||
|
||||
GitBook Open uses fontawesome. During development, your local environment will use the free version. However, only the pro version will be accepted by CI. If you see the following error:
|
||||
|
||||
```
|
||||
The GitBook icon is missing. It indicates that the dependencies were installed without the correct font-awesome package. These changes have probably been persisted in the Bun lockfile. Read the README for more information.
|
||||
```
|
||||
|
||||
It means that you've changed the GBO dependencies and bundled in the free version. Only GitBook staff can help with this - if you're not on the GitBook team, please ping us in the PR and we'll help get things moving.
|
||||
|
||||
If you are GitBook staff, you'll need our NPM token in your local environment.
|
||||
|
||||
```
|
||||
.env.local
|
||||
|
||||
NPM_TOKEN_READONLY=xxx
|
||||
```
|
||||
|
||||
and then reinstall dependencies.
|
||||
|
||||
## Contributing
|
||||
|
||||
GitBook's rendering engine is fully open source and built on top of [Next.js](https://nextjs.org/). Head to our [contributing guide](https://github.com/GitbookIO/gitbook/blob/main/.github/CONTRIBUTING.md) to learn more about the workflow on adding your first Pull Request.
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
},
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "turbo run dev",
|
||||
"dev": "turbo run dev --ui=stream",
|
||||
"build": "turbo run build",
|
||||
"build:cloudflare": "turbo run build:cloudflare",
|
||||
"lint": "turbo run lint",
|
||||
|
||||
@@ -4,7 +4,8 @@ import { validateIconName } from './icons';
|
||||
it('should have the GitBook custom icon', () => {
|
||||
if (!validateIconName('gitbook')) {
|
||||
const message =
|
||||
'The GitBook icon is missing. It indicates that the dependencies were installed without the font-awesome custom package.';
|
||||
'The GitBook icon is missing. It indicates that the dependencies were installed without the correct font-awesome package. These changes have probably been persisted in the Bun lockfile. Read the README for more information.';
|
||||
|
||||
if (process.env.CI) {
|
||||
throw new Error(message);
|
||||
} else {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
},
|
||||
"version": "0.7.1",
|
||||
"dependencies": {
|
||||
"@scalar/api-client-react": "1.1.2",
|
||||
"@scalar/api-client-react": "1.0.87",
|
||||
"classnames": "^2.5.1",
|
||||
"flatted": "^3.2.9",
|
||||
"openapi-types": "^12.1.3",
|
||||
|
||||
@@ -29,7 +29,7 @@ export function OpenAPIOperation(props: {
|
||||
|
||||
return (
|
||||
<ApiClientModalProvider
|
||||
configuration={{ spec: { url: context.specUrl }, showSidebar: false }}
|
||||
configuration={{ spec: { url: context.specUrl } }}
|
||||
initialRequest={{ path: data.path, method: data.method }}
|
||||
>
|
||||
<div className={classNames('openapi-operation', className)}>
|
||||
|
||||
@@ -16,7 +16,7 @@ export function ScalarApiButton({ method, path }: { method: string; path: string
|
||||
<button
|
||||
className="scalar-activate-button"
|
||||
onClick={() => {
|
||||
client?.open({ method, path, _source: 'gitbook' });
|
||||
client?.open({ method, path });
|
||||
onOpenClient({ method, path });
|
||||
}}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user