Follow-up to #2334387: UI changes to support current responsive image standards
Problem/Motivation
The help text in general (both field descriptions and actual help page) does not conform to UI guidelines and needs clean-up. Specifically, it's all way too long, and it focuses on exposing the underlying technical details vs. being more use-case focused "Use this to foo your bar so your users can baz." See Field UI settings descriptions for an example.
Proposed resolution
Write 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 |
---|---|---|---|
#32 | 2547919-32.patch | 3.96 KB | MeenakshiG |
#27 | 2547919-27.patch | 4.8 KB | runeasgar |
#25 | 2547919-25.patch | 5.38 KB | runeasgar |
#22 | interdiff-2547919-16-22.txt | 12.52 KB | pguillard |
#22 | 2547919-22.patch | 7.34 KB | pguillard |
Comments
Comment #3
yoroy CreditAttribution: yoroy at Roy Scholten commentedComment #5
rodrigoaguileraHere is a first patch fixing some unneeded HTML inside a string and coding standards
Comment #6
pmchristensen CreditAttribution: pmchristensen commentedI'm reviewing the patch doing the mentored sprint at Dublin 2016.
Comment #7
pmchristensen CreditAttribution: pmchristensen commentedDid a review and have the following comments:
Look at the comment below about possible changes.
Look at the comment below about possible changes.
Look at the comment below about possible changes.
Look at the comment below about possible changes.
It is looking very good and everything is working. Please considerate to change from concat strings to array and then doing an implode - this is faster. eg:
$output[] = 'something';
$output[] = t('Something translated');
$output[] = 'Something more';
$output = implode('', $output);
You should also replace the array with short tag version '[]'. As by the coding standards for Drupal - this check is already included in the PHPCS. https://www.drupal.org/docs/develop/standards/coding-standards#array
Comment #8
pguillard CreditAttribution: pguillard commentedHere is a patch that (I hope) addresses #7 suggestions
Comment #9
Jelle_SI think @pmchristensen also meant the arrays as second parameters to the
t()
function when he said:Other than that it looks fine to me.
Comment #10
pguillard CreditAttribution: pguillard commentedThanks @Jelle_S fro this clarification
Comment #12
kari.kaariainen CreditAttribution: kari.kaariainen commentedIt should say:
"The vw unit is viewport width and is used instead of a percentage because vw always refers to the width of the entire viewport."
instead of:
"The vw unit is viewport width and is used instead of a percentage because the percentage always refers to the width of the entire viewport."
Comment #13
starshapedRe-rolled patch to be up to date with 8.4.x.
Comment #14
starshapedUpdated the help text to replace 'percentage' with 'vw' as noted in #12.
Comment #16
starshapedRe-rolled patch to be up to date with 8.5.x.
Comment #18
borisson_I think the tags used in this issue are somewhat overkill, since it just a documentation change. However the new text looks solid and was approved by @Jelle_S in #9.
Comment #20
MixologicTemporary testbot hiccup.
Comment #21
alexpottThe
</dd>
is not supposed to be in the translated string.Also the conversion here to use $output as an array feels very unnecessary - speed is really not of the essence here and if it is measurable it's not going to be significant - it also hides actual changes to the text - of which there does not appear to be very many.
Comment #22
pguillard CreditAttribution: pguillard commentedUpdated as of #21
Comment #23
runeasgar CreditAttribution: runeasgar as a volunteer commentedI am at the Drupalcon Nashville 2018 mentored sprint, and am going to try to review the latest patch.
Comment #24
runeasgar CreditAttribution: runeasgar as a volunteer commentedOoook.. here we go:
Line 54 still has a
</dd>
in the translated string. Fixing and uploading new patch momentarily. I'm very new to providing patches, so I might screw it up.. but gotta start somewhere.Everything else looks good, although I cannot realistically vet the quality of the content.
Comment #25
runeasgar CreditAttribution: runeasgar as a volunteer commentedAfter wrapping my head around the fact that I'm actually reverting line 54 to it's HEAD state on 8.6.x (so. confusing.).. I finally managed to produce this patch. Crossing my fingers!
Comment #26
kari.kaariainen CreditAttribution: kari.kaariainen commentedThere is one extra space after the opening bracket in
[ ':responsive_image
.Comment #27
runeasgar CreditAttribution: runeasgar as a volunteer commentedSo confusing.. looks like that's yet another reversion to HEAD. I hope I'm doing this right.. new patch uploaded!
Comment #31
jhedstromThe patch no longer applies to the latest. There also seems to be some differences between the latest several patches here, but I couldn't figure out why some changed multiple lines of the help text, and the latest only changes one line of actual help text.
This change seems out of scope for this. Most core modules follow the pattern of initiating
$output
to an empty string.Comment #32
MeenakshiG CreditAttribution: MeenakshiG at OpenSense Labs for DrupalFit commentedComment #33
jhedstromThe patch in #32 looks good, as it resolves the bug in the current help text first noted in #12. However, the IS states a more thorough rewrite should happen:
which seems to have been lost.
Since this does address an actual bug in the help text, it seems good to get in, but a follow-up should be filed, and the IS here should be updated I think.
Comment #36
quietone CreditAttribution: quietone as a volunteer commentedClosed #2887404: responsive_image_help words mixed up as a duplicate. Adding credit for kari.kaariainen.
Setting to NW for the points in #33. Once the followup is made and the IS update this can be RTBC'ed.