Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Blob view: bandaid selection coloring #60344

Merged
merged 1 commit into from
Feb 9, 2024
Merged

Conversation

camdencheek
Copy link
Member

@camdencheek camdencheek commented Feb 8, 2024

Codemirror applies its own styling for selections, and when the blob view is focused, that styling is higher precedence than the overrides we provide. More confusingly, sometimes (it's not deterministic) the codemirror styling does not respect the light/dark theme settings, which makes selection look very broken. It's still not clear to me why the theme variable is not being respected, but given our proximity to code freeze, this just adds an !important to our theme overrides to make it not feel super broken.

Slack thread

Before:
image

A capture of the CSS selector that was problematic:
image

Test plan

Visually checked that there are no more dark backgrounds and opened the console to double check that the !important was showing up and causing that style to apply at higher precedence than the built-in themes

@cla-bot cla-bot bot added the cla-signed label Feb 8, 2024
@camdencheek camdencheek requested review from a team and fkling February 8, 2024 22:48
@camdencheek camdencheek marked this pull request as ready for review February 8, 2024 22:49
@camdencheek camdencheek self-assigned this Feb 8, 2024
Copy link
Member

@keegancsmith keegancsmith left a comment

Choose a reason for hiding this comment

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

gonna approve since the description plus simplicity of the change seem legit and technically code freeze has started (but I will let this sneak in)

@keegancsmith keegancsmith merged commit 8d5e4a5 into main Feb 9, 2024
@keegancsmith keegancsmith deleted the cc/fix-selection-color branch February 9, 2024 08:28
sourcegraph-release-bot pushed a commit that referenced this pull request Feb 9, 2024
bandaid selection coloring in blob view

(cherry picked from commit 8d5e4a5)
keegancsmith pushed a commit that referenced this pull request Feb 9, 2024
Blob view: bandaid selection coloring (#60344)

bandaid selection coloring in blob view

(cherry picked from commit 8d5e4a5)

Co-authored-by: Camden Cheek <camden@ccheek.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants