Skip to content

Update React to 19#287

Open
nmoskaleva wants to merge 6 commits intomasterfrom
update-react-to-19
Open

Update React to 19#287
nmoskaleva wants to merge 6 commits intomasterfrom
update-react-to-19

Conversation

@nmoskaleva
Copy link
Collaborator

@nmoskaleva nmoskaleva commented Feb 5, 2026

QA: Please verify that everything looks as expected, specifically the styles in the Signatures interactive tours.

@netlify
Copy link

netlify bot commented Feb 5, 2026

Deploy Preview for criipto-docs ready!

Name Link
🔨 Latest commit 432c263
🔍 Latest deploy log https://app.netlify.com/projects/criipto-docs/deploys/6989b212ca69880008822cc1
😎 Deploy Preview https://deploy-preview-287--criipto-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nmoskaleva nmoskaleva changed the title Update react to 19 Update React to 19 Feb 5, 2026
@nmoskaleva nmoskaleva marked this pull request as draft February 5, 2026 20:41
@nmoskaleva nmoskaleva force-pushed the update-react-to-19 branch 2 times, most recently from e002744 to d855079 Compare February 5, 2026 21:29
@nmoskaleva
Copy link
Collaborator Author

Looks like @sentry/gatsby doesn't support React 19 yet (10.38.0 is the latest version).
This branch works locally when installing with --legacy-peer-deps.

@nmoskaleva nmoskaleva force-pushed the update-react-to-19 branch 7 times, most recently from 9d13a69 to bcecc2d Compare February 6, 2026 22:51
@nmoskaleva nmoskaleva marked this pull request as ready for review February 6, 2026 22:53
import '@fontsource/ibm-plex-sans/600.css';
import '@fontsource/ibm-plex-sans/700.css';
import '@fontsource/ibm-plex-mono/400.css';
import 'graphiql/graphiql.min.css';
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved this import to global.css, otherwise the styles were not applied in the interactive tours.

Comment on lines +13 to 20
function base64ToArrayBuffer(base64: string): ArrayBuffer {
const binaryString = window.atob(base64);
const bytes = new Uint8Array(binaryString.length);
for (let i = 0; i < binaryString.length; i++){
bytes[i] = binaryString.charCodeAt(i);
}
return bytes;
return bytes.buffer;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TypeScript inferred the old Uint8Array as an invalid BufferSource.

@nmoskaleva nmoskaleva requested a review from mickhansen February 9, 2026 08:25
@mickhansen mickhansen requested a review from haysch February 9, 2026 08:27
isIduraBannerVisible: boolean;
onCloseBanner: () => void;
isIduraBannerVisible?: boolean;
onCloseBanner?: () => void;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit of an unrelated change, I know. But the two required props were causing a TS error in gatsby-browser.tsx which was changed in this PR, so I assumed it's acceptable. I'll move it to a separate commit.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nmoskaleva Of course acceptable, just good to document why, in a separate commit :)

@mickhansen
Copy link
Collaborator

mickhansen commented Feb 9, 2026

Schema explorer looks & behaves as expected.
Explorer looks & behaves as expected
Interactive tour looks & behaves as expected.
Docs look good in general.

Make isIduraBannerVisible and onCloseBanner optional to avoid TS errors when <DefaultLayout/> is used without the Idura banner.
@mickhansen
Copy link
Collaborator

@nmoskaleva
Copy link
Collaborator Author

@mickhansen just a sec, rebase didn't go exactly as I was hoping, but I know what's wrong.

bytes[i] = binaryString.charCodeAt(i);
}
return bytes;
return bytes.buffer;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this is required? subtle should support a typed array: https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/importKey

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also not sure why, but after updating to React 19, there is a build error without this change @mickhansen

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nmoskaleva What's the error? I don't see how React could influence the use of core browser APIs

Copy link
Collaborator Author

@nmoskaleva nmoskaleva Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No overload matches this call. Overload 1 of 2, '(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: readonly KeyUsage[]): Promise<...>', gave the following error. Argument of type '"raw"' is not assignable to parameter of type '"jwk"'. Overload 2 of 2, '(format: "raw" | "pkcs8" | "spki", keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<...>', gave the following error. Argument of type 'Uint8Array<ArrayBufferLike>' is not assignable to parameter of type 'BufferSource'. Type 'Uint8Array<ArrayBufferLike>' is not assignable to type 'ArrayBufferView<ArrayBuffer>'. Types of property 'buffer' are incompatible. Type 'ArrayBufferLike' is not assignable to type 'ArrayBuffer'. Type 'SharedArrayBuffer' is missing the following properties from type 'ArrayBuffer': resizable, resize, detached, transfer, transferToFixedLength

For some reason, the same error didn't appear in checks now. But when you noticed CI errors earlier today – it was due to the fact I lost this commit.
I see the error in my code editor now, and pretty sure it might appear again once other check errors are fixed... @mickhansen

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nmoskaleva Hmm OK, strange.

Copy link
Contributor

@haysch haysch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall docs look as expected.
Signatures explorer and schema still works as expected.
The available Signatures Interactive tour also looks and works as expected (an error in TSA server in test means I cannot complete the tour by closing the order).

… to ArrayBuffer

TypeScript inferred the old Uint8Array<ArrayBufferLike> as invalid BufferSource. Using ArrayBuffer fixes this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants