The 'Alternative Text' field in the quickedit bubble for single image fields has a wrong placeholder, it currently reads 'alt'.
In #2421427-57: Improve the UX of Quick Editing single-valued image fields was agreed to use 'Alternative Text' as a label instead.
However, this is not really helpful to use as a placeholder as well.
The placeholder should give an example or explain the 'techy' label better.
Furthermore, let's do something about the design of the field. It is not consistent and looks not finished.
We can align it to the left and/or make it 100% width of the bubble.
Before:
After:
Comment | File | Size | Author |
---|---|---|---|
#21 | quickedit-alt.png | 877.47 KB | yoroy |
#18 | improve_the_image-2829792-18.patch | 4.32 KB | sylus |
#9 | 2829792-09-quick_edit_toolgroup_and_alt_group_styling.patch | 3.61 KB | dmsmidt |
#9 | interdiff-2829792-08-09.txt | 973 bytes | dmsmidt |
#8 | 2829792-quick_edit_toolgroup_and_alt_group_styling-8.patch | 2.66 KB | rkoller |
Comments
Comment #2
Wim Leers+1
This should take inspiration from
\Drupal\editor\Form\EditorImageDialog
— both in terms of its precise title and placeholder, as well as its validation error behavior.Comment #3
yoroy CreditAttribution: yoroy at Roy Scholten commentedComment #4
yoroy CreditAttribution: yoroy at Roy Scholten commentedleft align and full width looks much better! lets have a patch :-)
Comment #5
tkoleary CreditAttribution: tkoleary at Acquia commentedComment #6
dmsmidt@tkoleary, note that we have a starting contributor working on a patch during the ux print (rkoller).
Comment #7
rkollerComment #8
rkollerOk in the following the positioning issue of the label and input field got fixed by removing the .quickedit-image-field-info selector completely. That moved the input to the left. Afterwards the field got set to 100% in width in .quickedit-toolgroup, along a failsave for the case if the type is set to submit set. In the js file the unnecessary wrapping div got removed and Drupal.t('Alternative text') entered for the alt placeholder.
Thanks for @dmsmidt and @tkoleary for advice and guidance along the way. Hope everything is placed correctly. If no please notify me, is my first commit and i try to learn and improve. ;) Cheers r.
Comment #9
dmsmidt@rkoller, nice working together with you, and thanks a lot for your patch.
It almost works! However we forgot to also modify the "Stable" theme. So I duplicated you changes to the theme.
(Tip: in patch naming we normally add the comment number after the issue id)
So, manually tested and looks nice, patch is clean and simple.
Comment #10
dmsmidtComment #11
tkoleary CreditAttribution: tkoleary at Acquia commented@dsmidt
Stable theme cannot be modified so we need to add the css to seven themes quickedit css.
Quickedit module has a libraries override to inject seven's quickedit css in to front-end themes.
Comment #12
dmsmidt@tkoleary, when this feature was added Stable was also modified. So why can't we here? It fixes the problems that are only in 8.3.x (dev) and haven't been released in a stable Drupal release, so no body should be using it, and nobody needs backwards compatibilty there. Could you point to a page which clearly states, what can and can't be done to Stable (and when)? Thanks.
Comment #13
tkoleary CreditAttribution: tkoleary at Acquia commented@dsmidt
Sorry, you are right. If it's styling new markup it can be added to stable.
Comment #14
samuel.mortensonHas this been tested when there's both a Title and Attribute enabled for an Image field? The reason flexbox was used before was so that the two inputs sit side by side at half width.
Comment #15
mgiffordOk, sounds like we need to ensure "two inputs sit side by side at half width." as per @samuel.mortenson
@dmsmidt feel free to revert if I'm wrong about this.
Comment #18
sylus CreditAttribution: sylus commentedRe-rolling against latest 8.x-5.x-dev.
Comment #19
mgiffordThanks @sylus - btw was talking with your team last night. Sounds like things are in a much better place (which is amazing).
Comment #20
samuel.mortensonThe review from #14 has not been addressed in the latest patch, unless it's more than a re-roll.
Comment #21
yoroy CreditAttribution: yoroy at Roy Scholten for Dropsolid commentedI tested this patch on simplytest. I enabled the title attribute for the image in the Article content type and then used quick edit the image. I don't get to see a title field at all:
The form for updating the title attribute is not added to the Quick edit window. Making the title attribute required did not change that.
(side note: I had to manually remove the float:left on the image in Bartik before I could even reach the image via quickedit. The body text div was over it when floated)
Comment #30
SpokjeDue to Quickedit being moved out of Drupal Core and into a Contrib Module, moving this issue to the Contrib Module queue.