Skip to content

Conversation

Gagan-Ram
Copy link
Member

@Gagan-Ram Gagan-Ram commented Jul 29, 2025

Fixes: #807

Summary by Sourcery

Extract the event navigation menu into a reusable template fragment and include it in both the tickets index and order pages, ensuring consistent menu items across both views.

New Features:

  • Display the event navigation menu on the order page with links to schedule, sessions, speakers, tickets, and online event join

Enhancements:

  • Extract navigation markup into a new fragment_nav.html template and include it in index.html and order.html

Copy link
Contributor

sourcery-ai bot commented Jul 29, 2025

Reviewer's Guide

Refactor ticket page navigation by extracting the inlined menu into a reusable template fragment and including it on both the event index and order pages to eliminate duplication.

Class diagram for template structure after navigation menu refactor

classDiagram
    class index.html {
        +includes fragment_nav.html
    }
    class order.html {
        +includes fragment_nav.html
    }
    class fragment_nav.html {
        +navigation menu markup
    }
    index.html --> fragment_nav.html : includes
    order.html --> fragment_nav.html : includes
Loading

File-Level Changes

Change Details Files
Introduce a shared navigation fragment
  • Created fragment_nav.html containing the full menu structure with translation and load tags
  • Moved conditional schedule, sessions, speakers, tickets, and video join links into the fragment
src/pretix/presale/templates/pretixpresale/event/fragment_nav.html
Replace inlined menus with the new fragment
  • Removed hard-coded nav block from the event index template
  • Removed duplicate nav block from the order template
  • Added include statements for fragment_nav.html in both templates
src/pretix/presale/templates/pretixpresale/event/index.html
src/pretix/presale/templates/pretixpresale/event/order.html

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. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the 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 exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

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

Copy link
Contributor

@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 @Gagan-Ram - I've reviewed your changes - here's some feedback:

  • Ensure that you pass all required context variables (e.g. with_margin, is_video_plugin_enabled) into fragment_nav.html when including it so the navigation layout remains consistent.
  • The “Tickets” button in the new fragment lacks an href attribute—please confirm this is intentional or add the proper URL to maintain its functionality.
  • You’ve switched from using {% trans %} to {% translate %} in the fragment—consider standardizing on one for consistency across your templates.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Ensure that you pass all required context variables (e.g. with_margin, is_video_plugin_enabled) into fragment_nav.html when including it so the navigation layout remains consistent.
- The “Tickets” button in the new fragment lacks an href attribute—please confirm this is intentional or add the proper URL to maintain its functionality.
- You’ve switched from using {% trans %} to {% translate %} in the fragment—consider standardizing on one for consistency across your templates.

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
Copy link
Member

Please add a screenshot. Thanks

@mariobehling mariobehling requested a review from hongquan July 29, 2025 11:18
@Gagan-Ram
Copy link
Member Author

Gagan-Ram commented Jul 29, 2025

Please add a screenshot. Thanks

If you're able to see the menu items on the Tickets Shop page, then they should also be visible on the Order Tickets page.
Currently, I'm experiencing an issue on my local environment where the menu items are not appearing on the Shop page, even though the event schedule is published and the event is live.

Copy link
Contributor

@Saksham-Sirohi Saksham-Sirohi left a comment

Choose a reason for hiding this comment

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

@Gagan-Ram please add a video showcasing the changes

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.

On the tickets page add menu items and move join online event to right
3 participants