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

feat(table): add parameter for enhanced mobile - FRONT-3754 #2653

Merged
merged 29 commits into from
Dec 8, 2022

Conversation

emeryro
Copy link
Contributor

@emeryro emeryro commented Sep 27, 2022

Add a parameter to disable the enhanced mobile display. If set, table will only have an horizontal scroll on small screens

⚠️ Markup change: to have a default responsive behaviour, a wrapper had to be added around the table. This wrapper should be set in all cases (enhanced or not)

@github-actions
Copy link

github-actions bot commented Sep 27, 2022

Copy link
Contributor

@planctus planctus left a comment

Choose a reason for hiding this comment

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

To me, while making this optional is a really good way to avoid breaking potentially correct tables, this way we lose any "responsiveness" for tables.
Shouldn't we introduce something like bootstrap does..? And maybe apply this by default, if the user wants he can use the enhanced when it's going to improve the mobile look and feel.
https://getbootstrap.com/docs/5.0/content/tables/#responsive-tables

},
});

const prepareData = (data, args) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

this can simply be const prepareData = (data, args) => Object.assign(data, args);, no..?


## Enhanced mobile table

Enhanced tables offers a more user friendly display on mobile.
Copy link
Contributor

Choose a reason for hiding this comment

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

But why we don't specify what are the "tables" where this can be safely enabled..? I mean, for this to work we need the first tr to contain th(s) as a basic requirement.
Then this might not be enough in 100% of the cases, so this is why making this optional.

planctus
planctus previously approved these changes Oct 3, 2022
Copy link
Contributor

@planctus planctus left a comment

Choose a reason for hiding this comment

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

There is one thing that we are not handling, but i don't see how could we, if created in the wyswyg editor the table will not be responsive, unless they do something on the implementation side..

@emeryro emeryro changed the base branch from v3.5.0-dev to v3.6.0-dev October 26, 2022 13:22
@emeryro emeryro dismissed planctus’s stale review October 26, 2022 13:22

The base branch was changed.

@emeryro emeryro merged commit 5549e41 into v3.7.0-dev Dec 8, 2022
@emeryro emeryro deleted the FRONT-3754-table-parameter branch December 8, 2022 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants