Pictures module breaks its own ordering convention, too dependent on .info order

Created on 27 April 2015, about 9 years ago
Updated 19 September 2023, 9 months ago

In the documentation, it instructs users should order breakpoints in the .info file in different ways depending on which version of the module you are using (1.0 or 2.0).

https://www.drupal.org/documentation/modules/picture β†’

This is really bad. The Pictures documentation is misleading or this is a bug with the Pictures module code. If the Pictures breakpoints are a separate group which can be ordered independently of the Theme breakpoints, then the instructions should correctly show how to order Breakpoints through the UI without having to touch the theme's .info file. Or the Pictures module (and every Breakpoints dependent module) should *always* assume a default convention for the order (smallest to largest).

Imagine if another module assumes a different Breakpoints order than what is required by Pictures, then the modules will conflict and one of them will break. What then?

The easiest solution to me would be for the Breakpoints module to mandate a small -> large convention. Then this would apply for both 1.0 and 2.0 and the Pictures module would just reverse its implementation for the 2.0 polyfill. The Pictures module would then bear the burden of making the library work correctly.

The better (but probably harder) solution would be to remove all dependency on .info Breakpoints order, so that the Pictures and Breakpoints modules remain truly independent.

πŸ› Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States zirafa

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024