Fix typescript conflict for initial state of table field "resource"#1150
Merged
gregorydlogan merged 1 commit intoopencast:mainfrom Mar 18, 2025
Merged
Fix typescript conflict for initial state of table field "resource"#1150gregorydlogan merged 1 commit intoopencast:mainfrom
gregorydlogan merged 1 commit intoopencast:mainfrom
Conversation
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.
Contributor
|
Use Run test server using develop.opencast.org as backend: Specify a different backend like stable.opencast.org: It may take a few seconds for the interface to spin up. |
Contributor
|
This pull request is deployed at test.admin-interface.opencast.org/1150/2025-03-13_11-31-03/ . |
Merged
owi92
approved these changes
Mar 17, 2025
Contributor
owi92
left a comment
There was a problem hiding this comment.
lgtm, the approach also makes sense imo. Checkboxes are well behaved in my testing.
This file contains hidden or 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
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.
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).