- 🇩🇪Germany Anybody Porta Westfalica
Hoply crap!
breakpoint_mapping_sizes
is entirely missing in the settings form and for most parts in the config, but still queried in the PHP code at various places.I'll take a look where and why we removed this (intentionally or not ;))
- 🇩🇪Germany Anybody Porta Westfalica
Okay, here's the reason: There's no form input, we're calculating these values when submitting the form!
The code was written 5 years ago 😂
https://git.drupalcode.org/project/drowl_paragraphs/-/commit/d8b7e43df4a...I think we need to call it in an update hook unce to recalculate the breakpoint mapping sizes without needing to resave the form everywhere.
So copy and align this code in an update hook:$breakpoint_mapping = !empty($form_values['breakpoints']['breakpoint_mapping']) ? $form_values['breakpoints']['breakpoint_mapping'] : []; // Calculate min / max for breakpoints. $breakpoint_mapping_sizes = []; if (!empty($breakpoint_mapping)) { $breakpoint_mapping_sizes = self::breakpointMappingToDeviceSizes($breakpoint_mapping); }
- Open on Drupal.org →Core: 10.1.4 + Environment: PHP 8.0 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - @anybody opened merge request.
- Issue was unassigned.
- Status changed to Fixed
over 1 year ago 5:02pm 17 October 2023 - Open on Drupal.org →Core: 10.1.4 + Environment: PHP 8.0 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - Assigned to thomas.frobieter
- Status changed to Needs work
over 1 year ago 5:04pm 17 October 2023 - 🇩🇪Germany Anybody Porta Westfalica
Ah sorry back to NW!
We need to add reasonable defaults for sm, md, lg in the drowl_paragraphs.settings.yml! Currently it's just:
breakpoint_mapping_sizes: sm: max-width: mediaQuery: 'all and (min-width: 1921px)' type: max-width size: 99999999 unit: px min-width: mediaQuery: 'all and (max-width: 640px)' type: min-width size: 0 unit: px
missing sm and md. Furthermore, the current values should be checked, I guess?
- 🇩🇪Germany Anybody Porta Westfalica
Ok it works, here we go:
sm: max-width: mediaQuery: 'all and (max-width: 640px)' type: max-width size: 640 unit: px min-width: mediaQuery: 'all and (max-width: 640px)' type: min-width size: 0 unit: px md: max-width: mediaQuery: 'all and (min-width: 641px) and (max-width: 1024px)' type: max-width size: 1024 unit: px min-width: mediaQuery: 'all and (min-width: 641px) and (max-width: 1024px)' type: min-width size: '641' unit: px lg: max-width: mediaQuery: 'all and (min-width: 1921px)' type: max-width size: 99999999 unit: px min-width: mediaQuery: 'all and (min-width: 1025px) and (max-width: 1366px)' type: min-width size: '1025' unit: px
- Issue was unassigned.
- Status changed to Fixed
over 1 year ago 5:14pm 17 October 2023 Automatically closed - issue fixed for 2 weeks with no activity.