feat(Table): add disableMobileListView prop to prevent mobile list conversion#877
feat(Table): add disableMobileListView prop to prevent mobile list conversion#877maxknv wants to merge 4 commits intoClickHouse:mainfrom
Conversation
|
…nversion Add new prop to Table component that disables the automatic conversion to mobile list view on narrow screens, keeping the table layout with horizontal scroll instead. Changes: - Add disableMobileListView?: boolean prop (default: false) - Set data-responsive-mode attribute on TableOuterContainer - Wrap all mobile @media queries with [data-responsive-mode="list"] & selector - When disableMobileListView=true, mobile styles don't apply Benefits: - Simple implementation (3 main changes) - No prop threading through nested components - Clean CSS selector approach - Backward compatible (default behavior unchanged) Use case: When you want tables to scroll horizontally on mobile instead of converting to a list view format.
9393049 to
7eb9d13
Compare
elizabetdev
left a comment
There was a problem hiding this comment.
LGTM! The disableMobileListView prop is a simple, backward-compatible addition that keeps the table layout on mobile with horizontal scroll, which makes sense for complex tables. Tested locally and works as expected.
Approved from a design perspective. I would also like to get an approval from an engineer.
DreaminDani
left a comment
There was a problem hiding this comment.
love using data selectors for this. Will make it easier to migrate off of styled components in the future :)
|
@elizabetdev as per our consistency conversations, should this prop really be |
|
@maxknv Moved your PR to the following reviewed version: feat(table): 🎸 add isResponsive prop to control mobile layout behaviour Your contributions are standing in the commit history 👌 This was moved to allow the CI/CD checkups to verify everything and provide us with a preview and other checks, including demo video, etc. @maxknv You'll find the requested changes, including a preview, so you can test the feature, etc. Let me know what you think. |
Summary
Add new prop to Table component that disables the automatic conversion to mobile list view on narrow screens, keeping the table layout with horizontal scroll instead.
Changes
disableMobileListView?: booleanprop (default:false)data-responsive-modeattribute onTableOuterContainer[data-responsive-mode="list"] &selectordisableMobileListView=true, mobile styles don't applyBenefits
Use case
When you want tables to scroll horizontally on mobile instead of converting to a list view format.
Testing
Tested in ClickHouse CI report viewer (https://s3.amazonaws.com/clickhouse-test-reports/report_test.html?branch=ci_ui_upd2) with the new prop set to
true.