Skip to content

[WIP] Mobile optimization for base layout and Files app - #7724

Merged
DeepDiver1975 merged 26 commits into
masterfrom
mobile
Mar 28, 2014
Merged

DeepDiver1975 merged 26 commits into
masterfrom
mobile

Conversation

@jancborchardt

Copy link
Copy Markdown
Contributor

🚧 Stuff left to do:

  • hide Rename and Versions. For that the file actions need classes like action-rename etc. @DeepDiver1975 need your help. :)
  • make the menu toggle for the navigation only work on mobile – it shouldn’t be possible to toggle the navigation on desktop. @PVince81 can you help here?
  • show better indicator that the logo includes a menu toggle. For example a little 3*3 grid icon
  • ideally use Headroom.js so the header and controls bar is hidden on scrolling down, but immediately shown on a bit of scrolling up. Important to preserve space on mobile – separate issue now: Screen space on mobile, hide header #7826
  • retest on stock android browser Galaxy S3 @DeepDiver1975
  • landscape mode in non-mobile - style is ok - but actions are not shown – separate issue: How to handle mobile devices and file actions #7827
  • Upload process bar and cancel button deserve some love - they are rendered below the controls panel

And probably some more stuff I missed.

@karlitschek please check if the approach is fine in general.

@jancborchardt jancborchardt added this to the ownCloud 7 milestone Mar 14, 2014
@jancborchardt jancborchardt changed the title Mobile optimization for base layout and Files app [WIP] 🚧 Mobile optimization for base layout and Files app Mar 17, 2014
@jancborchardt jancborchardt changed the title [WIP] 🚧 Mobile optimization for base layout and Files app [WIP] Mobile optimization for base layout and Files app Mar 17, 2014
@jancborchardt

Copy link
Copy Markdown
Contributor Author

@DeepDiver1975 @PVince81 I really need your help here. :)

For all reviewers who want to check out more mobile styles:

…re', 'action-rename'

in order to allow proper translations of the action's display name an additional parameter has been added to the register function
@DeepDiver1975

Copy link
Copy Markdown
Contributor

@jancborchardt action classes have been added

@PVince81

Copy link
Copy Markdown
Contributor

@jancborchardt how do you detect mobile, media queries?

@PVince81

Copy link
Copy Markdown
Contributor

Here you go. I've used the same query as in your CSS.

@jancborchardt

Copy link
Copy Markdown
Contributor Author

@DeepDiver1975 thanks! Fixed some other CSS so now the actions are really hidden.

@PVince81 thank you too! :) There are 2 bugs at the moment though:

  • start with desktop width, then resize smaller: Clicking the logo will reload the page (probably because the action from the desktop mode is still attached)
  • start with mobile width, show and hide the navigation once, then resize: The navigation is missing in desktop width

@PVince81

Copy link
Copy Markdown
Contributor

Yes I knew that when implementing it, but I don't think that's a use case ?

@jancborchardt

Copy link
Copy Markdown
Contributor Author

Changing from portrait to landscape mode comes to mind. :)

Also, people do resize windows on the desktop as well. Be it to put it to the side (like fill half the screen) or stuff like that. So it would be better if that works I think.

@PVince81

Copy link
Copy Markdown
Contributor

Ok, fair enough. I guess this can be achieved with a resize detection.

@PVince81

Copy link
Copy Markdown
Contributor

It took longer than expected because the complexity is higher than I thought, so I added unit tests for that part as well. See above commit.

@PVince81

Copy link
Copy Markdown
Contributor

Only tested in Chrome... but IE8 should be fine, it shouldn't even enter that block.

@PVince81

Copy link
Copy Markdown
Contributor

PhantomJS doesn't seem to like media queries. Looking into it.

PhantomJS has a bug that makes it impossible to properly stub
window.matchMedia. This fix adds a wrapper as OC._matchMedia
that is used for unit tests
@PVince81

Copy link
Copy Markdown
Contributor

I've fixed the unit tests to deal with the PhantomJS matchMedia bug.

The unit test stub didn't work because the _matchMedia wrapper
was defined too late.

This fix defines it earlier.
@jancborchardt

Copy link
Copy Markdown
Contributor Author

Ok, I fixed some stuff: @jbtbnl the app title length and multiselect bar shift you mentioned. And @butonic I hid the »Deleted Files« button on mobile because it takes space and that view isn’t optimized yet anyway.

@butonic what do you mean by »the delete button no longer works (master does)«? The multiselect delete? Any idea why it doesn’t work?

@butonic

butonic commented Mar 21, 2014

Copy link
Copy Markdown
Contributor

@jancborchardt in the filelist try to delete a file by clicking the x to the right of an individual file. Nothing happens here :(

@butonic

butonic commented Mar 21, 2014

Copy link
Copy Markdown
Contributor

Oh there is a JS error:

Uncaught TypeError: Property 'actionFunc' of object #<Object> is not a function fileactions.js?v=d2d786a5b4b9b51d5a0114ac7fca32ab:117

@DeepDiver1975

Copy link
Copy Markdown
Contributor

Oh there is a JS error:

Oh - that was me I guess - sorry for the mess

@jancborchardt

Copy link
Copy Markdown
Contributor Author

I adjusted the breakpoint to 768px as mentioned by @jbtbnl in #7827.

Any issues left?

@jbtbnl

jbtbnl commented Mar 22, 2014

Copy link
Copy Markdown
Contributor

@jancborchardt some more ideas:

  • there is a small issue with the alignment of the action icons:

untitled

  • the "new" and "upload" button can be aligned to the right
  • <span class="summary"> can be hidden, no need to count files on mobile
  • the user's menu should display instantly (no animation)
  • breadcrumbs are replaced by "..." while there is enough space for the folder name.
  • "..." breadcrumbs are not restored when switching to desktop layout
  • table header could be hidden as well - with a mobile library detecting a long-press to enable selection mode (separate pull/issue?)
  • app menu is too large with only files enabled:

untitled

@DeepDiver1975

Copy link
Copy Markdown
Contributor

Looks good now on S3 stock browser - nasty whitespace above the controls is gone.

@jancborchardt

Copy link
Copy Markdown
Contributor Author

@jbtbnl from the issues you mentioned, I think the breadcrumbs one is interesting.

And there are some I would disagree with:

  • user menu should have quick animation – actually the app menu should have too
  • summary or table header should not be hidden
  • new and upload buttons should not be aligned to the right but instead be where they are on desktop to relate to the folder
  • app menu should have the same size always

@jancborchardt

Copy link
Copy Markdown
Contributor Author

I would say we should merge this before this pull request gets too big again. Any additional enhancements or issues we can fix separately.

A final review please @owncloud/designers

@jbtbnl

jbtbnl commented Mar 26, 2014

Copy link
Copy Markdown
Contributor

@jancborchardt yes, it's better to merge this and then handle additional stuff separately.

As for the menu animation, it's just way too slow on my BlackBerry Q10 and therefore annoying. I'm not against the animation but I'm certainly against bad performance :)

@scrutinizer-notifier

Copy link
Copy Markdown

A new inspection was created.

@MorrisJobke

Copy link
Copy Markdown
Contributor

👍 Tested on

  • Firefox and Chromium @ desktop
  • Firefox and Chrome @ Nexus 7
  • Firefox and Chrome @ Galaxy Nexus

Upload just works fine.

@ghost

ghost commented Mar 26, 2014

Copy link
Copy Markdown

@jancborchardt

Copy link
Copy Markdown
Contributor Author

@DeepDiver1975 if there are no objections in the next 4 hours, let’s merge? cc @owncloud/designers

DeepDiver1975 added a commit that referenced this pull request Mar 28, 2014
[WIP] Mobile optimization for base layout and Files app
@DeepDiver1975
DeepDiver1975 merged commit e3b951f into master Mar 28, 2014
@DeepDiver1975
DeepDiver1975 deleted the mobile branch March 28, 2014 09:27
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants