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

Now using dynamic percentual appmenu limit #5244

Merged
merged 3 commits into from
Jun 14, 2017

Conversation

patschi
Copy link
Member

@patschi patschi commented Jun 4, 2017

PR for using percentual appmenu limit like discussed in #5135. Further discussions in the linked issue.

Signed-off-by: Patrik Kernstock <info@pkern.at>
@patschi patschi added 3. to review Waiting for reviews design Design, UI, UX, etc. labels Jun 4, 2017
@mention-bot
Copy link

@patschi, thanks for your PR! By analyzing the history of the files in this pull request, we identified @LukasReschke, @icewind1991 and @nickvergessen to be potential reviewers.

@jancborchardt
Copy link
Member

@nextcloud/designers let’s review! :)

@karlitschek what do you think about this approach?

@karlitschek
Copy link
Member

nice 👍

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.

Seems better now! :)

@jancborchardt
Copy link
Member

jancborchardt commented Jun 9, 2017

@juliushaertl @eppfel @MorrisJobke @pixelipo what do you think? :)

Copy link
Contributor

@pixelipo pixelipo left a comment

Choose a reason for hiding this comment

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

Definitely doesn't look crowded - on my FullHD screen, I get 12 apps in that limit:
image
I think 50% would be ok as well, but using more than 12 apps on a daily basis seems like an edge case anyway...If one needs more, one should use browser bookmarks...

core/js/js.js Outdated
@@ -1512,12 +1512,17 @@ function initCore() {

var resizeMenu = function() {
var appList = $('#appmenu li');
var availableWidth = $('#header-left').width() - $('#nextcloud').width() - 44;
var usePercentualAppMenuLimit = 33;
var availableWidth = (($('#header-left').width() - $('#nextcloud').width()) / 100 * usePercentualAppMenuLimit);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just multiply by 0.33? It would get the same result and decimal is an acceptable representation for percentage.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, it's just a personal preference. I'm fine with decimal notation as well.

core/js/js.js Outdated
@@ -1512,12 +1512,17 @@ function initCore() {

var resizeMenu = function() {
var appList = $('#appmenu li');
var availableWidth = $('#header-left').width() - $('#nextcloud').width() - 44;
var usePercentualAppMenuLimit = 33;
var availableWidth = (($('#header-left').width() - $('#nextcloud').width()) / 100 * usePercentualAppMenuLimit);
var appCount = Math.floor((availableWidth)/44);
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not a big fan of hardcoded values. Since we are already fetching logo and app-menu widths from DOM, why not fetch single-app-width as well? It would save us one headache if/when Nextcloud gets redesigned...

Copy link
Member Author

Choose a reason for hiding this comment

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

Tested fine using $(appList).width(). Or any other prefered solution from your side?

Copy link
Contributor

Choose a reason for hiding this comment

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

Perfect!

@jancborchardt
Copy link
Member

I think 50% would be ok as well, but using more than 12 apps on a daily basis seems like an edge case

Yup, let's leave it at 33% because we also discussed different values before. :) Your other comments are good!

Signed-off-by: Patrik Kernstock <info@pkern.at>
@codecov
Copy link

codecov bot commented Jun 10, 2017

Codecov Report

Merging #5244 into master will increase coverage by <.01%.
The diff coverage is 71.42%.

@@             Coverage Diff              @@
##             master    #5244      +/-   ##
============================================
+ Coverage     54.14%   54.15%   +<.01%     
  Complexity    22314    22314              
============================================
  Files          1381     1381              
  Lines         85472    85484      +12     
  Branches       1325     1329       +4     
============================================
+ Hits          46283    46294      +11     
- Misses        39189    39190       +1
Impacted Files Coverage Δ Complexity Δ
core/js/js.js 61.83% <71.42%> (+0.63%) 0 <0> (ø) ⬇️
apps/comments/lib/EventHandler.php 79.16% <0%> (-8.34%) 7% <0%> (ø)

@juliusknorr
Copy link
Member

I'm not that happy with the 33%. I usually have my browser on one half of the screen and that way only 4 icons are visible. Not sure if most people have their browser on full screen, but for picking a higher percentage number would make more sense.

2017-06-10-230356_1920x1079_scrot

@jancborchardt
Copy link
Member

Right, also just saw that. I agree and it's different than we specified. Because here it's in desktop mode (more than 768px width) and hence at least the 8 icons (or 7 + menu) should be shown.

  • Mobile (sub 768px): Show as many as possible with a bit of margin
  • Desktop: Use max 33% of header width but show at least 8 icons (or 7+menu)

Ok?

Copy link
Member

@eppfel eppfel left a comment

Choose a reason for hiding this comment

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

..as others mentioned before. It does not show enough icons on lower resolutions

@juliusknorr
Copy link
Member

@eppfel @jancborchardt I've pushed a commit to fix that. Please review.

2017-06-14-105912_340x79_scrot
2017-06-14-105930_433x87_scrot
2017-06-14-105953_742x86_scrot
2017-06-14-110025_1438x88_scrot

Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr juliusknorr force-pushed the dynamic-percentual-appmenu-limit branch from 7a8e763 to cec2893 Compare June 14, 2017 09:14
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.

Seems good now! :)

@MorrisJobke MorrisJobke merged commit fc47d0b into master Jun 14, 2017
@MorrisJobke MorrisJobke deleted the dynamic-percentual-appmenu-limit branch June 14, 2017 16:36
@ASmith-
Copy link

ASmith- commented May 23, 2018

Why isn't there a Nextcloud administrator option to change a hard-coded default 33% etc.? To me it makes no sense whatsoever to present a 60% Blank Tool Bar to users and hide 11 active tool icons in the ... additional tool app bin forcing users to hunt and peck for them at best. Users want to see active tools at a mere glance, Nextcloud is now hiding a majority of the active tools in its tool overflow bin ... to keep the top tool bar Empty Space which makes no sense whatsoever.

Let the individual administrators set and determine the % of empty tool bar space if need be on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews design Design, UI, UX, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants