Follow-up to #2334387: UI changes to support current responsive image standards
Problem/Motivation
We need some kind of states API / ajax update for the breakpoint group form, because it is currently very confusing that you need to save the form, refresh the page, and only then see the relevant breakpoint groups in the details elements. It also can cause minor data loss if you fill out breakpoint group A, switch to breakpoint group B to check it out, and then flip back to breakpoint group A, because you need to save each time, which clears your previous settings.
Proposed resolution
Build it
Remaining tasks
User interface changes
Described above.
API changes
There are no API changes: those have already been taken care of in other issues. This would just improve the ability to make use of those API changes through a UI.
Beta phase evaluation
Issue category | Task because this a follow-up to a recent critical change. |
---|---|
Issue priority | Major because the sizes attribute will be very difficult to configurate without this UI change. |
Prioritized changes | The main goal of this issue is improve usability for the new sizes attribute. Making this easier to use will give Drupal 8 full ability to make use of the responsive images specification, which ultimately means better front-end performance for Drupal 8 sites. This is also a follow-up change to a recent critical, #2260061: Responsive image module does not support sizes/picture polyfill 2.2. |
Disruption | This will not be disruptive for core, contrib modules or themes. This only adds easier configuration and does not change the underlying APIs. |
Comment | File | Size | Author |
---|---|---|---|
#3 | i2547917-3.patch | 1.33 KB | Jelle_S |
Comments
Comment #2
attiks CreditAttribution: attiks commentedComment #3
Jelle_SFirst patch. Should work as expected.
Comment #5
attiks CreditAttribution: attiks at Attiks commentedGood to go, tested manually
Comment #6
RainbowArrayThis is a great improvement.
It's very nice to see the breakpoint group choices update immediately. If you change something in breakpoint group A without saving, then switch to breakpoint group Ba, and then come back to breakpoint group A, the changes you made in group A will go away. To me that doesn't feel unexpected, though, because I hadn't saved yet. If there was a way to preserve those changes (the sizes value for a breakpoint, or the image styles selected, for example), that would be even better. But I'd guess that's a bridge too far.
Comment #7
webchickThis is great!!
Agreed that other places we employ this pattern we don't preserve form values between switching, so I think this is ok.
Committed and pushed to 8.0.x. Thanks!