Skip to content
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

Auto config video component #470

Merged

Conversation

odkhang
Copy link
Collaborator

@odkhang odkhang commented Dec 2, 2024

This PR resolved #465.

  • Add the is_video_creation field in the response for send_event_webhook to resolve issues related to enabling the video plugin for the talk project when the user selects is_video_creation during the event creation process in the ticket project.
  • Add the attendee permission field in the response for create_world to resolve issues related to granting automatic permission for accessing the video project.

Summary by Sourcery

Add support for video plugin activation and automate attendee permissions for video projects.

New Features:

  • Introduce the 'is_video_creation' field in the event webhook response to support video plugin activation during event creation.

Enhancements:

  • Add 'attendee' permission field in the create_world response to automate access permissions for the video project.

Copy link

sourcery-ai bot commented Dec 2, 2024

Reviewer's Guide by Sourcery

This PR implements automatic video component configuration by adding video-related fields to webhook responses and world creation. The changes enable automatic video plugin setup for talk events and handle attendee permissions for the video project.

Sequence diagram for event creation with video component

sequenceDiagram
    actor User
    participant EventForm
    participant WebhookService
    participant VideoService

    User->>EventForm: Fill event creation form
    EventForm->>WebhookService: send_event_webhook with is_video_creation
    WebhookService->>VideoService: Configure video plugin if is_video_creation
    VideoService-->>WebhookService: Acknowledge configuration
    WebhookService-->>EventForm: Webhook response
    EventForm-->>User: Event created with video component
Loading

Class diagram for updated event webhook and world creation

classDiagram
    class EventWebhook {
        +String locales
        +String user_email
        +String action
        +Boolean is_video_creation
    }

    class WorldCreation {
        +String title
        +String timezone
        +String locale
        +Map traits
    }

    EventWebhook : +is_video_creation
    WorldCreation : +traits
    note for EventWebhook "Added is_video_creation field"
    note for WorldCreation "Added traits field for attendee permissions"
Loading

File-Level Changes

Change Details Files
Added video creation flag to event webhook payload
  • Added is_video_creation field to the event dictionary payload
  • Propagated is_video_creation field from foundation data and event settings
src/pretix/eventyay_common/tasks.py
src/pretix/eventyay_common/views/event.py
Implemented automatic attendee permission configuration for video projects
  • Added traits dictionary with attendee permission in world creation payload
  • Generated unique attendee permission identifier using event slug
src/pretix/eventyay_common/tasks.py

Assessment against linked issues

Issue Objective Addressed Explanation
#465 Auto-enable video component in talk component
#465 Auto-fill talk link into video component for the schedule configuration The PR adds is_video_creation field but does not implement functionality to auto-fill talk links into the video component schedule
#465 Auto-fill correct traits for attendee role using event short form

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@odkhang odkhang marked this pull request as ready for review December 3, 2024 02:36
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @odkhang - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider moving the hardcoded 'eventyay-video-event-{}' format string to a configuration constant for better maintainability and flexibility
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@mariobehling mariobehling requested a review from hongquan December 5, 2024 11:40
@mariobehling mariobehling merged commit b55022c into fossasia:development Dec 6, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Eventyay Common | Auto config Video component
3 participants