Skip to content

Conversation

@Gagan-Ram
Copy link
Member

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

Fixes: #805

Summary by Sourcery

Ensure the account dropdown in the header is always rendered on the ticket sale page by removing the customer_accounts feature guard and standardize translation tags.

Bug Fixes:

  • Always display the login/account dropdown in the header by removing the customer_accounts setting check

Enhancements:

  • Replace {% trans %} with {% translate %} tags for consistency

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jul 25, 2025

Reviewer's Guide

This PR makes the dropdown menu on the ticket sale page always visible by removing the conditional guard around the login status fragment and standardizes translation tags from 'trans' to 'translate'.

Class diagram for login status fragment template changes

classDiagram
    class LoginStatusFragment {
        - organizer_name
        - event_slug
        - show_organizer_area
        - popover_toggle
        - base_path
        + login dropdown always visible
        + uses 'translate' tag
    }
Loading

File-Level Changes

Change Details Files
Always render the login status navigation by removing the customer_accounts check
  • Removed the wrapping ‘if request.organizer.settings.customer_accounts’ and its corresponding ‘endif’
  • Unindented the block so it’s no longer conditional
src/pretix/presale/templates/pretixpresale/fragment_login_status.html
Switch translation tags to use 'translate' instead of 'trans'
  • Replaced aria-label tag from ‘trans’ to ‘translate’
  • Replaced login text tag from ‘trans’ to ‘translate’
src/pretix/presale/templates/pretixpresale/fragment_login_status.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 and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `src/pretix/presale/templates/pretixpresale/fragment_login_status.html:5` </location>
<code_context>
-{% if request.organizer.settings.customer_accounts %}
</code_context>

<issue_to_address>
Removing the customer_accounts check may expose login UI in unintended contexts.

Without this check, the login UI will appear even when customer accounts are disabled, which may confuse users or display non-functional elements. Please confirm if this is intentional or if the UI should remain hidden in such cases.
</issue_to_address>

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.

@hongquan
Copy link
Member

This PR is implemented by bypassing this check:

if request.organizer.settings.customer_accounts

I don't know what what this setting is for. Let's merge this PR and revisit this setting later.

@mariobehling mariobehling merged commit f172468 into fossasia:development Jul 28, 2025
1 of 4 checks passed
Sak1012 pushed a commit to Sak1012/eventyay that referenced this pull request Oct 14, 2025
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.

Dropdown menu no longer available on ticket sales and other public pages

3 participants