-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add series management pages #1313
Open
owi92
wants to merge
13
commits into
elan-ev:next
Choose a base branch
from
owi92:series-details
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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
This comment has been minimized.
This comment has been minimized.
This pull request has conflicts ☹ |
@owi92 I like seeing the progress here! 😍 |
This pull request has conflicts ☹ |
0380207
to
f86eb3f
Compare
3 tasks
This pull request has conflicts ☹ |
1d7245d
to
e9085c7
Compare
08df3a5
to
a8b314e
Compare
This generalizes the `Nav` and `Details` code that was used for videos, and repurposes it for series as well. With these changes, it should also be fairly easy to add this for playlists later on.
a8b314e
to
a8213a0
Compare
d21fb03
to
3d6455c
Compare
8b9ce95
to
30e56a9
Compare
30e56a9
to
95667a2
Compare
This required a bunch of changes: - The `update_acl` endpoint which talks to Opencast was generalized to work for both events and series, as their acl `put` endpoints pretty much work the same. - The access page of events was refactored and most code is now usable for both events and series. This tries to walk the thin line between modularity and overspecialization by attempting to balance out reusablility and complexity, limiting both duplicated code and prop drilling.
This adds a somewhat generic function that can be used to send `update metadata` put requests to Opencast for both events and series, as their respective endpoints only differ in one string (i.e. `series` vs `events`). For now, the function is only used to update title and description, but it can be used for any kind of dublincore metadata.
This refactors the metadata form to be more generic. Again, it's a tradeoff between limiting duplication and making the code more complicated. I also changed the naming convention of the series/video details and access pages to use more specific names, which will hopefully be less confusing.
This repurposes the `delete` endpoint previously used by events, and basically mirrors everything done when an event is deleted. This means the series table is renamed to `all_series` and gets a field `tobiraDeletionTimestamp`, which is used to mark a series as deleted. The original series table is moved to a view. When a series is deleted in Tobira, the timestamp is saved and series marked as deleted, but still present in Opencast get a special entry in the `My series` table. Every other place uses the series view without deleted series. When the series is actually deleted in Opencast and removed from the DB with sync, the entry from the `My series` table also disappears.
This, once again, is a bunch of generalization to leverage the fact that we already have basically all that is needed for this. While that makes it sound relatively simple, this was still a lot of work, mostly to not just copy everything but factor out as much as possible and make it usable for both events and series, and possibly also playlists in the future. There are still some things that need ironing out: - There is a deserialization error where postgres complains about a null value - The translation/i18n doesn't seem to be working correctly for all cases
This page uses the `series_by_id` api, which doesn't use the new `thumbnailStack` field. It could, but that would need some additional mapping in backend and should then probably also be used in all other places that need a series thumbnail. That would have the added benefit of these thumbnails always having the same order everywhere. Right now, that's not given since the only place the `thumbnailStack` is used as of now orders them in backend by their creation date (ascending), which we don't do for the other occurences that are mapped in frontend.
So this is super annoying. The endpoint in opencast will start `republish metadata` workflows for each event in the series. This takes roughly 10 second **per video**. Not in parallel but.. in.. series (pun intended? idk). So long story short, it could take several minutes to return, at which point it probably just responds with a `503`. The series is still being deleted though, so I don't know how to handle that case. Anyway, this workaround will send the request, mark the series as deleted and then just return without waiting. If it fails, it will **eventually** become apparent, but until then it's just showing as `deletion pending`, or sth. Actually, depending on the configured interval, it will already show `deletion failed` after a couple of minutes or sooner, when the "deletion process" is still running in Opencast. So all in all a poor solution but idk what else to do here other than an Opencast rewrite™.
This could also be used for other purposes, but is currently only used for displaying a message on the "My series" table when a series gets deleted. The notification will clear when the user navigates away from the table. This commit also fixes the table layout on narrow screens. Previously, the table would squish the "Title" column and overlap it with the one right next to it. Now each column uses a fixed width on smaller screens and adds a scrollbar, it it gets too crammed.
95667a2
to
9b3556d
Compare
All this did was provide a timeout option and some states that weren't even used in all cases. That really wasn't worth the added complexity. The timeout was moved to the `SubmitButtonWithStatus` and when the states are really needed, they can be added in the parent component that uses them.
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.
Step 2 in adding proper series management.
Adds series details and acl pages, making sure all new and/or refactored components can also be used for playlists later on.
Based on #1311
Step 3 will then be more API related stuff, adding creation and content editing.
Edit: I added metadata editing here, and plan on also adding the delete function in this pull request. So, todos for this PR:
This is currently brokenNeed to fix'unwrapped an unloaded LazyLoad'
error with series thumbnail on details page.*@Reviewer (is that a real user??): Once again, this is unfortunately probably better to review file-by-file, though it might still be useful to read the commit messages.