-
-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Prevent tabulator from overlapping when max_height is set #7403
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7403 +/- ##
===========================================
+ Coverage 71.86% 82.23% +10.37%
===========================================
Files 336 337 +1
Lines 50542 50557 +15
===========================================
+ Hits 36320 41574 +5254
+ Misses 14222 8983 -5239 ☔ View full report in Codecov by Sentry. |
I think |
Also happy with this PR, but that might be simpler and clearer. |
serve_component(page, widget) | ||
|
||
table = page.locator('.pnx-tabulator') | ||
expect(table).not_to_have_css('max-height', '200px') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like an odd test, why would I have max-height set to 200px in the first place? Seems like it should check that max-height is unset instead.
serve_component(page, widget) | ||
|
||
table = page.locator('.pnx-tabulator') | ||
expect(table).not_to_have_css('max-height', '200px') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay updated--seems counterintuitive to use to_have_css
to check for null, but I guess that's the only way!
* limit tabulator height with max height * use maxHeight config * reverse logic
Closes #7401
Before:
![image](https://private-user-images.githubusercontent.com/15331990/376713220-6b4098e2-d598-4d38-bb2d-cd1f25176727.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMDYyMjUsIm5iZiI6MTczOTEwNTkyNSwicGF0aCI6Ii8xNTMzMTk5MC8zNzY3MTMyMjAtNmI0MDk4ZTItZDU5OC00ZDM4LWJiMmQtY2QxZjI1MTc2NzI3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDEyNTg0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYyZWNmNTMwODRlNjgzYzgyMzQxYzkxYjBkZTlkMzJlNzJjMTFkMDFlYWU0MDNiYmZmYzRmY2E5YTU5OGY3ZWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.C3knhutI_NJsw624UMz3vOskWk3CQsGwLapFEjBP3Kc)
After, properly truncates
Does not use up all the space as max_height
![image](https://private-user-images.githubusercontent.com/15331990/376713017-4439fab9-6fe8-44f8-a261-35583e91d241.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMDYyMjUsIm5iZiI6MTczOTEwNTkyNSwicGF0aCI6Ii8xNTMzMTk5MC8zNzY3MTMwMTctNDQzOWZhYjktNmZlOC00NGY4LWEyNjEtMzU1ODNlOTFkMjQxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDEyNTg0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZlZjg3Y2Y3YTU0MGUyYmE3YzdkZTI0NGYwMjdhZmI5Mzg0ZmQ2ZjRkOWNjODc5MDA2NjdjNTE5OWFkMGY3NzcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.hjdH2DntlVjdlAWn7soOnDmmSI5z_FxoAV1kdF-PcBw)