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

chore: make antd table font size same as data table #24741

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

mistercrunch
Copy link
Member

SUMMARY

"Drill to details" uses normal font-size (14px) where all other data tables in Superset use small font size (12px). This sets our Table component based on AntD to use our typography.sizes.s while the table is set to a small size.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

after

Screen Shot 2023-07-18 at 6 25 53 PM

before

Screen Shot 2023-07-18 at 6 30 25 PM

@codecov
Copy link

codecov bot commented Jul 19, 2023

Codecov Report

Merging #24741 (2004c3e) into master (11bb8c3) will not change coverage.
The diff coverage is n/a.

❗ Current head 2004c3e differs from pull request most recent head 770cd85. Consider uploading reports for the commit 770cd85 to get more accurate results

@@           Coverage Diff           @@
##           master   #24741   +/-   ##
=======================================
  Coverage   68.89%   68.89%           
=======================================
  Files        1901     1901           
  Lines       73927    73927           
  Branches     8183     8183           
=======================================
  Hits        50932    50932           
  Misses      20874    20874           
  Partials     2121     2121           
Flag Coverage Δ
javascript 55.71% <ø> (ø)

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

Impacted Files Coverage Δ
...set-frontend/src/components/Table/VirtualTable.tsx 75.00% <ø> (ø)
superset-frontend/src/components/Table/index.tsx 75.58% <ø> (ø)

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

@michael-s-molina
Copy link
Member

Should the pagination also use a 12px font?

@michael-s-molina michael-s-molina self-requested a review July 19, 2023 17:49
@mistercrunch
Copy link
Member Author

@michael-s-molina idk, maybe. For now I'm overriding antd's definition of the class .ant-table-small and guessing the controls (like pagination) aren't affected when going from small to large. It felt like aligning their definition of small to ours made sense, and things look better as we have fixed column sizes in many places and things are often on the edge of overflowing. I'd love to have some dynamism in the column width eventually ....

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

@mistercrunch Ant Design changes the pagination size when going from Large to Middle/Small but they keep the same size between Middle/Small. I guess to make it easier to click on the pages. Given that we don't currently support the Large size, I think we can mimic their behavior and keep things as they are. Thank you for the improvement.

Screen.Recording.2023-07-20.at.10.18.07.mov

@mistercrunch mistercrunch merged commit d1d5ff6 into apache:master Jul 20, 2023
@mistercrunch mistercrunch deleted the small_table_drill branch July 20, 2023 17:00
@michael-s-molina michael-s-molina added the v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch label Jul 21, 2023
michael-s-molina pushed a commit that referenced this pull request Jul 26, 2023
@mistercrunch mistercrunch added 🍒 3.0.0 🍒 3.0.1 🍒 3.0.2 🍒 3.0.3 🍒 3.0.4 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.1.0 labels Mar 8, 2024
vinothkumar66 pushed a commit to vinothkumar66/superset that referenced this pull request Nov 11, 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 v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch 🍒 3.0.0 🍒 3.0.1 🍒 3.0.2 🍒 3.0.3 🍒 3.0.4 🚢 3.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants