nextcloud-vue icon indicating copy to clipboard operation
nextcloud-vue copied to clipboard

Sidebar tabbed navigation normal / hover / focus / active states.

Open marcoambrosini opened this issue 6 years ago • 9 comments

I think we should apply the same rules that are going to be implemented in the app navigation ( #425) since what we have now looks a bit confusing.

What do you think @nextcloud/designers?

Screenshot_20190921_200224

marcoambrosini avatar Sep 21 '19 18:09 marcoambrosini

@ma12-co current sidebar does not look like that and have already been updated a bit, it now have a far better contrast and usability :)

But We could definitely see how we can improve it a bit further!

skjnldsv avatar Sep 22 '19 14:09 skjnldsv

You're right @skjnldsv, this is the current sidebar: Screenshot_20190922_164125 I still think that bringing the appnavigation behavior here would be a nice improvement!

marcoambrosini avatar Sep 22 '19 14:09 marcoambrosini

Do you mean we should do the whole background stuff? Not sure if that would look nice on the tab bar since it has an "open top" and it would look a bit boxy, no? If you have mockups for that we can look at it for sure though. :)

jancborchardt avatar Sep 23 '19 12:09 jancborchardt

Those new colors are very light, but yeah there's that risk.. Maybe we should see it with a live example, it will be easier to try out the behavior! I'll put that on my todo list ;)

marcoambrosini avatar Sep 23 '19 18:09 marcoambrosini

So @nimishavijay trialed several design options for sidebar tabs: image

And we arrived at this being the best solution:

  • Very little change from the current layout, mostly just visual design
  • Works well with translations and possibly long strings
  • Works well with 3 or more tabs
  • Gives a clear visual indication as to how the tabs belong together

image

What do you think @marcoambrosini @raimund-schluessler @skjnldsv? :)

jancborchardt avatar Aug 31 '22 10:08 jancborchardt

I think it looks nice. Am I right, that as a first step we would only touch the tabs bar? We could use the NcCheckboxRadioSwitch with the button-variant for this. It would need some style improvements and an icon slot, but it should work in principle. And it would help keeping everything consistent. This is how it looks at the moment: Screenshot 2022-08-31 at 13-31-43 Nextcloud Vue Style Guide

raimund-schluessler avatar Aug 31 '22 11:08 raimund-schluessler

What do you think @marcoambrosini @raimund-schluessler @skjnldsv? :)

Looks great! Could you also post what it should look like if there is like 5 or 6 tabs?

skjnldsv avatar Aug 31 '22 12:08 skjnldsv

Am I right, that as a first step we would only touch the tabs bar? We could use the NcCheckboxRadioSwitch with the button-variant for this. It would need some style improvements and an icon slot, but it should work in principle. And it would help keeping everything consistent. This is how it looks at the moment:

Yes, first step would be only the tabs bar. The tabs bar is a Vue component, isn’t it, so the changes can be simply done in there?

Cause also to reply to @skjnldsv question – there is very little difference from the current tabs to this mockup, essentially just a border around the whole thing and a background to the current item:

Before After
image image

I tried it out in the inspector and here’s the changes I had to make – I was only a bit confused cause a lot of them I had to do double for some reason? (Still missing focus borders, but we could just add a border by default on entries, making it look normal on hover, and 2px dark/light on focus.)


/* Inline #402 | https://cloud.nextcloud.com/apps/files/?dir=/&fileid=982 */

.app-sidebar-tabs__tab a[data-v-15932673]:not(.active):hover, .app-sidebar-tabs__tab a[data-v-15932673]:not(.active):focus {
  /* border-bottom-color: var(--color-background-darker); */
  /* box-shadow: inset 0 -1px 0 var(--color-background-darker); */
}

.app-sidebar-tabs__tab a[data-v-15932673] {
  /* opacity: .7; */
  /* border-bottom: 1px solid var(--color-border); */
  padding-top: 32px;
  border-radius: var(--border-radius-large);
}

.app-sidebar-tabs__tab a.active[data-v-15932673] {
  /* border-bottom-color: var(--color-text-light); */
  /* box-shadow: inset 0 -1px 0 var(--color-text-light); */
  background-color: var(--color-primary-light);
}

.app-sidebar-tabs__tab-icon[data-v-15932673] {
  /* top: 0; */
  /* opacity: .7; */
  top: 12px;
}

.app-sidebar-tabs__nav[data-v-15932673] {
  /* margin-top: 10px; */
  margin: 0 8px;
  border: 2px solid var(--color-primary-light);
  border-radius: calc(var(--border-radius-large) + 2px);
}

.app-sidebar-tabs__tab a[data-v-15932673]:focus {
  /* border-bottom-color: var(--color-primary-element); */
  /* box-shadow: inset 0 -1px 0 var(--color-primary-element); */
}

.app-sidebar-tabs__tab a[data-v-15932673]:hover, .app-sidebar-tabs__tab a[data-v-15932673]:focus, .app-sidebar-tabs__tab a[data-v-15932673]:active, .app-sidebar-tabs__tab a.active[data-v-15932673] {
  background-color: var(--color-background-hover);
}

/* Inline #53 | https://cloud.nextcloud.com/apps/files/?dir=/&fileid=982 */

.app-sidebar-tabs__tab a[data-v-15932673]:not(.active):hover, .app-sidebar-tabs__tab a[data-v-15932673]:not(.active):focus {
  /* border-bottom-color: var(--color-background-darker); */
  /* box-shadow: inset 0 -1px 0 var(--color-background-darker); */
}

.app-sidebar-tabs__tab a.active[data-v-15932673] {
  /* border-bottom-color: var(--color-text-light); */
  /* box-shadow: inset 0 -1px 0 var(--color-text-light); */
  background-color: var(--color-primary-light);
  border-radius: var(--border-radius-large);
}

.app-sidebar-tabs__tab a[data-v-15932673] {
  /* opacity: .7; */
  /* border-bottom: 1px solid var(--color-border); */
}

.app-sidebar-tabs__tab a[data-v-15932673]:focus {
  /* border-bottom-color: var(--color-primary-element); */
  /* box-shadow: inset 0 -1px 0 var(--color-primary-element); */
}

.app-sidebar-tabs__tab-icon[data-v-15932673] {
  /* opacity: .7; */
}

jancborchardt avatar Sep 01 '22 10:09 jancborchardt

Could you also post what it should look like if there is like 5 or 6 tabs?

image

I imagine it would look something like this. I also tried a version with 2 rows, but it didn't look good. In the future we can try to make sure that we are not trying to fit so many tabs into such a small space

cc @jancborchardt

nimishavijay avatar Sep 05 '22 11:09 nimishavijay