Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS: adjust media query breakpoint to improve tablet readability #15199

Conversation

nachoparker
Copy link
Member

see nextcloud/news#467

<= 938 > 938
dev skjnldsv com_apps_files__dir=_ dev skjnldsv com_apps_files__dir=_ (1)

@jancborchardt
Copy link
Member

What do you think @nextcloud/designers?

@skjnldsv
Copy link
Member

skjnldsv commented Apr 25, 2019

Damn, I had a pending branch for that :D
Thanks a lot for taking care of that @nachoparker
There are some javascript to edit as well!

see 1a36280

@skjnldsv skjnldsv added 3. to review Waiting for reviews enhancement labels Apr 25, 2019
@skjnldsv skjnldsv added this to the Nextcloud 17 milestone Apr 25, 2019
@nachoparker
Copy link
Member Author

@skjnldsv thanks for pointing that out. I tested briefly with the main default apps and I didn't see that we needed any more changes, but since you have made more progress on this, should we merge your changes here? or do you have a standing PR?

In that case we can close this as duplicate

@skjnldsv
Copy link
Member

@nachoparker I did not opened the pr yet :)
Please check my commit and adapt this pr accordingly, or I can also open one based on my branch 😉

@juliushaertl juliushaertl added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Apr 30, 2019
@nachoparker nachoparker closed this May 2, 2019
@nachoparker nachoparker deleted the adjust-media-query-breakpoint-tablet-1024px branch May 2, 2019 03:54
@nachoparker nachoparker reopened this May 2, 2019
@nachoparker
Copy link
Member Author

(sorry I deleted my remote branch accidentally)

@skjnldsv I looked at your changes and tweaked them a bit. The only big change is in apps/files/css/mobile.css, where I feel that it is better to simplify the media query. PTAL.

@skjnldsv
Copy link
Member

skjnldsv commented May 7, 2019

Another one:

@media only screen and (min-width: 769px) {
:)

@skjnldsv
Copy link
Member

skjnldsv commented May 9, 2019

@skjnldsv I looked at your changes and tweaked them a bit. The only big change is in apps/files/css/mobile.css, where I feel that it is better to simplify the media query. PTAL.

Ah, I just saw that.
We had a three points break because of the sidebar hiding.
If you take a look at the current state, we want to make sure the file list gets at least 688px width (excluding navigation). Maybe we could keep displaying some informations still when under 1024? I feel it's very empty like that :)

@skjnldsv
Copy link
Member

🎺

@nachoparker
Copy link
Member Author

let me get you an animation, it will be easier to explain

@nachoparker
Copy link
Member Author

Ok, this is with the rule

@media only screen and (max-width: 1024px) and (min-width: 769px), only screen and (max-width: 688px) {

before

, and this is with

@media only screen and (max-width: $breakpoint-mobile) {

after

If we want to keep three cut points, there needs to be more adjustment to be made. I like it simple but that's just my preference.

@skjnldsv
Copy link
Member

@jancborchardt :)

@jancborchardt
Copy link
Member

@nachoparker looking at the gifs:

  • The first one looks good, but when it’s narrower without the left navigation it only shows the right details inbetween, and not when wider? This version would be good if that’s fixed.
  • The second one has a looong period of where it doesn’t show the left navigation but also does not show any details on the right. This is a bit strange → see what I said in point 1 :)

@nachoparker
Copy link
Member Author

Thanks @jancborchardt the first one is what you already have, only substituting 938px -> 1024px, that's what I mean that it needs some more tweaking because it doesn't look good (and I proposed number 2).

Let's see if we can find a sweet spot

@nachoparker
Copy link
Member Author

Ok, so if we want three breakpoints I think this is exactly what we are after -> f902ee7

3bpoints

@@ -1,4 +1,4 @@
@media only screen and (max-width: $breakpoint-mobile) {
@media only screen and (max-width: 938px) and (min-width: $breakpoint-mobile + 1), only screen and (max-width: 688px) {
Copy link
Member

@skjnldsv skjnldsv May 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

938 was basically the 688+250 (nav width)
We might be able to find the use of the mobile breakpoint somewhere here :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the idea behind it is that we found that the min width the filelist should have was 688px, (with full view, modified, size, actions.
..) So those breakpoints were there for that.
@jancborchardt ?

@jancborchardt
Copy link
Member

@nachoparker nice, that last gif you posted looks perfect to me! 👍 What do you think @nextcloud/designers?

@skjnldsv
Copy link
Member

skjnldsv commented May 29, 2019

I pushed a commit to use the $navigation-width variable.
wrong gif uploaded, see further comments

@skjnldsv skjnldsv force-pushed the adjust-media-query-breakpoint-tablet-1024px branch from 33c108f to 3cbb466 Compare May 29, 2019 04:43
@skjnldsv skjnldsv added 3. to review Waiting for reviews and removed 2. developing Work in progress labels May 29, 2019
Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rebased and ready to go

@skjnldsv skjnldsv force-pushed the adjust-media-query-breakpoint-tablet-1024px branch from 3cbb466 to c3fe271 Compare May 29, 2019 05:05
@jancborchardt
Copy link
Member

@skjnldsv hmm, the gif by @nachoparker looks slightly better than the last one you posted, because it has 1 less breaking step:

  1. Show navigation and file details on right
  2. Hide navigation, still show file details
  3. Hide navigation and file details (mobile view)

You have a strange step between 1 and 2 with "Show navigation but hide file details", which doesn’t seem necessary. The content should always take precedence over the navigation. That is, before any content is hidden, the navigation should be hidden before, as done in @nachoparker’s gif.

What do you think?

@skjnldsv
Copy link
Member

skjnldsv commented May 29, 2019

What do you think?

Sure :)
Then let's adjust the min width for the file table.
I just used what we were supposed to use before (original calculation).

But looking at the first gif, we don't need two breakpoint then. Only one in 688px.

EDIT: ah no, I took a gif on the wrong branch ^^
This is what it really looks like:
Peek 29-05-2019 13-04

Copy link
Member

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking very good now! 👍

(We should also look at how it works with the right sidebar, but that’s a follow-up. :)

@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels May 30, 2019
@skjnldsv skjnldsv force-pushed the adjust-media-query-breakpoint-tablet-1024px branch from c3fe271 to 3c30d29 Compare May 30, 2019 06:29
@skjnldsv skjnldsv merged commit fd9ff58 into nextcloud:master May 30, 2019
@welcome
Copy link

welcome bot commented May 30, 2019

Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22
Most developers hang out on IRC. So join #nextcloud-dev on Freenode for a chat!

@go2sh
Copy link
Contributor

go2sh commented May 30, 2019

@skjnldsv Just a minor nitpick. You commited some git merge/rebase LOCAL REMOTE files to the repo. ;-) See main.js.map

@skjnldsv
Copy link
Member

skjnldsv commented May 30, 2019

@go2sh what do you mean?

Edit ah damn, I see it now. Thanks!

@nachoparker
Copy link
Member Author

Thanks gents!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants