Skip to content

Fix typescript conflict for initial state of table field "resource"#1150

Merged
gregorydlogan merged 1 commit intoopencast:mainfrom
Arnei:fix-main-typing
Mar 18, 2025
Merged

Fix typescript conflict for initial state of table field "resource"#1150
gregorydlogan merged 1 commit intoopencast:mainfrom
Arnei:fix-main-typing

Conversation

@Arnei
Copy link
Copy Markdown
Member

@Arnei Arnei commented Mar 13, 2025

Fixes #1149.
Fixes a typescript error that was caused by adding the empty string to a string enumeration. Should not change behaviour.

This patch fixes that removing the empty string from the type and fixing reason the empty string was introduced in the first place in a different manner (also see commit 28aa982).

This has the downside of forcing us to set "resource" to a concrete value, which is technically wrong.
However, I find this preferable to allowing "resource" to be undefined. It makes our typing tighter and easier to handle. Furthermore, "resource" must be set on table load anyway, so the technically wrong value gets overwritten asap.

How to test this

Can be tested as usual. Make sure checkboxes appear in the leftmost table column if they should, and not appear if they should not. Also make sure that tables look correctly when refreshing the page (although that might not be the case due to unrelated reasons which should be fixed by #1121).

Fixes opencast#1149.
Fixes a typescript error that was caused by adding the empty string
to a string enumeration.

This patch fixes that removing the empty string from the type
and fixing reason the empty string was introduced in the first place
in a different manner (also see commit 28aa982).

This has the downside of forcing us to set "resource" to a concrete
value, which is technically wrong.
However, I find this preferable to allowing "resource" to be undefined.
It makes our typing tighter and easier to handle. Furthermore,
"resource" must be set on table load anyway, so the technically wrong
value gets overwritten asap.
@Arnei Arnei added type:bug Something isn't working type:typing Add typing labels Mar 13, 2025
@github-actions
Copy link
Copy Markdown
Contributor

Use docker or podman to test this pull request locally.

Run test server using develop.opencast.org as backend:

podman run --rm -it -p 127.0.0.1:3000:3000 ghcr.io/opencast/opencast-admin-interface:pr-1150

Specify a different backend like stable.opencast.org:

podman run --rm -it -p 127.0.0.1:3000:3000 -e PROXY_TARGET=https://stable.opencast.org ghcr.io/opencast/opencast-admin-interface:pr-1150

It may take a few seconds for the interface to spin up.
It will then be available at http://127.0.0.1:3000.
For more options you can pass on to the proxy, take a look at the README.md.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request is deployed at test.admin-interface.opencast.org/1150/2025-03-13_11-31-03/ .
It might take a few minutes for it to become available.

@Arnei Arnei mentioned this pull request Mar 14, 2025
Copy link
Copy Markdown
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.

lgtm, the approach also makes sense imo. Checkboxes are well behaved in my testing.

@gregorydlogan gregorydlogan self-assigned this Mar 18, 2025
@gregorydlogan gregorydlogan merged commit 12c3c8e into opencast:main Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Something isn't working type:typing Add typing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Main does not build

3 participants