Skip to content

Fix docs about "listed" behavior #1211

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

Merged
merged 2 commits into from
Jul 12, 2024

Conversation

LukasKalbertodt
Copy link
Member

Text copied from the second commit:


Our docs described a behavior that was implemented differently. This
commit fixes this inconsistency. We discussed this in detail internally
and believe the suggested behavior (which already happened to be
implemented) is the most useful one for Tobira. An explanation of the
three most discuss-worthy points:

(1) Series do NOT become listed via a video-block of their videos:

It is fine that only the event is findable, especially since "series
title" is part of the event data in the search index, so you can find
that event via the series title. And then the series is only one click
away. So why not make the series findable directly as well? It's not
necessary for UX, and would be a lot more complicated
implementation-wise.

(2) Events do NOT become listed via video-blocks of other videos in
their series:

For one, that might be unexpected to some users, especially because
spooky action at a distance. But it also leads to user confusion
elsewhere: if it were findable, then the "manage my events" page for
that event should better also list the page responsible for that
under "referencing pages", but then users might only see another event
on that page, being confused. However, even if these events are not
findable via search, they are "reachable", namely by finding another
video in the series, and then clicking a couple of times. For that
reason we adjusted the phrasing of our "unlisted" note (which is still
hidden behind the experimental feature flag, so no user ever saw it
yet). The new phrasing promises a bit less.

(3) Events DO become listed via playlist-blocks of a playlist containing
them:

At first this seems like a bad idea as every user can add every event to
all playlists they have write access to (for example: their own). So
can every user make any event listed then? No: the playlist block still
needs to be added to a non-user page, which requires a privilege that
likely only few trusted users have. And if they have that privilege,
they can just as easily add a video block with that video directly, so
no one gets any additional powers for mischief. But wait: what if
someone has write access to a playlist that is already mounted on a
non-user page and they add a video there? Yes that is the other option
on how to make the video listed, however: they also need access to such
a playlist first. And note: even if we don't make the event findable
via a playlist block: the event could still be reached by clicking
around in the non-user pages! So it is already not hidden anymore. And
finally: to add a video to a playlist, that person needs to have the
ID (or a link) to that video in the first place. If they had malicious
intends of making the video public, they might as well just e-mail the
link around or something like that.

So in summary: while it first sounds a bit dangerous, thinking it
through shows that there are basically no way in which we give untrusted
users more power to do unintended things.

On the other hand, there are a few advantages of making events findable
via playlist block. To users, a playlist block looks basically like a
series block: the video with its thumbnail "is clearly on this page".
Having different behavior for both could be confusing. Further, we would
like to allow "video in context" pages, i.e. /path/to/realm/v/<id> for
videos only mentioned via playlist in that realm. We also want to show
a realm with a playlist block as a "referncing realm" in the "my videos"
section, and we shouldn't show the "unlisted" note in case a playlist
block exists for a video. With that, it's most consistent and easiest
to explain if playlist blocks make events findable.


Also, this is already the behavior in code! Only the docs were wrong
about this. So this change isn't even breaking, it's just a doc fix.

@LukasKalbertodt LukasKalbertodt added the changelog:admin Changes primarily for admins label Jul 12, 2024
@github-actions github-actions bot temporarily deployed to test-deployment-pr1211 July 12, 2024 08:52 Destroyed
@github-actions github-actions bot temporarily deployed to test-deployment-pr1211 July 12, 2024 12:38 Destroyed
@github-actions github-actions bot temporarily deployed to test-deployment-pr1211 July 12, 2024 13:49 Destroyed
@github-actions github-actions bot temporarily deployed to test-deployment-pr1211 July 12, 2024 13:53 Destroyed
Our docs described a behavior that was implemented differently. This
commit fixes this inconsistency. We discussed this in detail internally
and believe the suggested behavior (which already happened to be
implemented) is the most useful one for Tobira. An explanation of the
three most discuss-worthy points:

(1) Series do NOT become listed via a video-block of their videos:

It is fine that only the event is findable, especially since "series
title" is part of the event data in the search index, so you can find
that event via the series title. And then the series is only one click
away. So why not make the series findable directly as well? It's not
necessary for UX, and would be a lot more complicated
implementation-wise.

(2) Events do NOT become listed via video-blocks of other videos in
their series:

For one, that might be unexpected to some users, especially because
spooky action at a distance. But it also leads to user confusion
elsewhere: if it were findable, then the "manage my events" page for
that event should better also list the page responsible for that
under "referencing pages", but then users might only see another event
on that page, being confused. However, even if these events are not
findable via search, they are "reachable", namely by finding another
video in the series, and then clicking a couple of times. For that
reason we adjusted the phrasing of our "unlisted" note (which is still
hidden behind the experimental feature flag, so no user ever saw it
yet). The new phrasing promises a bit less.

(3) Events DO become listed via playlist-blocks of a playlist containing
them:

At first this seems like a bad idea as every user can add every event to
all playlists they have write access to (for example: their own). So
can every user make any event listed then? No: the playlist block still
needs to be added to a non-user page, which requires a privilege that
likely only few trusted users have. And if they have that privilege,
they can just as easily add a video block with that video directly, so
no one gets any additional powers for mischief. But wait: what if
someone has write access to a playlist that is already mounted on a
non-user page and they add a video there? Yes that is the other option
on how to make the video listed, however: they also need access to such
a playlist first. And note: even if we don't make the event findable
via a playlist block: the event could still be reached by clicking
around in the non-user pages! So it is already not hidden anymore. And
finally: to add a video to a playlist, that person needs to have the
ID (or a link) to that video in the first place. If they had malicious
intends of making the video public, they might as well just e-mail the
link around or something like that.

So in summary: while it first sounds a bit dangerous, thinking it
through shows that there are basically no way in which we give untrusted
users more power to do unintended things.

On the other hand, there are a few advantages of making events findable
via playlist block. To users, a playlist block looks basically like a
series block: the video with its thumbnail "is clearly on this page".
Having different behavior for both could be confusing. Further, we would
like to allow "video in context" pages, i.e. `/path/to/realm/v/<id>` for
videos only mentioned via playlist in that realm. We also want to show
a realm with a playlist block as a "referncing realm" in the "my videos"
section, and we shouldn't show the "unlisted" note in case a playlist
block exists for a video. With that, it's most consistent and easiest
to explain if playlist blocks make events findable.

---

Also, this is already the behavior in code! Only the docs were wrong
about this. So this change isn't even breaking, it's just a doc fix.
@owi92
Copy link
Member

owi92 commented Jul 12, 2024

👍

@owi92 owi92 merged commit c948340 into elan-ev:master Jul 12, 2024
5 checks passed
@LukasKalbertodt LukasKalbertodt deleted the fix-listed-behavior branch July 12, 2024 14:06
JulianKniephoff added a commit that referenced this pull request Aug 8, 2024
…er improvements (#1217)

See commits for more info. The main motivation was to fix the last
remaining spots disagreeing with #1211, as well as add trigger logic to
automatically queue playlists and their events for reindex. The latter
part is why this PR unblocks the next release.

But since there were some minor bugs as well, and the logic was spread
over many migrations, the easiest way to achieve this was to rewrite all
triggering logic. Now everything is in one file and, I think, simpler
and more future-proof. My hope is that with this PR, we won't have to
touch the trigger logic or search views anytime soon. I added more
fields to the search views and erred all triggers on the side of "queue
more often than necessary".

I also adjusted the unit tests checking this behavior and added new
ones. Finally, I used this opportunity to get rid of the SQL query in
`search::perform` by moving the event thumbnails into the series search
index directly. Adding the SQL query was just a quick'n'dirty solution
back then, since it would have required essentially this PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:admin Changes primarily for admins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants