Skip to content

Keep run sel visible on hover - #838

Merged
cevheri merged 1 commit into
libredb:mainfrom
Dharshini-RS03:run-sel-hover
Sep 15, 2026
Merged

cevheri merged 1 commit into
libredb:mainfrom
Dharshini-RS03:run-sel-hover

Conversation

@Dharshini-RS03

Copy link
Copy Markdown
Contributor

Description

Fixes the Run Sel button becoming blank when the mouse hovers over it.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test addition or update

Related Issue

Closes #829

Changes Made

  • Changed the Run Sel button from the ghost variant to the default variant.
  • Prevented ghost variant hover styles from conflicting with the Run Sel button styling.
  • Added a regression test to verify that ghost hover styles are not applied to the Run Sel button.

Testing

  • I have tested this locally
  • I have added/updated tests
  • All existing tests pass

Test Environment

  • LibreDB Studio Version:
  • Browser:
  • OS:
  • Node.js/Bun Version:
  • Database Type:

Checklist

  • My code follows the project's code style guidelines
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Additional Notes

Added a regression test for the Run Sel button hover styling. Targeted QueryEditor tests pass locally (105/105).

@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cevheri cevheri added the enhancement New feature or request label Sep 15, 2026
@cevheri
cevheri self-requested a review September 15, 2026 12:53
@cevheri

cevheri commented Sep 15, 2026

Copy link
Copy Markdown
Member

Thanks @Dharshini-RS03, this fixes #829.

I reproduced it on main before looking at the change. The blank button only shows up when the app is in the light theme and the OS or browser prefers dark. The ghost variant leaves dark:hover:bg-accent/50 on the button. Tailwind v4 resolves dark: from prefers-color-scheme, not from our .dark class, so on hover the background turns translucent white under white text.

With your branch, hovering gives #2b7fff with white text in all three cases: OS prefers dark, OS prefers light, and the dark theme. Your new test fails on main and passes here, so it catches the regression.

The mismatch between the media-based dark: variant and the class-based theme probably affects other components too. I will track that separately, so it does not need to block this PR.

@cevheri
cevheri merged commit 621d494 into libredb:main Sep 15, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Run Sel button goes blank when mouse point hovers over it

2 participants