Problem/Motivation
File and Image fields are displayed inside a collapsed container when configured to be multi-value. That can be nice because it saves some space, but can also be confusing. There is a pronounced UX flaw when user uploads files using "Upload" button (AJAX). Files will be uploaded and displayed, but container will be collapsed. This is specially confusing when you have required alt/title or description fields, which can be easily overlooked when field is collapsed.
It could also be nice to indicate that there are files in field even when collapsed:
Proposed resolution
Widget expanded by default when there are files in it or at least stays expanded after upload.
Remaining tasks
None yet. Discussion is open.
User interface changes
None yet.
API changes
None are expected.
Original report by [username]
This issue was reported by tsvenson in #625958-92: Support Uploading Multiple Files for HTML5 Browsers via #multiple attribute.
Comment | File | Size | Author |
---|---|---|---|
#13 | 1912784-13.patch | 2.59 KB | andypost |
#9 | improve_multivalue_file_field_ux_1912784_9.patch | 2.66 KB | slashrsm |
Comments
Comment #1
slashrsm CreditAttribution: slashrsm commentedAdd some tags.
Comment #2
tsvenson CreditAttribution: tsvenson commentedThanks for filing this issue @slashrsm. I think it is very important that we identify situation like this where Drupal doesn't allow the for enough tuning of the UX for users.
This is a great example where small adjustments and control over the default behaviour can greatly enhance the UX for those working with the content.
However, just making these options available for each individual fieldgroup isn't enough. It needs to be complemented with the ability to create a site-wide default behaviour. Then allow for making it possible to override that on individual fieldgroups.
The UX win here is that it will create a predictable expected behaviour for the users. No longer will they feel the need of having to expand fieldgroups just to check if they need to do anything in there.
It would also be a win for sitebuilders as they configure this behaviour in one place. Those few times they need to override it will be easily identified as a result.
Comment #3
slashrsm CreditAttribution: slashrsm commentedFirst we have to define when do we display this field expanded and when collapsed. Do we display expanded when we have files in it and collapsed when not? Do we display expanded only after upload? Some other behaviour? I am personally against first option as it could end up in files being expanded all the time and this is probably not what we wanted to achieve with wrapper at first place.
I, however, like the idea of making summary a bit more comprehensive. Attached patch adds info about number of files in the field.
Comment #5
swentel CreditAttribution: swentel commentedPartially duplicate of #1884148: field widget disappears when increase cardinality for image to allow multiple values - however, I can see the 'count' as an interesting feature request though ..
Comment #6
slashrsm CreditAttribution: slashrsm commentedThis fixes tests, but it is most likely not the best solution. Currently we modify field's title, which affects also other usages of the title. It would be better to achieve this without that (most likely by modifying theme function that handles element).
Comment #7
slashrsm CreditAttribution: slashrsm commentedComment #8
swentel CreditAttribution: swentel commented#1884148: field widget disappears when increase cardinality for image to allow multiple values got in fixing the original bug - this is now more of a feature request I guess.
Adjusting the title
Comment #9
slashrsm CreditAttribution: slashrsm commentedAnd here is the re-roll against latest 8.x.
Comment #9.0
slashrsm CreditAttribution: slashrsm commentedUpdated issue summary.
Comment #10
nancy.beutels CreditAttribution: nancy.beutels commentedSprintWeekend 2014
tried to test patch 9 with simplytest.me but got an error while loading patch
Comment #11
nancy.beutels CreditAttribution: nancy.beutels commentedSprintWeekend2014
This patch no longer applies?
Comment #12
slashrsm CreditAttribution: slashrsm commentedProbably needs reroll.
Comment #13
andypostNew patch:
1) render of counter moved to special variable to be able access string translation
2) sad use of safe markup... title should be changed here because before this place it will be used for all sub-elements
3) css moved to file module... needs better ideas
4) test moved to widget test but somehow failed but widget works
no such function
suppose that span should be added later in processMultiple()
and why this details placed into seven theme but not in file module or classy theme?