Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sqllab): Fix cursor alignment in SQL lab editor by avoiding Lucida Console font on Windows #21380

Merged
merged 1 commit into from
Sep 13, 2022

Conversation

MichaelHintz
Copy link
Contributor

SUMMARY

Windows does not have a bold version of Lucida Console installed by default. [1] [2]
Instead, Windows creates a fake bold version of the font, which is slightly wider. [3]

In the SQL lab editor this leads to the cursor alignment issues linked below.

Consolas and Courier New both come with bold monospaced version pre-installed on Windows [2] and cause no issues with cursor alignment. That is why I am proposing to change the order of the fonts.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Available in any of the linked issues

TESTING INSTRUCTIONS

Requirement: Windows machine with standard fonts, meaning Menlo is not installed, Lucida Console is installed, but missing the bold version.

Then just type any SQL keyword the SQL lab editor, such as SELECT * FROM table_name.
The cursor is no longer aligned over the word table_name.
This is fixed when the font order is changed via the browser's development tools

ADDITIONAL INFORMATION

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️
We hope to see you in our Slack community too!

@codecov
Copy link

codecov bot commented Sep 13, 2022

Codecov Report

Merging #21380 (6f32d31) into master (b80f659) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #21380   +/-   ##
=======================================
  Coverage   66.60%   66.60%           
=======================================
  Files        1791     1791           
  Lines       68559    68559           
  Branches     7319     7319           
=======================================
  Hits        45666    45666           
  Misses      21007    21007           
  Partials     1886     1886           
Flag Coverage Δ
javascript 52.80% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@nytai nytai merged commit 3098e65 into apache:master Sep 13, 2022
eschutho pushed a commit that referenced this pull request Sep 20, 2022
…a Console font on Windows (#21380)

(cherry picked from commit 3098e65)
AAfghahi pushed a commit that referenced this pull request Oct 5, 2022
…a Console font on Windows (#21380)

(cherry picked from commit 3098e65)
AAfghahi pushed a commit that referenced this pull request Oct 6, 2022
…a Console font on Windows (#21380)

(cherry picked from commit 3098e65)
Fahrenheit35 pushed a commit to Fahrenheit35/superset that referenced this pull request Nov 11, 2022
@mistercrunch mistercrunch added 🍒 2.0.1 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS v2.0 v2.0.1 🍒 2.0.1 🚢 2.1.0
Projects
None yet
4 participants