[COMPASS-6910] compass-shell selection color invisible Created: 09/Jun/23  Updated: 29/Oct/23  Resolved: 13/Jun/23

Status: Closed
Project: Compass
Component/s: Editor
Affects Version/s: None
Fix Version/s: 1.38.0

Type: Bug Priority: Minor - P4
Reporter: Yuval Weizman Assignee: Rhys Howell
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS:
node.js / npm versions:
Additional info:


Story Points: 1
Documentation Changes: Not Needed
Sprint: Iteration Dreadnoughtus

 Description   

In the compass-shell component, text selection color has not enough contrast compared to the background color when the editor is in focus, not sure whether this is intentional or a bug.

The text selection color is: #233 while the background color is: #112733 (gray.dark4)

I have tried to look where the selection color is defined but couldn't find within the compass repo (maybe in codemirror?).

Anyway, it seems that in compass-editor/json-editor.tsx there is a definition for the selection color, which provides a good contrast, but that is only active when the shell is not in focus, a possible fix would be to add this rule in getStylesForTheme:

'&.cm-focused .cm-selectionBackground': {
    background: editorPalette[theme].selectionBackgroundColor
}, 

 

Thanks.

 



 Comments   
Comment by Githook User [ 16/Jun/23 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: fix(compass-editors): editor darkmode background selection color COMPASS-6910 (#4519)
Branch: activity-telemetry
https://github.com/mongodb-js/compass/commit/58b07e3b9faef89f8f737552ca57d6db6e0ea503

Comment by Githook User [ 16/Jun/23 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: fix(compass-editors): editor darkmode background selection color COMPASS-6910 (#4519)
Branch: compass-6835-massive-n-of-collections-signal
https://github.com/mongodb-js/compass/commit/58b07e3b9faef89f8f737552ca57d6db6e0ea503

Comment by Githook User [ 16/Jun/23 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: fix(compass-editors): editor darkmode background selection color COMPASS-6910 (#4519)
Branch: compass-6832-insight-unindexed-query
https://github.com/mongodb-js/compass/commit/58b07e3b9faef89f8f737552ca57d6db6e0ea503

Comment by Githook User [ 15/Jun/23 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: fix(compass-editors): editor darkmode background selection color COMPASS-6910 (#4519)
Branch: guide-cue-implementation
https://github.com/mongodb-js/compass/commit/58b07e3b9faef89f8f737552ca57d6db6e0ea503

Comment by Githook User [ 15/Jun/23 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: fix(compass-editors): editor darkmode background selection color COMPASS-6910 (#4519)
Branch: fix-wizard-button-label
https://github.com/mongodb-js/compass/commit/58b07e3b9faef89f8f737552ca57d6db6e0ea503

Comment by Githook User [ 15/Jun/23 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: fix(compass-editors): editor darkmode background selection color COMPASS-6910 (#4519)
Branch: COMPASS-5102-add-test-for-bundle-size
https://github.com/mongodb-js/compass/commit/58b07e3b9faef89f8f737552ca57d6db6e0ea503

Comment by Githook User [ 14/Jun/23 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: fix(compass-editors): editor darkmode background selection color COMPASS-6910 (#4519)
Branch: 1.38-releases
https://github.com/mongodb-js/compass/commit/58b07e3b9faef89f8f737552ca57d6db6e0ea503

Comment by Rhys Howell [ 13/Jun/23 ]

yuval@cupixel.com Thanks for reporting the issue! We'll have the fix in the next release (likely 1.38.0)

Comment by Githook User [ 13/Jun/23 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: fix(compass-editors): editor darkmode background selection color COMPASS-6910 (#4519)
Branch: main
https://github.com/mongodb-js/compass/commit/58b07e3b9faef89f8f737552ca57d6db6e0ea503

Comment by PM Bot [ 09/Jun/23 ]

Hello yuval@cupixel.com, thank you for reaching out to us! The team will review your issue and get back to you soon as soon as possible.

Please review your issue to ensure you've included your environment details and have attached relevant logs (with any sensitive data redacted), so that we're best able to provide you a timely and thorough response. Thanks again!

Generated at Wed Feb 07 22:44:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.