Skip to content

fix: resolve icon inheritance and synchronize tooltip UI with GitHub native style#4

Merged
ImXiangYu merged 6 commits intomainfrom
dev
Mar 6, 2026
Merged

fix: resolve icon inheritance and synchronize tooltip UI with GitHub native style#4
ImXiangYu merged 6 commits intomainfrom
dev

Conversation

@ImXiangYu
Copy link
Copy Markdown
Owner

This PR addresses several visual inconsistencies and a bug where custom navigation buttons incorrectly inherited icons from their template sources. It also synchronizes the hotkey tooltip appearance with GitHub's native UI.

Key Changes

  • Fix Icon Inheritance: Updated src/navigation.js to explicitly clear existing <svg> icons when setting link text. This prevents custom buttons from incorrectly showing "fork" icons when cloned from repository breadcrumbs.
  • UI Synchronization: Refined tooltip and hotkey chord (shortcut) styles in src/styles.js to match GitHub's native Primer design:
    • Adaptive Colors: Switched to native CSS variables for better theme compatibility.
    • Refined Chords: Adjusted chord dimensions, font weight (400), and spacing to look more compact and professional.
    • Bug Fix: Explicitly disabled text-decoration and border on tooltip elements to eliminate unwanted connecting lines between keys.
    • Tactile Feel: Added subtle box-shadows to chords to simulate the native 3D button effect.
  • Build & Versioning: Bumped version from 0.1.33 to 0.1.38 and updated the compiled better-github-nav.user.js.

Verification

  • Confirmed custom buttons no longer display incorrect cloned icons.
  • Verified that the hotkey tooltip style is consistent with GitHub's native shortcut panel across different themes.

@ImXiangYu ImXiangYu merged commit 3d6c444 into main Mar 6, 2026
2 checks passed
@ImXiangYu ImXiangYu deleted the dev branch March 6, 2026 07:51
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.

1 participant