-
Notifications
You must be signed in to change notification settings - Fork 47
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
Big project cleanup (use Typescript, move files around, update stuff, remove unused code, ...) #996
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We use Typescript in almost all of our other projects and think it offers great benefits. Thus we want to use it in Opencast Studio too. Renaming the files to use .jsx or .tsx (so that editors correctly highlight by default) was a plan anyway. There are still tons of type errors in the code. Those are fixed in the next commit(s).
The `ignoreTags` config is ignored when setting `ignoreEventsCondition`. Further, `ignoreEventsCondition` should return a boolean, which leads to a type error and I assume the returned `undefined` was always interpreted as `false`. But lastly, we likely just want the default behavior of the library. The current behavior already leads to a bug: typing 'd' inside the form fields at the end downloads the video.
It's pretty old and everyone can (and should) just upgrade to 14.1. The `window.AudioContext` is supported since 14.1.
The service worker was never installed/used. So let's remove it.
We were only using it for the test deployments. But our sentry server seems to be broken. Probably already for a long time. No one checked Studio Sentry for multiple years. And I dislike sending data without the users consent.
We stopped using crowdin quite a while back.
Less files at the root
We used constants before as then typos would be caught. But now we have typescript which also finds typos in strings.
This is necessary for it to work in proper React 18 (i.e. `createRoot`). We cannot yet use `createRoot` for other reasons.
This is... not great, but it brings us type safety and it does not really have an obvious disadvantage, apart from a silly name. See the comment in `theme.tsx` for more information.
This gets rid of the last strictNullCheck error
It still runs for the branches they push, so effectively the PRs will have a CI status displayed.
By the nature of this, this is awful to review. We knew from the beginning that this would not be reviewed. Before the next release it should be tested extensively to make sure this didn't introduce any bugs. But for now... merging. |
12 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Opencast Studio hasn't been worked on a ton over the past two years or so. Since then, we started two other projects internally (Tobira, Opencast Editor) and got more experience with React, Typescript and other things. This PR aims to bring the Studio codebase closer to our other projects to make future development easier and faster. This also includes just using more modern and idiomatic solutions.
The main things this PR does are:
noImplicitAny
is disabled as fixing all of those errors would have taken too much time (there are still roughly 60 errors).tsx
file extension: editors will now correctly pick syntax with JSX supportSee the commits for detailed information.
There are still quite a lot of things I'd like to do, but did not have the time for.These are collected here: #997