-
Notifications
You must be signed in to change notification settings - Fork 20
Ad 8000 d JS for responsive tables in long text fields #771
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
base: 2.x
Are you sure you want to change the base?
Conversation
edited
@markconroy this feels like something could add to the product newsletter too. Do councils just update localgov_base? Thanks for doing this |
Hey @markconroy - this works fine. I'm just wondering if we should use something like this instead ? What do you think? |
I wasn't aware of that module. Let's chat about it in MT. I have a feeling wiht that module, it's changing the design/layout of tables pretty drastically, so maybe it would be worth putting that module in "as well as" this PR. Then sites can decide if they want the full-on experience of that module, or something similar like this PR per site. |
I won't make it to MT today, dentist calls. This module can be set to default to the same behaviour you've made, with the option to override it on a case by case basis. That might be the safest option. The downside is that it only works if there's a table header set, which there should be anyway. There is also this module https://www.drupal.org/project/responsive_table_filter which seems to do the same as yours, if we want to stick to contrib ? I haven't looked at how it does it though. |
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.
Discussed with Mark and decided to go with this approach for now, and people can not enable this and use whichever other module they like.
We want this to merge into the 2.x branch first, then backport to the 1.x. So maybe we recreate the merge requests branching off the 2.x branch. Or resolve the merge conflicts. @tonypaulbarker will take a look :) |
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.
Also looks like this PR has conflicts
'#title' => t('Make WYSIWYG tables responsive.'), | ||
'#default_value' => theme_get_setting('localgov_base_responsive_wysiwyg_tables'), | ||
'#description' => t('Places tables inserted via WYSIWYG into a responsive container, so they can scroll horizontally on small screens.'), | ||
'#default_value' => theme_get_setting('localgov_base_responsive_wysiwyg_tables') ? theme_get_setting('localgov_base_responsive_wysiwyg_tables') : FALSE, |
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.
Duplicate #default_value
with line 105 above
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.
@markconroy @millnut line 107 has some additional logic compared to line 105. Presume we want line 107. "If we have this setting, use the setting, otherwise false" ?
Some conflicts in grid.css I assume net changes to this file should be zero. I think that we want a grid of '12' columns, but just to be sure:
or
or
|
# Conflicts: # css/layout/grid.css
Conflicts should be well now. Please review comments, review code and re-test this works as expected. |
Seems to work fine @tonypaulbarker , but the are some failing tests. Can you have a look at those? |
Closes #759
What does this change?
lgd-responsive-table
, so we can then useoverflow-x: auto
on these containers.How to test
Caveat
Do we want to use a theme setting to enable this?
Related PR
#648
^ That PR is for the table field tables rather than wysiwyg tablets iirc.
Thanks to Big Blue Door for sponsoring my time to work on this.