Skip to content

Conversation

@vedansh-5
Copy link
Member

@vedansh-5 vedansh-5 commented Dec 8, 2025

Closes #1368
image
image
image

Changes

  • Updated pretixcontrol/event/index.html (Tickets Dashboard)
  • Updated eventyay_common/event/index.html (Common Dashboard)

Summary by Sourcery

Align event header hierarchy and styling across tickets, common, and organizer dashboards for consistent presentation of event name and date.

Bug Fixes:

  • Unify event header font size and styling between tickets/common dashboards and the organizer (talk) dashboard.

Enhancements:

  • Adjust event header HTML structure and muted date text styling to follow a consistent visual hierarchy across dashboards.

Signed-off-by: Vedansh Saini <77830698+vedansh-5@users.noreply.github.com>
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Dec 8, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Aligns the event header hierarchy, font styling, and spacing across the Tickets Dashboard, Common Dashboard, and Talk Dashboard to be consistent in size and appearance, especially for the event name and date/series label.

File-Level Changes

Change Details Files
Standardize event header markup and hierarchy on the Tickets Dashboard.
  • Replace top-level with a
    container while keeping the same id and class for styling compatibility.
  • Change the event title from an

    to an

    and wrap name and metadata in a container for better structure and alignment.

  • Move the event date/series text into a inside the title span and preserve the conditional display of series vs. date range.
  • Add a
    after the header block to create consistent spacing before the dashboard content.
app/eventyay/control/templates/pretixcontrol/event/index.html
Match event header styling on the Common Dashboard to the new hierarchy and text treatment.
  • Change the event title heading level from

    to

    for consistency with other dashboards.

  • Add Bootstrap-like text-muted and small classes to the around the date/series label to match the Tickets Dashboard styling.
app/eventyay/eventyay_common/templates/eventyay_common/event/index.html
Adjust the Talk Dashboard event date styling to visually align with the other dashboards.
  • Replace the wrapper around the event date range with a and an explicit inline font-size of 1.25rem for better visual balance with the event name heading.
app/eventyay/orga/templates/orga/event/dashboard.html

Assessment against linked issues

Issue Objective Addressed Explanation
#1368 Update the Tickets Dashboard event name header typography (font family, size, weight, line height, and spacing) to match the Talk Dashboard header.
#1368 Update the Common Dashboard event name header typography (font family, size, weight, line height, and spacing) to match the Talk Dashboard header.
#1368 Ensure the event name header alignment and spacing on Tickets and Common Dashboards visually match the Talk Dashboard across layouts.

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

  • Consider avoiding the new <br> for vertical spacing in pretixcontrol/event/index.html and instead rely on existing layout classes or CSS margins to keep spacing concerns out of the markup.
  • In orga/event/dashboard.html the inline style="font-size: 1.25rem;" on the date span diverges from the other dashboards; it would be more maintainable to reuse the same small/text-muted classes or a shared CSS class instead of hardcoded inline styles.
  • The change from <nav> to <div> for #event-nav in the control template reduces semantic clarity and also makes this template inconsistent with the common dashboard, which still uses <nav>; consider keeping a semantic <nav> for the header navigation across dashboards.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider avoiding the new `<br>` for vertical spacing in `pretixcontrol/event/index.html` and instead rely on existing layout classes or CSS margins to keep spacing concerns out of the markup.
- In `orga/event/dashboard.html` the inline `style="font-size: 1.25rem;"` on the date span diverges from the other dashboards; it would be more maintainable to reuse the same `small`/`text-muted` classes or a shared CSS class instead of hardcoded inline styles.
- The change from `<nav>` to `<div>` for `#event-nav` in the control template reduces semantic clarity and also makes this template inconsistent with the common dashboard, which still uses `<nav>`; consider keeping a semantic `<nav>` for the header navigation across dashboards.

## Individual Comments

### Comment 1
<location> `app/eventyay/control/templates/pretixcontrol/event/index.html:10-19` </location>
<code_context>
+    <div id="event-nav" class="header-nav">
</code_context>

<issue_to_address>
**issue (bug_risk):** Replacing the semantic <nav> landmark with a generic <div> may hurt accessibility and navigation structure.

The previous `<nav id="event-nav" class="header-nav">` exposed a navigation landmark that screen readers and some browser tools use for quick navigation. Switching to a `<div>` removes that semantic. Unless there’s a specific conflict (e.g., invalid nested `<nav>`), please keep `<nav>` or add an equivalent landmark such as `role="navigation"` so this remains accessible.
</issue_to_address>

### Comment 2
<location> `app/eventyay/control/templates/pretixcontrol/event/index.html:114` </location>
<code_context>
             {% include "pretixcontrol/event/fragment_subevent_choice_simple.html" %}
         </form>
     {% endif %}
+    <br>
     <div class="dashboard custom">
         {% if not request.event.has_subevents or subevent %}
</code_context>

<issue_to_address>
**suggestion:** Using a bare <br> for vertical spacing is brittle; layout is better handled via CSS.

Here it’s only adding visual spacing, which couples layout to markup and may break with responsive changes. Prefer handling this via CSS (e.g., margin on the surrounding container or a utility/spacing class) to keep structure and presentation separate.

Suggested implementation:

```
    {% endif %}
    <div class="dashboard custom mt-3">

```

1. Ensure that the `mt-3` class (or equivalent) exists and is appropriate in your CSS framework (it likely comes from Bootstrap or a project-specific utility set).
2. If `mt-3` is not available or the spacing needs tuning, either:
   - Adjust to a different existing margin utility (e.g., `mt-2`, `mt-4`), or
   - Define a custom class (e.g., `.dashboard-spacing { margin-top: 1rem; }`) and use `class="dashboard custom dashboard-spacing"` instead.
</issue_to_address>

### Comment 3
<location> `app/eventyay/orga/templates/orga/event/dashboard.html:32` </location>
<code_context>
             <span>
                 {{ request.event.name }}
-                <small class="text-muted small">{{ request.event.get_date_range_display }}</small>
+                <span class="text-muted" style="font-size: 1.25rem;">{{ request.event.get_date_range_display }}</span>
             </span>
         </h2>
</code_context>

<issue_to_address>
**suggestion:** Inline styling for font size makes the date display harder to maintain and inconsistent with the other templates.

This template diverges by using a `<span>` with inline `style="font-size: 1.25rem;"` instead of the existing `<small class="text-muted small">` pattern. Please either align with the `<small>` + Bootstrap classes used elsewhere or move the font size into a shared CSS class so future style changes stay consistent across dashboards.
</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.

Signed-off-by: Vedansh Saini <77830698+vedansh-5@users.noreply.github.com>
@vedansh-5
Copy link
Member Author

@mariobehling PTAL thanks!

Copy link
Contributor

Copilot AI left a 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 standardizes the event header display across three different dashboards (Tickets, Common, and Talk/Organizer) by matching font sizes and HTML structure. The goal is to achieve visual consistency in how event names and dates are displayed.

Key Changes:

  • Changed heading levels from <h1> to <h2> in Common and Tickets dashboards
  • Updated font styling for event names and dates
  • Modified HTML structure with additional wrapper elements

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
app/eventyay/orga/templates/orga/event/dashboard.html Added inline styles to control font sizes for event name (1.85rem) and date (1.25rem)
app/eventyay/eventyay_common/templates/eventyay_common/event/index.html Changed heading from <h1> to <h2> and added CSS classes for text styling
app/eventyay/control/templates/pretixcontrol/event/index.html Changed <nav> to <div>, heading from <h1> to <h2>, added <span> wrapper, and included CSS classes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<span style="font-size: 1.85rem;">
{{ request.event.name }}
<small class="text-muted small">{{ request.event.get_date_range_display }}</small>
<span class="text-muted" style="font-size: 1.25rem;">{{ request.event.get_date_range_display }}</span>
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

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

Using inline styles for font sizing is not a best practice and creates maintainability issues. Consider using CSS classes instead to maintain consistency with the other dashboard templates (eventyay_common/event/index.html and pretixcontrol/event/index.html) which use the text-muted and small classes. This would also make future styling changes easier to apply across all dashboards.

Suggested change
<span class="text-muted" style="font-size: 1.25rem;">{{ request.event.get_date_range_display }}</span>
<span class="text-muted small">{{ request.event.get_date_range_display }}</span>

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +28
<div id="event-nav" class="header-nav">
<div class="navigation">
<div class="navigation-title">
<h1>
{{ request.event.name }}
<small>
{% if request.event.has_subevents %}
<h2>
<span>
{{ request.event.name }}
<small class="text-muted small">
{% if request.event.has_subevents %}
{% trans "Event series" %}
{% else %}
{{ request.event.get_date_range_display }}
{% endif %}
</small>
</h1>
{% endif %}
</small>
</span>
</h2>
</div>
{% include "pretixcontrol/event/component_link.html" %}
</div>
</nav>
</div>
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

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

Changing the semantic <nav> element to a <div> reduces the accessibility and semantic meaning of the HTML. The <nav> element is important for screen readers and assistive technologies to identify navigation regions. If the styling is the concern, CSS should be adjusted instead of changing the semantic HTML element. Consider keeping <nav> and adjusting styles if needed.

Copilot uses AI. Check for mistakes.
Comment on lines +13 to +24
<h2>
<span>
{{ request.event.name }}
<small class="text-muted small">
{% if request.event.has_subevents %}
{% trans "Event series" %}
{% else %}
{{ request.event.get_date_range_display }}
{% endif %}
</small>
</h1>
{% endif %}
</small>
</span>
</h2>
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

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

The three dashboard templates now use inconsistent HTML structures to achieve the same visual goal:

  • orga/event/dashboard.html: Uses inline styles with specific rem values
  • eventyay_common/event/index.html: Uses CSS classes (text-muted small)
  • pretixcontrol/event/index.html: Uses CSS classes with an additional <span> wrapper

For better maintainability, all three templates should use the same structure and styling approach. Consider standardizing on CSS classes rather than inline styles.

Copilot uses AI. Check for mistakes.
{{ request.event.name }}
<small class="text-muted small">
{% if request.event.has_subevents %}
{% trans "Event series" %}
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

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

The indentation is inconsistent here. Line 18 uses only 12 spaces for indentation while the closing {% else %} on line 19 is properly indented. Line 18 should have consistent indentation with line 20.

Suggested change
{% trans "Event series" %}
{% trans "Event series" %}

Copilot uses AI. Check for mistakes.
Copy link
Member

@mariobehling mariobehling left a comment

Choose a reason for hiding this comment

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

@vedansh-5 Thank you! Please check AI reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Match event name header font and size on Tickets and Common Dashboard to Talk Dashboard

2 participants