Skip to content

Conversation

@prayag78
Copy link
Contributor

@prayag78 prayag78 commented Dec 6, 2025

Summary

This PR fixes the date styling on the Common Dashboard and Tickets Dashboard so it matches the Talk Dashboard.

Fixes: #1369

Untitled.video.mp4

Summary by Sourcery

Align sidebar and dashboard context/date styling across Common, Tickets, and Talk dashboards for a consistent look and feel.

Enhancements:

  • Standardize context header typography and spacing in Pretix control sidebars and headers.
  • Unify search/context bar layout and hover behavior in the orga sidebar navigation.
  • Introduce shared light body text and primary-hover color variables for consistent muted text and hover styling across dashboards.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Dec 6, 2025

Reviewer's Guide

Aligns sidebar context/date styling and hover behavior across Common, Tickets, and Talk dashboards by standardizing typography, spacing, colors, and heights, and adding shared variables for light body text and primary hover color.

Flow diagram for shared styling variables across dashboards

flowchart LR
  subgraph CSSVariables
    var_primary["--color-primary"]
    var_primary_hover["--color-primary-hover"]
    var_body_color_light["$body-color-light"]
  end

  subgraph Dashboards
    common_sidebar["Common dashboard sidebar context/date"]
    tickets_sidebar["Tickets dashboard sidebar context/date"]
    talk_sidebar["Talk dashboard sidebar context/date"]
  end

  var_primary --> var_primary_hover

  var_primary --> common_sidebar
  var_primary_hover --> common_sidebar
  var_body_color_light --> common_sidebar

  var_primary --> tickets_sidebar
  var_primary_hover --> tickets_sidebar
  var_body_color_light --> tickets_sidebar

  var_primary --> talk_sidebar
  var_body_color_light --> talk_sidebar
Loading

File-Level Changes

Change Details Files
Standardize sidebar context block layout (height, margins, line heights) in pretixcontrol sidebar for non-minimized and page-wrapper contexts.
  • Set fixed 56px height on sidebar context links for consistent row size
  • Reduced left margin of context text block and added 17px line-height to spans
  • Adjusted context-name to use semi-bold weight, 15px font size, and vertical spacing via top/bottom margins
  • Updated context-meta to use 11px font size, lighter body text color variable, and normal font weight instead of opacity
app/eventyay/static/pretixcontrol/scss/_sidebar.scss
Make Common Dashboard search/context header match Talk Dashboard styling, including hover states.
  • Prevent hover background on #nav-search-wrapper to keep background transparent
  • Ensure #nav-search remains a 56px-high horizontal flex row with adjusted padding
  • Add hover color change for search icon and context-name using new primary-hover color
  • Align text layout by adding 17px line-height, spacing around context-name, and top margin for context-meta
app/eventyay/static/orga/css/_layout.css
Align navbar context indicator styles (border, typography, and colors) with Talk Dashboard.
  • Reduce navbar bottom border thickness from 2px to 1px for a lighter divider
  • Remove hard-coded line-height from context-indicator and move to inner spans at 17px
  • Switch context-name to semi-bold 600 weight, 15px font size, and bottom spacing via padding/margin
  • Change context-meta to use 11px font, shared light body color, and normal weight instead of opacity
app/eventyay/static/pretixcontrol/scss/_sb-admin-2.scss
Introduce shared variables for hover primary color and light body text color to support consistent styling.
  • Add --color-primary-hover CSS variable using color-mix with primary and black
  • Define $body-color-light Sass variable as semi-opaque black for lighter text usages
app/eventyay/static/common/css/_variables.css
app/eventyay/static/pretixbase/scss/_variables.scss

Assessment against linked issues

Issue Objective Addressed Explanation
#1369 Match the event date typography (font family, size, weight, line height, and color) on the Common and Tickets Dashboards to the Talk Dashboard.
#1369 Align spacing and layout of the event name and date (including margins, line height, and container height) on the Common and Tickets Dashboards so the visual appearance matches the Talk Dashboard header.

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:

  • The context header typography and spacing rules are now duplicated across multiple selectors (.context-indicator, sidebar .content, and #nav-search); consider extracting a shared class or SCSS mixin so future style tweaks stay consistent in one place.
  • The new --color-primary-hover relies on color-mix, which still has limited support in some environments; if legacy browsers are in scope, consider adding a fallback hover color or a precomputed static value.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The context header typography and spacing rules are now duplicated across multiple selectors (`.context-indicator`, sidebar `.content`, and `#nav-search`); consider extracting a shared class or SCSS mixin so future style tweaks stay consistent in one place.
- The new `--color-primary-hover` relies on `color-mix`, which still has limited support in some environments; if legacy browsers are in scope, consider adding a fallback hover color or a precomputed static value.

## Individual Comments

### Comment 1
<location> `app/eventyay/static/orga/css/_layout.css:328-330` </location>
<code_context>
     color: var(--color-primary);
     height: 56px;

+    &:hover #search-context-icon,
+    &:hover #search-context-text .context-name {
+      color: var(--color-primary-hover);
+    }
+
</code_context>

<issue_to_address>
**suggestion:** Hover styling is applied, but focus-visible is not covered for keyboard navigation.

Keyboard users won’t get the same visual feedback, since these styles only apply on hover. Please also apply the updated color to `:focus-visible` (or at least `:focus`) on `#nav-search` so the behavior is accessible without a mouse.

Suggested implementation:

```
  #nav-search {
    padding: 8px 0 8px 4px;
    display: flex;
    flex-direction: row;
    color: var(--color-primary);
    height: 56px;

    &:hover #search-context-icon,
    &:focus-visible #search-context-icon,
    &:hover #search-context-text .context-name,
    &:focus-visible #search-context-text .context-name {
      color: var(--color-primary-hover);
    }

```

If there are existing `:hover` rules for `#search-context-icon` or `.context-name` elsewhere in this file, they can be cleaned up or aligned with this new combined `:hover` / `:focus-visible` styling to avoid duplication. Also ensure that `#nav-search` remains keyboard-focusable (e.g., it's a link/button or has appropriate `tabindex`) so the `:focus-visible` styles are actually reachable via keyboard navigation.
</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.

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 date and context styling across the Common, Tickets, and Talk dashboards by unifying typography, spacing, and color variables for sidebar context headers.

Key changes:

  • Replaced opacity: 0.7 with explicit color variables ($body-color-light and --color-text-lighter) for better maintainability
  • Standardized font weights from bold to 600 and unified line-heights to 17px across all context headers
  • Introduced --color-primary-hover variable for consistent hover state styling

Reviewed changes

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

Show a summary per file
File Description
app/eventyay/static/pretixcontrol/scss/_sidebar.scss Unified context header typography and spacing in sidebar for both normal and hover states
app/eventyay/static/pretixcontrol/scss/_sb-admin-2.scss Standardized context indicator styling and reduced border width from 2px to 1px
app/eventyay/static/pretixbase/scss/_variables.scss Added $body-color-light variable for consistent muted text color
app/eventyay/static/orga/css/_layout.css Updated search/context bar styling with consistent typography and added hover color effects
app/eventyay/static/common/css/_variables.css Introduced --color-primary-hover variable for unified hover state colors

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

Comment on lines +135 to +136
margin-top: 2px;
margin-bottom: 4px;
Copy link

Copilot AI Dec 6, 2025

Choose a reason for hiding this comment

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

Inconsistent spacing for .context-name: this location uses margin-top: 2px and margin-bottom: 4px, while the same styling in _sb-admin-2.scss (lines 204-205) and _layout.css (lines 363-364) uses padding-bottom: 2px and margin-bottom: 2px. This inconsistency may result in different visual spacing across dashboards, which contradicts the PR's goal of making date styles consistent. Consider using the same spacing values across all three implementations.

Suggested change
margin-top: 2px;
margin-bottom: 4px;
padding-bottom: 2px;
margin-bottom: 2px;

Copilot uses AI. Check for mistakes.
Comment on lines +381 to +382
margin-top: 2px;
margin-bottom: 4px;
Copy link

Copilot AI Dec 6, 2025

Choose a reason for hiding this comment

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

Inconsistent spacing for .context-name: this location uses margin-top: 2px and margin-bottom: 4px, while the same styling in _sb-admin-2.scss (lines 204-205) and _layout.css (lines 363-364) uses padding-bottom: 2px and margin-bottom: 2px. This inconsistency may result in different visual spacing across dashboards, which contradicts the PR's goal of making date styles consistent. Consider using the same spacing values across all three implementations.

Suggested change
margin-top: 2px;
margin-bottom: 4px;
padding-bottom: 2px;
margin-bottom: 2px;

Copilot uses AI. Check for mistakes.
Comment on lines +371 to 372
margin-top: 1px;
}
Copy link

Copilot AI Dec 6, 2025

Choose a reason for hiding this comment

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

Inconsistent spacing for .context-meta: this location includes margin-top: 1px, but the equivalent styling in _sidebar.scss (lines 139-142) and _sb-admin-2.scss (lines 207-210) does not include this property. For truly consistent styling across all dashboards, consider either adding this margin to all three implementations or removing it from this one.

Suggested change
margin-top: 1px;
}
}
}

Copilot uses AI. Check for mistakes.
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 date color, font, and spacing on Common and Tickets Dashboard to Talk Dashboard

1 participant