Skip to content

Conversation

@aliciacilmora
Copy link
Contributor

@aliciacilmora aliciacilmora commented Nov 29, 2025

Screencast.from.2025-11-29.23-31-21.mp4

Fixes #1363

Summary

Fixes a layout shift in the top navigation when hovering inactive menu items.

Problem

Hover states added a dotted bottom border only on hover, which changed the element height and caused the content below to shift.

Fix

Added a default transparent bottom border to all nav items to maintain consistent element height and prevent movement.

Testing

  • Verified hover behavior on all nav items
  • Ensured no vertical shift occurs
  • Confirmed consistent spacing across devices

Risk / Impact

Low — CSS-only change, isolated to header nav.

Summary by Sourcery

Prevent layout shift in the top navigation by standardizing nav item height with a default transparent bottom border.

Bug Fixes:

  • Fix vertical layout shift caused by hover-only bottom border on navigation items.

Enhancements:

  • Align navigation styling by adding a consistent transparent bottom border to all nav links to support hover underline effects.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Nov 29, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds a transparent bottom border to top navigation links to prevent layout shift when hovering, ensuring consistent link height and stable page layout.

State diagram for navigation link border behavior

stateDiagram-v2
  title Navigation_link_border_state_diagram

  [*] --> Idle

  state Idle {
    [*] --> Inactive
    Inactive: border_bottom_2px_solid_transparent
  }

  Idle --> Hover
  Hover: border_bottom_2px_solid_visible

  Hover --> Idle

  state Active {
    Active: border_bottom_2px_solid_visible
  }

  Idle --> Active
  Hover --> Active
  Active --> Idle
Loading

File-Level Changes

Change Details Files
Ensure nav links maintain consistent height and avoid vertical layout shift on hover by giving them a default transparent bottom border.
  • Add a 2px solid transparent bottom border to navigation link elements that previously only had a visible border on hover
  • Preserve existing padding and positioning while eliminating vertical movement when hover styles apply
app/eventyay/static/pretixpresale/scss/custom.scss

Possibly linked issues

  • #Bug: Hovering over inactive menu items on ticket page causes layout shift (text below moves down): PR adds a default transparent bottom border so hover doesn’t change height, fixing the layout shift bug.

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 and they look great!


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 fixes a navigation layout shift bug by adding a transparent bottom border to navigation items. When users hovered over inactive menu items, a dotted border was added only on hover, causing the element height to increase and content below to shift vertically. The fix pre-allocates space for the border by setting a transparent 2px bottom border on all navigation links, matching the 2px dotted border that appears on hover.

  • Added a default transparent 2px bottom border to #header-nav-bar a elements to reserve space and prevent layout shift on hover

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

@mariobehling mariobehling merged commit 0d41a22 into fossasia:enext Dec 1, 2025
1 of 2 checks passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in Eventyay Next Dec 1, 2025
Sak1012 pushed a commit to Sak1012/eventyay that referenced this pull request Dec 5, 2025
…rder (fossasia#1375)

Co-authored-by: Mario Behling <mb@mariobehling.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Bug: Hovering over inactive menu items on ticket page causes layout shift (text below moves down)

2 participants