fossasia / eventyay-talk

eventyay speakers and talks component
Apache License 2.0
1.48k stars 47 forks source link

Add options for personal schedule and favourite sessions for ticket holders #147

Closed odkhang closed 1 month ago

odkhang commented 1 month ago

This PR closes/references issue #136 . It does so by:

How has this been tested?

Checklist

Summary by Sourcery

This pull request adds functionality for users to save and manage their favorite talks, integrating this feature into the personal schedule. It also enhances the schedule view to show additional information about talks, such as the number of favorites and recording preferences.

odkhang commented 1 month ago

image

With this PR:

video PR: https://github.com/fossasia/eventyay-video/pull/176

sourcery-ai[bot] commented 1 month ago

Reviewer's Guide by Sourcery

This pull request introduces a new feature allowing users to save and manage their favourite talks. It adds a new model, serializer, and API endpoint to handle favourite talks, and updates the schedule view to display favourite counts and a do_not_record flag. The changes include new views, URL patterns, and database migrations.

File-Level Changes

Files Changes
src/pretalx/api/views/submission.py
src/pretalx/api/urls.py
Introduced a new API endpoint and view to handle user's favourite talks, including methods for retrieving and adding favourite talks.
src/pretalx/submission/models/submission.py
src/pretalx/submission/migrations/0076_submissionfavourite.py
Added a new model and serializer for storing and managing user's favourite talks, along with the necessary database migration.
src/pretalx/schedule/models/schedule.py Enhanced the schedule model to include favourite count and do_not_record flag in the schedule data.

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.
mariobehling commented 1 month ago
  1. Please follow the sourcery suggestions.
  2. Font color and circle size 2.a) Use the same white or black font color depending on the background for the number circle (same as for the time and date). 2.b) Reduce the diameter of the circle a bit.
  3. Please explain how this can work for the video component. Is there an API connection?
mariobehling commented 1 month ago

Right now it seems there is a mix of the previous "browser based" implementation and the current implementation.

  1. Anonymous users can still star a session, but it does not reflect the number. Expected is: Just like in the previous eventyay version a pop up should open "Please login to add a session to your personal schedule. - Not now. / Ok."
  2. If a logged in user stars a session and then accesses it with another browser the session is correctly starred. But: If a user unstars a session in a browser, the sessions is not unstarred in another browser. Expected: At least after a browser refresh it should show the correct session status.
mariobehling commented 1 month ago

Sorting does not work at all yet. I also see the option for different timezones. This is out of scope for this issue.

Screenshot from 2024-07-28 22-43-50

odkhang commented 1 month ago

Hi @mariobehling,

image

Font color and diameter of fav count is updated. And the pop will look like above, do you have any feedback?

  1. About the unstar issue, I open 2 browsers, if I unstar one, and refresh other brower, it also reflect the number, could you test again?

  2. About sort issue, currently we sort in a list session bucket (all sessions in each 30 minutes), with that way it will not break the layout as current layout showing a list bucket of sessions in 30 minutes.

odkhang commented 1 month ago

About the connection with Video.

From Talk:

From video:

mariobehling commented 1 month ago

Please resolve conflicts.