Skip to content

Conversation

@LukasKalbertodt
Copy link
Member

@LukasKalbertodt LukasKalbertodt commented Oct 2, 2025

This updates Studio to use React 19. See commit descriptions for additional information.

Test deployments: https://test.studio.opencast.org

It's very little code we have to write. `use-resize-observer` was just
used because of its ability to polyfill the feature. It was added in
2020 when support for ResizeObserver was still sparse. But by now all
important browsers support it for many years already, so there is no
need for a polyfill anymore.

The reason why it is removed now is that it has no React 19 support yet,
which I want to update to in upcoming commits.

This dep was added in a998398
It only requires minimal code and gets rid of a dependency. Main problem
with that dependency is that it did not support React 19 yet, which is
the reason for this commit.

The library had support for really old browsers, but since 2023, all
browsers support blocking via `preventDefault()`, so no need to support
other methods still (which are deprecated now anyway).

This helper function will likely be moved to appkit.
This includes an update to appkit 0.5, using its `useUnloadBlocker`.

This commit does not use any new React features, it just does the update
so that everything works. Figuring out whether code can be improved by
new features can be done later.
@gregorydlogan
Copy link
Member

I'm assuming this is safe and could be applied to all current (17.x+) versions of OC, but I'm thinking it should be in 18.x+ only given our release rules?

Speaking of which, I see I/we haven't made the branches. Will try and get this done shortly.

@LukasKalbertodt
Copy link
Member Author

In the past couple years, Studio was only updated in the OC stable branch. Only security issues are worth backporting to the legacy branch. This PR should not have any user-visible changes, so it can be stable branch or develop. 🤷

@LukasKalbertodt
Copy link
Member Author

You think we can still manage to get this into Opencast 19? This shouldn't change any user-observable things, but it's still a change that is nicer not to ship in a minor release.

@owi92 @Arnei maybe one of you still has time to review this?

Copy link
Contributor

@owi92 owi92 left a comment

Choose a reason for hiding this comment

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

Code changes lgtm. I did some tests to confirm that everything is still working (desktop only, firefox).

This should be fine to merge.

@LukasKalbertodt LukasKalbertodt merged commit 1c54bff into opencast:main Nov 19, 2025
2 checks passed
@LukasKalbertodt LukasKalbertodt deleted the react-19 branch November 19, 2025 13:49
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