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

Properly align appnavigationtoggle #1946

Merged
merged 3 commits into from
Jun 9, 2022

Conversation

marcoambrosini
Copy link
Contributor

...Upstreaming more talk v-deeps

Before:
Screenshot from 2021-05-10 15-25-53

After:
Screenshot from 2021-05-10 15-29-15

Signed-off-by: Marco Ambrosini marcoambrosini@pm.me

@marcoambrosini marcoambrosini added 3. to review Waiting for reviews bug Something isn't working design Design, UX, interface and interaction design technical debt labels May 10, 2021
@marcoambrosini marcoambrosini added this to the 4.0.0 milestone May 10, 2021
@raimund-schluessler
Copy link
Contributor

raimund-schluessler commented May 11, 2021

Honestly, I do not think this is a good idea. The AppNavigationToggle has no own space in our layout, i.e. the app-content does not reserve space for it. This means we have a lot of problems with the AppNavigationToggle as it is positioned already, since it overlaps the content see https://github.com/nextcloud/server/issues/16934

If we start to move it around now, this will become even worse. See the Tasks app for example (sorry, it's always Tasks 🙈):

AppNavigation

So, in case you really decide to do this, it will be a breaking change at least and other apps will need to overwrite the style as it doesn't fit their layout.

Here, is how it looks for Contacts (still has the old style toggle):
Screenshot_2021-05-11 Kontakte - Nextcloud

And here for an app with a Breadcrumb bar:
Screenshot_2021-05-11 Inventar - Nextcloud

@raimund-schluessler raimund-schluessler added the breaking PR that requires a new major version label May 11, 2021
@marcoambrosini
Copy link
Contributor Author

@raimund-schluessler I understand your concern but I think that the spacing of the toggle relative to other elements is off. We fixed that in talk and I'm trying to bring custom changes we have there upstream. Of course this would be a breaking change. @skjnldsv thoughts?

@raimund-schluessler
Copy link
Contributor

@raimund-schluessler I understand your concern but I think that the spacing of the toggle relative to other elements is off. We fixed that in talk and I'm trying to bring custom changes we have there upstream. Of course this would be a breaking change. @skjnldsv thoughts?

The problem is that other apps will have to undo the custom changes of Talk because they won't work with their layout. So instead of having one custom CSS rule in Talk, we will have multiple (one in every other app instead).

@skjnldsv
Copy link
Contributor

The problem is that other apps will have to undo the custom changes of Talk because they won't work with their layout

Yes, this is indeed not acceptable.
Either we have a dedicated variable that matches such spacing? (#1946 (comment)) Or we find something different? 🤷

@marcoambrosini
Copy link
Contributor Author

@raimund-schluessler I think that other apps could benefit from a standardized 8px spacing too.
Looking at your screenshot, in tasks it seems that the toggle with the new margin is now almost aligned with the input field. With this change, If the input field had a height of 44px it could align perfectly with the toggle, similar to the avatar here:

Screenshot from 2021-05-11 09-59-44

@raimund-schluessler
Copy link
Contributor

raimund-schluessler commented May 11, 2021

@raimund-schluessler I think that other apps could benefit from a standardized 8px spacing too.
Looking at your screenshot, in tasks it seems that the toggle with the new margin is now almost aligned with the input field. With this change, If the input field had a height of 44px it could align perfectly with the toggle, similar to the avatar here:

Screenshot from 2021-05-11 09-59-44

I don't say that standardization is bad, or that other apps won't benefit from having it aligned. But unless we find a proper space for the AppNavigationToggle in the layout which accounts for its presence, every app will still have to do custom changes to it's position.

For example, in case we adapt the files app to use the vue-components as well at some point, having an 8 px top spacing will just not work with the breadcrumb bar (since it doesn't have a padding at the top).

And on a side note: In my impression, the AppNavigationToggle shouldn't be aligned with any element in the content area, since it doesn't logically belong there (e.g. having it aligned with the input field in Tasks, suggests a logical relation to it, which does not exist). Having it top aligned with the AppNavigation pane is the proper solution imho, but that's just my taste.

@jancborchardt
Copy link
Contributor

So my take just from the design / user perspective:

  • I do think the toggle should be aligned with elements in the content area. This is similar to what Android and iOS do
  • Yes it is not related to the content really, but it should still be visually pleasing, meaning e.g. vertically centered.
  • We can talk about the details of how much exactly, if 8px or 4px
  • It might be variable depending on the app – Talk’s top bar will be higher cause it has 2 lines. But the button should not stick to the top left like it does now, that just looks off.
  • Yes we should standardize the units, we want to move to use bases of 4 so we can use that as a variable?

Regarding the specific app examples:

  • In Talk it looks great, as shown
  • In Contacts I think we can align it with a button, which should be 44px high as well and will have some distance from the top too, as per https://github.com/nextcloud/server/issues/16934#issuecomment-542201187
  • Possibly same in Mail
  • Tasks could be similar, as per your screenshot there’s very little to adjust @raimund-schluessler – what Android does is that the navigation toggle is actually inside the search field on the left.
  • In Files and other apps with the breadcrumbs bar, it’s also not bad to have the breadcrumbs bar a bit larger

@raimund-schluessler
Copy link
Contributor

  • In Files and other apps with the breadcrumbs bar, it’s also not bad to have the breadcrumbs bar a bit larger

Altough I think more spacing above the breadcrumb bar is not really necessary, it's fine with me. But could we then maybe only use 4px top like in this screenshot? 8px would look quite weird I think.

4px:
Breadcrumb

8px:
8px

@raimund-schluessler
Copy link
Contributor

  • Tasks could be similar, as per your screenshot there’s very little to adjust @raimund-schluessler – what Android does is that the navigation toggle is actually inside the search field on the left.

I don't have a problem adjusting the layout. I just understood it so that you want to have the same button position for all apps. And I am a bit skeptical that this will really work out well. Mainly because many apps don't position the AppNavigationToggle button well just as it is located now. And moving it further into the content will make this problem even worse (see e.g. Contacts or Calendar).

@jancborchardt
Copy link
Contributor

@raimund-schluessler your example looks great! :)

And yeah, the positioning probably doesn’t have to be exactly the same in all apps – but in no app should it stick to the very top left and be unaligned to any content, like it is now.

@skjnldsv skjnldsv added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Jun 4, 2021
@skjnldsv skjnldsv marked this pull request as draft June 4, 2021 12:52
@skjnldsv skjnldsv modified the milestones: 4.0.0, 5.0.0 Jun 4, 2021
@marcoambrosini
Copy link
Contributor Author

Let's go with 4 then, I'll reduce talk's topbar height

@marcoambrosini marcoambrosini marked this pull request as ready for review June 18, 2021 10:46
@skjnldsv
Copy link
Contributor

Ok, so var(--top-bar-spacing) @skjnldsv ??

🤷

@marcoambrosini marcoambrosini force-pushed the bugfix/fix-toggle-alignment branch 3 times, most recently from 4729b40 to 74f0512 Compare June 29, 2021 09:50
Copy link
Contributor

@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.

Hum, shouldn't those also be available as a css var within content?
We should maybe start doing this (add them to the Content so anything within can use it for example?)

@marcoambrosini
Copy link
Contributor Author

ping @skjnldsv

@marcoambrosini
Copy link
Contributor Author

What should we do here????

@jancborchardt
Copy link
Contributor

Ok, so var(--top-bar-spacing) @skjnldsv ??

Isn’t that a good approach as you suggested?

Copy link
Contributor

@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.

I would like this new css variable to be documented tbh

@jancborchardt
Copy link
Contributor

By the way @raimund-schluessler, with the new breadcrumb component with bigger visual elements, maybe the 8px spacing also makes sense for Files now? The slightly more whitespace is definitely nice, and then it would fit for Talk, Files and probably others too.

@marcoambrosini
Copy link
Contributor Author

I would like this new css variable to be documented tbh

@skjnldsv where should we add the docs? To this file?

@skjnldsv
Copy link
Contributor

I would like this new css variable to be documented tbh

@skjnldsv where should we add the docs? To this file?

Very good question :)
Maybe we need to dedicated design system documentation.
There was the old one in the docs, but it's proably not very used nor up to date anymore.
We could add a dedicated component-related one here? 🤔

At the very least, I would add that to the AppContent documentation

@raimund-schluessler raimund-schluessler modified the milestones: 5.0.0, 6.0.0 Feb 11, 2022
@raimund-schluessler
Copy link
Contributor

How should we proceed here? We are heading for a new major release and it would be good to have this included, I think.

Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
@marcoambrosini
Copy link
Contributor Author

Added a couple of lines of docs in the docs section and in the css section where the variable is declared, let's get this in?

@raimund-schluessler
Copy link
Contributor

raimund-schluessler commented Jun 9, 2022

Added a couple of lines of docs in the docs section and in the css section where the variable is declared, let's get this in?

Fine with me. Apps will still need to adjust the position to make it work with their layout, though.

Co-authored-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
@marcoambrosini marcoambrosini merged commit 7ddc566 into master Jun 9, 2022
@marcoambrosini marcoambrosini deleted the bugfix/fix-toggle-alignment branch June 9, 2022 08:58
@juliushaertl juliushaertl mentioned this pull request Aug 2, 2022
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 breaking PR that requires a new major version bug Something isn't working design Design, UX, interface and interaction design technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants