-
Notifications
You must be signed in to change notification settings - Fork 151
fix(presale): Fix Tickets page layout inconsistencies #1384
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
base: enext
Are you sure you want to change the base?
fix(presale): Fix Tickets page layout inconsistencies #1384
Conversation
Currently translated at 0.1% (3 of 4121 strings) Translation: eventyay/Eventyay Tickets Translate-URL: https://hosted.weblate.org/projects/open-event/eventyay-tickets/zh_Hant/
Currently translated at 0.2% (9 of 4121 strings) Translation: eventyay/Eventyay Tickets Translate-URL: https://hosted.weblate.org/projects/open-event/eventyay-tickets/zh_Hant/
Currently translated at 0.4% (18 of 4121 strings) Translation: eventyay/Eventyay Tickets Translate-URL: https://hosted.weblate.org/projects/open-event/eventyay-tickets/pl_INFORMAL/
Currently translated at 2.9% (123 of 4121 strings) Translation: eventyay/eventyay Translate-URL: https://hosted.weblate.org/projects/eventyay/eventyay/zh_Hant/
Currently translated at 2.9% (123 of 4121 strings) Translation: eventyay/eventyay Translate-URL: https://hosted.weblate.org/projects/eventyay/eventyay/zh_Hant/
The issue was caused by unconditional access to test_form.cleaned_data without checking if the form validation succeeded. When test_form.is_valid() returned False, accessing cleaned_data could raise AttributeError or return incomplete data, causing a 500 error. Solution: Added conditional check to only access cleaned_data when form is valid, otherwise use empty dict for initial values. This ensures the export page loads properly even when no valid GET parameters are provided. Changes: - Modified ExportMixin.exporters property in control/views/orders.py - Added validation check before accessing test_form.cleaned_data - Fallback to empty dict when form is invalid
Applied the same fix from issueto the organizer-level export
functionality. The ExportMixin in organizer.py had the identical issue
where test_form.cleaned_data was accessed without checking if the form
validation succeeded first.
This prevents potential HTTP 500 errors when accessing:
- /control/organizer/{organizer}/export/
Changes:
- Modified ExportMixin.exporters in control/views/organizer.py
- Added validation check before accessing test_form.cleaned_data
- Fallback to empty dict when form is invalid
- Use f-strings instead of string concatenation for better readability - Rename 'id' variable to 'identifier' to avoid shadowing builtin - Apply improvements to both orders.py and organizer.py Addresses Sourcery suggestions...
- Add JSON_FIELD_AVAILABLE setting based on database backend (postgresql = True) - Fix checkinlists exporter using old Event.items instead of Event.products - Resolves AttributeError when accessing export functionality
- Changed from if/else validation check to getattr() to preserve partial cleaned_data - This allows useful defaults even when form is partially invalid - Reverted unnecessary 'id' to 'identifier' rename in organizer.py - Renamed 'items' field to 'products' in checkinlists exporter for consistency - Updated form_data['items'] to form_data['products'] reference
…fossasia#1157) * Fix navigation button border radius inconsistency - Added border-radius: 0 to .header-nav class in orga/_layout.css - Makes Talk component navigation buttons match Tickets component style - Ensures consistent sharp corners across all navigation buttons - Maintains visual consistency throughout the platform Fixes fossasia#1156 * Add inset shadow on hover to match Tickets component - Added hover and active states with inset box-shadow - Matches the hover effect from btn-success in Tickets component - Uses rgba(0, 128, 0, 0.25) for green inset shadow * Fix navigation button active state to match Tickets component - Added .header-nav.active state with proper inset shadow - Fixed depth and consistency of hover, active, and current page states - Current page button now has same darker border effect as Tickets - All navigation buttons now have identical visual feedback * Improve CSS: use variables and remove important declarations * Fix CSS indentation formatting * Update app/eventyay/static/orga/css/_layout.css * Update app/eventyay/static/orga/css/_layout.css * Fix navigation buttons: sharp corners and inset shadow to match Tickets component --------- Co-authored-by: Mario Behling <mb@mariobehling.de>
* added template files * cfp * fix: Add options management interface for CFP custom fields * fix: Reorder form fields to match Pretalx * fix: Display Field required radio buttons inline with proper Bootstrap styling --------- Co-authored-by: Mario Behling <mb@mariobehling.de>
) Currently translated at 95.5% (5278 of 5522 strings) Translation: eventyay/eventyay Translate-URL: https://hosted.weblate.org/projects/eventyay/eventyay/de/ Co-authored-by: Andreas Kleinert <Andy.Kleinert@gmail.com>
…a#1340) * Add auto-expanding textarea * guard to prevent duplication * inline JS to separate static file and other modifications * initial text area & resize * viewport-size * initial height & scrollbar appears only inside textarea not on page --------- Co-authored-by: Mario Behling <mb@mariobehling.de>
* add logging * add defaults via migration
* wip * Add drag-and-drop reordering for talk question answer options * Add i18n support and null check for drag-and-drop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes layout inconsistencies on the Tickets page by improving the positioning and styling of the logo, user info, and language selector components.
- Logo alignment changed to flush left with auto-rounded corners removed
- User info and language selector aligned to the right edge using flexbox
- Language selector now has conditional rendering: inline display for ≤3 languages, dropdown for >3 languages
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
app/eventyay/static/pretixpresale/scss/custom.scss |
Added styles for inline language selector, dropdown language selector with visibility improvements, header content flexbox alignment, and responsive adjustments for mobile devices |
app/eventyay/static/pretixpresale/scss/_event.scss |
Changed logo alignment to left, removed border-radius styling, and added proper display properties |
app/eventyay/presale/templates/pretixpresale/fragment_login_status.html |
Simplified navigation structure by removing dynamic margin-right calculation and improving indentation |
app/eventyay/presale/templates/pretixpresale/event/base.html |
Restructured logo placement logic to work with different theme backgrounds, implemented conditional language selector rendering (dropdown vs inline), and duplicated login status inclusion in two sections |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <button class="btn btn-default dropdown-toggle language-selector" type="button" id="languageDropdown2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
| {% for l in languages %} | ||
| {% if l.code == request.LANGUAGE_CODE %} | ||
| {{ l.name_local }} | ||
| {% endif %} | ||
| {% endfor %} | ||
| <span class="caret"></span> | ||
| </button> |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The loop to find the current language name is inefficient. Consider using a filter or template variable to get the current language name directly instead of iterating through all languages every time the dropdown button is rendered. This creates O(n) operations for every page load when it should be O(1).
| <button class="btn btn-default dropdown-toggle language-selector" type="button" id="languageDropdown2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
| {% for l in languages %} | |
| {% if l.code == request.LANGUAGE_CODE %} | |
| {{ l.name_local }} | |
| {% endif %} | |
| {% endfor %} | |
| <span class="caret"></span> | |
| </button> | |
| {% with current_language=None %} | |
| {% for l in languages %} | |
| {% if l.code == request.LANGUAGE_CODE %} | |
| {% with current_language=l %} | |
| {% break %} | |
| {% endwith %} | |
| {% endif %} | |
| {% endfor %} | |
| <button class="btn btn-default dropdown-toggle language-selector" type="button" id="languageDropdown2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
| {{ current_language.name_local }} | |
| <span class="caret"></span> | |
| </button> | |
| {% endwith %} |
| // Language dropdown with high z-index for visibility | ||
| .language-dropdown { | ||
| display: inline-block; | ||
| z-index: 10000; |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The z-index value of 10000 is extremely high and could cause stacking context issues with other elements. Consider using a more reasonable value (e.g., 1000 or 100) unless there's a specific requirement for such a high value. The child dropdown menu's z-index of 10001 would then also be reduced proportionally.
| } | ||
|
|
||
| .options:hover { | ||
| color: #fff; |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The duplicate color value #fff on line 103 overrides the color set on line 102. The second declaration makes the first one redundant. Remove line 102 or line 103 to eliminate this duplication.
| color: #fff; |
| {% if event.settings.locales|length > 3 %} | ||
| <nav class="locales" aria-label="{% trans "select language" %}"> | ||
| <div class="dropdown language-dropdown"> | ||
| <button class="btn btn-default dropdown-toggle language-selector" type="button" id="languageDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dropdown button lacks accessible text for screen readers when the dropdown is expanded. While aria-expanded is set to "false" in the initial state, it should be dynamically updated to "true" when the dropdown opens. Consider adding JavaScript to toggle this attribute or ensure the Bootstrap dropdown plugin handles this automatically.
| {% if event.settings.locales|length > 3 %} | ||
| <nav class="locales" aria-label="{% trans "select language" %}"> | ||
| <div class="dropdown language-dropdown"> | ||
| <button class="btn btn-default dropdown-toggle language-selector" type="button" id="languageDropdown2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dropdown button lacks accessible text for screen readers when the dropdown is expanded. While aria-expanded is set to "false" in the initial state, it should be dynamically updated to "true" when the dropdown opens. Consider adding JavaScript to toggle this attribute or ensure the Bootstrap dropdown plugin handles this automatically.
| <button class="btn btn-default dropdown-toggle language-selector" type="button" id="languageDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
| {% for l in languages %} | ||
| {% if l.code == request.LANGUAGE_CODE %} | ||
| {{ l.name_local }} | ||
| {% endif %} | ||
| {% endfor %} | ||
| <span class="caret"></span> | ||
| </button> |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The loop to find the current language name is inefficient. Consider using a filter or template variable to get the current language name directly instead of iterating through all languages every time the dropdown button is rendered. This creates O(n) operations for every page load when it should be O(1).
| <button class="btn btn-default dropdown-toggle language-selector" type="button" id="languageDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
| {% for l in languages %} | |
| {% if l.code == request.LANGUAGE_CODE %} | |
| {{ l.name_local }} | |
| {% endif %} | |
| {% endfor %} | |
| <span class="caret"></span> | |
| </button> | |
| {% with current_language=None %} | |
| {% for l in languages %} | |
| {% if l.code == request.LANGUAGE_CODE %} | |
| {% with current_language=l %} | |
| {% break %} | |
| {% endwith %} | |
| {% endif %} | |
| {% endfor %} | |
| <button class="btn btn-default dropdown-toggle language-selector" type="button" id="languageDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
| {{ current_language.name_local }} | |
| <span class="caret"></span> | |
| </button> | |
| {% endwith %} |
- Remove rounded corners from logos (border-radius: 0) - Fix wallpaper to fill entire header area on tickets page - Ensure consistent styling between tickets and CFP pages - Remove borders from language selector dropdowns - Make backgrounds transparent to show wallpaper properly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
app/eventyay/presale/templates/pretixpresale/fragment_login_status.html
Outdated
Show resolved
Hide resolved
…atus.html Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Screen.Recording.2025-11-30.at.4.13.17.PM.mov
Fixes #1364