Content overflows out of the HTML table.
media

Visual suggestion how we can wrap title and description (made for mobile preview but basic idea is same):

media

CommentFileSizeAuthor
#36 screenshot-width-700px-file-entity.png65.09 KBsanja_m
#35 screenshot-width-1040px.png95.69 KBsanja_m
#35 screenshot-width-860px.png90.53 KBsanja_m
#35 screenshot-width-700px.png89.46 KBsanja_m
#31 interdiff-2696933-31.txt960 bytessanja_m
#31 content_overflow_issue-2696933-31.patch2.83 KBsanja_m
#30 Screen Shot 2016-10-04 at 15.09.03.png171.52 KBslashrsm
#29 interdiff-2696933-29.txt748 bytessanja_m
#29 content_overflow_issue-2696933-29.patch2.27 KBsanja_m
#27 interdiff-2696933-27.txt2.63 KBsanja_m
#27 content_overflow_issue-2696933-27.patch1.79 KBsanja_m
#25 Screen Shot 2016-09-29 at 17.39.40.png159.86 KBslashrsm
#24 content_overflow_issue-2696933-24.patch1.23 KBsumitmadan
#22 content_overflow_issue-2696933-22.patch794 bytessumitmadan
#20 responsive_issues-2696933-20.patch794 bytesvyasamit2007
#10 Screenshot from 2016-04-11 17:05:29.png66.92 KBjohnchque
#10 responsive_issues-2696933-10.patch737 bytesjohnchque
#8 files-list.jpg59.99 KBNenad
#8 media-library.jpg57.61 KBNenad
#8 edit-mobile.jpg45.82 KBNenad
#8 add-files-media-library.jpg81.68 KBNenad
#8 add-files-popup.jpg36.52 KBNenad
#8 edit-single-file-popup.jpg102 KBNenad
#8 edit-post-screen-idea-2.jpg79.28 KBNenad
#8 edit-post-screen.jpg78.93 KBNenad
#5 Screen Shot 2016-04-05 at 15.28.20 .png19.62 KBmiro_dietiker
#5 Screen Shot 2016-04-05 at 15.16.37 .png58.87 KBmiro_dietiker
#5 Screen Shot 2016-04-05 at 15.11.48 .png40.87 KBmiro_dietiker
#3 mobile-3.png133.14 KBNenad
#3 mobile-2.jpg58.8 KBNenad
#3 mobile-1.jpg141.4 KBNenad
#3 seven-theme-iphone-5.jpg42.4 KBNenad
#2 mobile.png118.48 KBNenad
#2 tablet.png146.19 KBNenad
desktop.png147.18 KBNenad

Comments

Nenad created an issue. See original summary.

Nenad’s picture

StatusFileSize
new146.19 KB
new118.48 KB
Nenad’s picture

Issue summary: View changes
StatusFileSize
new42.4 KB
new141.4 KB
new58.8 KB
new133.14 KB
Nenad’s picture

Issue summary: View changes
miro_dietiker’s picture

First approach thinking:
Note we don't have bootstrap in admin UI and we can't just depend on its features.

The filename below the image is indeed a problem, if combined with an extra metadata column.
Moving it over to the description field could make sense and is already a great improvement.

The core admin UI has responsive tables from core to allow hiding columns.
We could just drop the description column in responsive mode below a certain size.
But this is not acceptable since it is not editable anymore for mobile users.
Also note that the description could be a textarea (hidden setting).

But different approach seems better to me:
I checked core and it shows multivalue image fields like this:

By not adding the metadata column it results in much less issues for mobile.

And core does also apply responsive width to these text fields:

So, just make the buttons stack up vertically, output the text fields below the image, and add responsiveness like core does.

Additionally, we should check the filename and limit it with a text overflow ellipsis definition to make sure the width is not extended accidentally.

miro_dietiker’s picture

Issue summary: View changes

Aww unfixing the images..

pivica’s picture

> Note we don't have bootstrap in admin UI and we can't just depend on its features.

For sure we would not add bootstrap dependency, that table responsive thingy from BS are just couple of simple CSS rules that we would copy&paste&modify to our needs. You just need to add one wrapping div around table element and set it up to do horizontal scroll on overflow.

Having said that, i do like more vertical stacking approach from #5.

Nenad’s picture

Issue summary: View changes
StatusFileSize
new78.93 KB
new79.28 KB
new102 KB
new36.52 KB
new81.68 KB
new45.82 KB
new57.61 KB
new59.99 KB

Please check updated designs and description.

miro_dietiker’s picture

This issue is getting longer and extended in scope.
We originally have discussed a problem and i have proposed to fix the wrapping of the filename and the description field.

Now you mix it up with dialog and other aspects and make it more a meta issue. Let's revert that step.
Please create separate issues for separate elements and remove those elements again from the issue.

Only if you limit a single issue to a specific problem then progress is possible.
If you want to create an overview, additionally create a new meta issue and link to the individual issues.

johnchque’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new737 bytes
new66.92 KB

Here is a patch, also and screenshot about the changes, IMHO it looks better. :)

miro_dietiker’s picture

Status: Needs review » Needs work
+++ b/css/entity_browser.entity_list.css
@@ -22,3 +22,23 @@
+@media screen and (max-width: 1250px) {

1250 is a rather large number for a mobile switch.

Let's quickly test drive this and discuss the approach.

johnchque’s picture

Core uses
(max-width: 60em) { /* 920px */
for tables, maybe use the same?

Nenad’s picture

Issue summary: View changes

I am working on meta issue, so everything except table overflow will be moved to separate issues.

Nenad’s picture

Title: Responsive issues » Content overflow issue
pivica’s picture

I've quickly checked core CSS and there is no definite answer what are the recommended breakpoints for mobile, tablet and big scrrens. Most used media queries are

@media screen and (max-width: 319px) {

@media screen and (max-width: 470px) {

@media screen and (max-width: 30em) { /* 480px */

@media only screen and (min-width: 36em) {

@media screen and (max-width: 37.5em) { /* 600px */

@media screen and (max-width: 600px) {

@media all and (max-width: 48em) { /* 768px */

@media screen and (min-width: 780px)

@media screen and (max-width: 60em) { /* 920px */

@media screen and (max-width: 1020px) {

And there are more of them, this are just the ones that make more sense ;). But based on this I would say core target couple of breakpoints for

  • very small screens - less then 320px
  • small screens - from 320px to ~480px
  • small medium screens - from 480px to ~600
  • medium screens - around 780px to 920px
  • medium bigger screens - 780px to 920px
  • big screens - from 1020px and more
pivica’s picture

And for our thing from 600px to 780px makes the most sense.

Not sure should we have two breakpoints and two layouts (for mobile and tablet), but seems that targeting tablets and smaller screen with only one breakpoint is enough.

pivica’s picture

> (max-width: 60em) { /* 920px */

Yeah also check 920px - maybe that is also a good candidate if layout starts to break below 920px.

miro_dietiker’s picture

The problem is, the break points also depend if the tray is open or closed.
(The tray is the top admin menu items, if moved to the left side, and will steal width to content.)

It results in strange effects such as having some elements temporarily switch to mobile display while tray and right edit column is active... and back to regular display when they are removed due to low width. All in all, horrible edit UX.

pivica’s picture

> It results in strange effects such as having some elements temporarily switch to mobile display while tray and right edit column is active... and back to regular display when they are removed due to low width. All in all, horrible edit UX.

This does not make any sense to me, for a very narrow screens like mobile and tablets that tray (vertical menu) should just go on top of everything (like position: absolute and z-index higher) and other page elements can be partially or fully hidden. For example https://codyhouse.co/demo/mega-dropdown/index.html.

Or at least when tray is showed, just push the page to the right, but do not do any crazy additional breakpoints for page elements that are dependable on tray component. For example http://codepen.io/Shven/full/chKqD/ or http://codepen.io/adriangyuricska/full/bNXaBj/.

Check lot of other examples on http://navnav.co/ - i've quickly checked most of them and it seems there is no example that is doing something like Drupal... Would really like to hear why this kind of tray behaviour is implemented for narrow screens?

Lets get some more info about this somehow, and if more people are agree on this we should open a core issue.

vyasamit2007’s picture

StatusFileSize
new794 bytes

We've had an issue with bigger screens more than 1250px as well with Verticlal Tabs. With #10 breaks when you have vertical tabs in the form. I've so, created a patch on top of #10 to make sure in bigger screens as well the Entity Browser do not break. Please review.

vyasamit2007’s picture

Status: Needs work » Needs review
sumitmadan’s picture

StatusFileSize
new794 bytes

Re-rolled the patch as the issue was still there when we are in edit mode.

Status: Needs review » Needs work

The last submitted patch, 22: content_overflow_issue-2696933-22.patch, failed testing.

sumitmadan’s picture

Status: Needs work » Needs review
StatusFileSize
new1.23 KB

Re-rolling the patch.

slashrsm’s picture

Issue summary: View changes
Status: Needs review » Needs work
Issue tags: +D8Media, +UX, +Novice
StatusFileSize
new159.86 KB

Thank you for your work. This looks very nice and almost ready to go!

I tested this with entity_browser_example module and at certain size I still get a bit of overflow:

+++ b/src/Plugin/Field/FieldWidget/FileBrowserWidget.php
@@ -378,6 +378,8 @@ class FileBrowserWidget extends EntityReferenceBrowserWidget {
+      $current['#attached']['library'][] = 'entity_browser/entity_reference';
+

This library belongs to the entity reference field widget, which is quite different from the design perspective.

It would be better to create a new library and use that for this widget.

sanja_m’s picture

Assigned: Unassigned » sanja_m

Assigning to me.

sanja_m’s picture

Status: Needs work » Needs review
StatusFileSize
new1.79 KB
new2.63 KB

Fixed bugs from #25.

slashrsm’s picture

Status: Needs review » Needs work

Great, thank you for the improvements. Almost there :)

Responsiveness now works OK when there is no toolbar open. When the side admin toolbar is there content still overflows at some sizes.

sanja_m’s picture

Status: Needs work » Needs review
StatusFileSize
new2.27 KB
new748 bytes

Fixed responsiveness when admin toolbar is open.

slashrsm’s picture

Status: Needs review » Needs work
StatusFileSize
new171.52 KB

I am still seeing some overflow between 1020px and 1140px of screen width. See attached screenshot.

I made sure that the latest CSS was loaded.

sanja_m’s picture

Status: Needs work » Needs review
StatusFileSize
new2.83 KB
new960 bytes

Fixed bug from #30.

slashrsm’s picture

Status: Needs review » Fixed

Committed. Thanks!

  • slashrsm committed 1fd7ba2 on 8.x-1.x authored by Nenad
    Issue #2696933 by sanja_m, sumitmadan, yongt9412, vyasamit2007, Nenad,...
miro_dietiker’s picture

I would love to see here screens of the clean versions of the display variants we decide for.

sanja_m’s picture

StatusFileSize
new89.46 KB
new90.53 KB
new95.69 KB

Screenshots for 700px and 1040px of screen width with opened admin toolbar and for 860px of screen width with closed admin toolbar.

sanja_m’s picture

StatusFileSize
new65.09 KB

Screenshot for 700px of screen width with opened admin toolbar and enabled file entity (now the missing edit button is displayed).

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.