Skip to content

Add series management pages#1313

Merged
LukasKalbertodt merged 16 commits intoelan-ev:nextfrom
owi92:series-details
Apr 14, 2025
Merged

Add series management pages#1313
LukasKalbertodt merged 16 commits intoelan-ev:nextfrom
owi92:series-details

Conversation

@owi92
Copy link
Copy Markdown
Member

@owi92 owi92 commented Jan 15, 2025

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.

Resolves #1366
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:

  • add delete function and UI (there are still some things to adjust)
    • investigate deserialization error (could not reproduce anymore)
    • fix translation/i18n
  • disable acl editing when series is not synced yet
  • list host realms
  • properly rebase this onto Add "My series" page #1311 again, but that is pending a review anyway so I'll do that last
    • This is currently broken Need to fix 'unwrapped an unloaded LazyLoad' error with series thumbnail on details page.*
    • * I fixed the above, but maybe we shoud make sure that each place that needs a series thumbnail uses the same event order for it.
  • Fix series deletion. I already did, but messed up and lost the fixed version during my rebase.

@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.

@owi92 owi92 changed the base branch from main to next January 15, 2025 10:38
@github-actions

This comment has been minimized.

@github-actions github-actions Bot temporarily deployed to test-deployment-pr1313 January 15, 2025 10:45 Destroyed
@github-actions

This comment was marked as resolved.

@github-actions github-actions Bot added the status:conflicts This PR has conflicts that need to be resolved label Jan 17, 2025
@github-actions github-actions Bot removed the status:conflicts This PR has conflicts that need to be resolved label Jan 21, 2025
@github-actions github-actions Bot temporarily deployed to test-deployment-pr1313 January 21, 2025 22:12 Destroyed
@dagraf
Copy link
Copy Markdown
Collaborator

dagraf commented Jan 22, 2025

@owi92 I like seeing the progress here! 😍

@owi92 owi92 added the changelog:user User facing changes label Jan 22, 2025
@github-actions

This comment was marked as resolved.

@github-actions github-actions Bot added the status:conflicts This PR has conflicts that need to be resolved label Jan 27, 2025
@github-actions github-actions Bot removed the status:conflicts This PR has conflicts that need to be resolved label Jan 27, 2025
@github-actions github-actions Bot temporarily deployed to test-deployment-pr1313 January 27, 2025 19:40 Destroyed
@owi92 owi92 force-pushed the series-details branch 2 times, most recently from 0380207 to f86eb3f Compare January 27, 2025 21:34
@github-actions github-actions Bot temporarily deployed to test-deployment-pr1313 January 27, 2025 21:37 Destroyed
@github-actions github-actions Bot temporarily deployed to test-deployment-pr1313 January 28, 2025 17:05 Destroyed
@owi92 owi92 mentioned this pull request Jan 28, 2025
3 tasks
@github-actions github-actions Bot temporarily deployed to test-deployment-pr1313 February 3, 2025 22:37 Destroyed
@github-actions github-actions Bot added the status:conflicts This PR has conflicts that need to be resolved label Feb 4, 2025
@github-actions

This comment was marked as resolved.

@github-actions github-actions Bot removed the status:conflicts This PR has conflicts that need to be resolved label Feb 5, 2025
@github-actions github-actions Bot temporarily deployed to test-deployment-pr1313 February 6, 2025 22:41 Destroyed
@github-actions github-actions Bot temporarily deployed to test-deployment-pr1313 February 10, 2025 10:45 Destroyed
@github-actions github-actions Bot temporarily deployed to test-deployment-pr1313 April 10, 2025 10:40 Destroyed
@github-actions github-actions Bot temporarily deployed to test-deployment-pr1313 April 10, 2025 11:11 Destroyed
owi92 added 10 commits April 10, 2025 16:42
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.
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.
These messages were nearly the same and a while a
generalization loses some specificity, that isn't
a big deal imo. It's not that helpful to be told
"changing ACL didn't work" instead of "This action
didn't work" when I just tried to change the ACL and
the error message is shown on that same page.
@github-actions github-actions Bot temporarily deployed to test-deployment-pr1313 April 10, 2025 21:01 Destroyed
@owi92
Copy link
Copy Markdown
Member Author

owi92 commented Apr 10, 2025

  • When changing series metadata, and clicking around, relay seems to retain old metadata. Clear store?

yes

  • Should the dates in the updated/created columns be relative? Or somehow be smarter? Like maybe "2 hours ago" and for things that are longer than X days ago, don't show the time? Right now, it's a lot of information there, that's hardly used. Of course, you want to have that information accessible somehow. See how we do it on the video page for example? So I find the datetimes in the columns a bit hard to parse at a glance. I think I'd personally something smarter that results in fewer numbers on screen.

not sure. I kinda prefer the exact dates without 30 tooltips, but using the RelativeDate component you refer to (adding/adjusting that component was actually one of my first Tobira PRs) is easy and I did just that, so you can see if that feels better. Note that it reads a little weird with items that have a creation date in the future or far in the past.
Edit: This is also somewhat related to #1395 and #1274. Looking at these issues gives me the impression that it might be better to stick with absolute dates for now.

  • In the series table, the description is not shown -> is that intentional?

no. I've been meaning to fix that for a while, thanks for the reminder.

  • We should really make the order in the thumbnail stack consistent :/ otherwise it's confusing

yes. But it's actually kind of annoying. Using the created order you added for the item table is simple on the details page, but not so much for the ones in search results. For that we'd need a new DB migration. For now I removed the afore mentioned ordering on the item table so all three places match again, but I'd rather prefer to keep and apply it in the other places. Let's briefly discuss on monday.

owi92 added 2 commits April 10, 2025 23:25
Instead of showing the exact date and time an item
was created and updated, this now show something simpler
like "3 days ago" or sth. The exact dates can still be
inspected as tooltips by hovering over the dates.
There was a mismatch between the order in thumbnail
stacks on the series table, where they were ordered
by their creation date, and their order in search results
and on the series details/acl pages.

Adapting the table order on the management pages is
simple but it's another thing with search results.
For this we would need to write a new db migration,
which is certainly possible but a little annoying.

So for now, this just removes the ordering on the
series table, even though I would rather prefer
to apply it in the other places. TBD.
@owi92 owi92 mentioned this pull request Apr 11, 2025
4 tasks
@github-actions github-actions Bot temporarily deployed to test-deployment-pr1313 April 11, 2025 10:19 Destroyed
@github-actions github-actions Bot temporarily deployed to test-deployment-pr1313 April 11, 2025 11:04 Destroyed
Copy link
Copy Markdown
Member

@LukasKalbertodt LukasKalbertodt left a comment

Choose a reason for hiding this comment

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

Lets get this beast merged :D

@LukasKalbertodt LukasKalbertodt merged commit f518846 into elan-ev:next Apr 14, 2025
8 checks passed
LukasKalbertodt added a commit that referenced this pull request Apr 30, 2025
Step 3 in adding features for proper series management.

This adds a new page and UI to create a series in Tobira and Opencast.
The UI allows setting title, description and ACL for the series.

Next steps:
- [x] adding/removing videos (#1365)
- [x] deleting series (done in #1313)
- [x] editing metadata (at least title, description) (done in #1313)


Based on #1313
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:user User facing changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants