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

Allow to toggle sidebar and always show the toggle #989

Merged
merged 1 commit into from
Apr 8, 2020

Conversation

marcoambrosini
Copy link
Contributor

@marcoambrosini marcoambrosini commented Apr 3, 2020

  • Move the AppNavigationToggle in the AppNavigation
  • Move from #app-navigation IDs to have independent styling from server
  • Move AppNavigation open state IN the AppNavigation
  • Create a global toggle-navigation to emit with th event bus for any app to open the navigation (was originally the start of this pair programming, we ended up fixing far too much ^^')
  • Allow to toggle the navigation even when in desktop mode
  • Changed the animation/css from translate and shifting the AppContent to the left to using proper flex layout and not weird absolute positioning anymore 🎉
  • In mobile, opening the navigation does NOT shift the content, it just hovers it now. It avoid changing the whole layout and improve the rendering performances
  • Document the new global event (cc @ChristophWurst)
  • Emit event at first load

QA

  • Swiping
  • Toggling navigation
  • Scrolling navigation
  • Not being able to scroll left and see the hidden navigation
  • Settings

fix nextcloud/server#15831


@ma12-co, @skjnldsv & @ChristophWurst on a nice beer programming session on a sweet Friday afternoon 🍻

@marcoambrosini marcoambrosini added the 3. to review Waiting for reviews label Apr 3, 2020
@marcoambrosini marcoambrosini self-assigned this Apr 3, 2020
@skjnldsv skjnldsv added feature: app-content Related to the app-content component feature: app-navigation Related to the app-navigation component labels Apr 3, 2020
@skjnldsv skjnldsv changed the title Feature/noid/improve layout Allow to toggle sidebar and always show the toggle Apr 3, 2020
@skjnldsv skjnldsv added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Apr 3, 2020
@skjnldsv
Copy link
Contributor

skjnldsv commented Apr 3, 2020

image

Copy link
Contributor

@korelstar korelstar left a comment

Choose a reason for hiding this comment

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

Nice work! I've tested the current implementation and found out that scrolling the app-navigation is not possible anymore. This is required for small screens!

@skjnldsv skjnldsv added the enhancement New feature or request label Apr 3, 2020
@korelstar

This comment has been minimized.

@skjnldsv

This comment has been minimized.

@korelstar

This comment has been minimized.

@skjnldsv

This comment has been minimized.

@skjnldsv skjnldsv mentioned this pull request Apr 3, 2020
3 tasks
@jancborchardt
Copy link
Contributor

Very nice!

  • optional remember state ?

What is meant by this? If we have remembering, it should be per-app, and it should always work, not giving app developers a way to disable it.

@skjnldsv
Copy link
Contributor

skjnldsv commented Apr 6, 2020

What is meant by this? If we have remembering, it should be per-app, and it should always work, not giving app developers a way to disable it.

It means it can be in a separate pr to keep it clean. 😉

Copy link
Contributor

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

Just to make sure it’s not merged before:
We should make sure that the spec for "New message" and "New contact" buttons as discussed in https://github.com/nextcloud/server/issues/16934#issuecomment-542201187 is implemented before merging this. Otherwise the issue of "Mobile menu toggle for navigation overlaps with content (especially in Mail & Contacts)" will not only exist on mobile but on desktop too.

@georgehrke
Copy link
Contributor

@ma12-co Thanks! This also fixes an issue we had in the calendar, where the toggle was shown, even though there is no app-navigation. ❤️

@marcoambrosini
Copy link
Contributor Author

you should thank @skjnldsv more than me :)

@skjnldsv
Copy link
Contributor

skjnldsv commented Apr 7, 2020

We should make sure that the spec for "New message" and "New contact" buttons as discussed in nextcloud/server#16934 (comment) is implemented before merging this. Otherwise the issue of "Mobile menu toggle for navigation overlaps with content (especially in Mail & Contacts)" will not only exist on mobile but on desktop too.

I don't know actually.
I would rather keep it simple here, otherwise it's harder to review.
Also because technically they're not the same and require us to call and decide of the proper implementation.
This doesn't create regressions technically. Let's fix the remaining issues in OP and merge it :)

Copy link
Contributor

@korelstar korelstar left a comment

Choose a reason for hiding this comment

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

Nice work! I've tested the current implementation and found out that scrolling the app-navigation is not possible anymore. This is required for small screens!

In addition to this: the settings are not shown at the bottom anymore. Maybe, this issue is related to the above.

@marcoambrosini
Copy link
Contributor Author

@skjnldsv I guess those conflicts are because of #1002, what should I do here?

@skjnldsv
Copy link
Contributor

skjnldsv commented Apr 8, 2020

@skjnldsv I guess those conflicts are because of #1002, what should I do here?

Git rebase with strategy ours to keep the current master files in case of conflict and manually npm i @nextcloud/event-bus again

Copy link
Contributor

@korelstar korelstar left a comment

Choose a reason for hiding this comment

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

The two issues I've found are fixed, now. Looks very good, thanks!

@skjnldsv skjnldsv force-pushed the feature/noid/improve-layout branch from d777c0a to a106a2c Compare April 8, 2020 19:02
@skjnldsv
Copy link
Contributor

skjnldsv commented Apr 8, 2020

WORKED

@marcoambrosini
Copy link
Contributor Author

marcoambrosini commented Apr 8, 2020

WORKED

Oh nice!

@skjnldsv skjnldsv force-pushed the feature/noid/improve-layout branch 2 times, most recently from e194cf6 to 520c32f Compare April 8, 2020 19:28
@skjnldsv skjnldsv added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Apr 8, 2020
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
@skjnldsv skjnldsv force-pushed the feature/noid/improve-layout branch from 520c32f to 6c6bd17 Compare April 8, 2020 19:31
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.

Rebased & ready to go

@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 Apr 8, 2020
@skjnldsv skjnldsv merged commit 89fab6e into master Apr 8, 2020
@skjnldsv skjnldsv deleted the feature/noid/improve-layout branch April 8, 2020 19:36
@jancborchardt
Copy link
Contributor

We should make sure that the spec for "New message" and "New contact" buttons as discussed in nextcloud/server#16934 (comment) is implemented before merging this. Otherwise the issue of "Mobile menu toggle for navigation overlaps with content (especially in Mail & Contacts)" will not only exist on mobile but on desktop too.

I don't know actually.
I would rather keep it simple here, otherwise it's harder to review.
Also because technically they're not the same and require us to call and decide of the proper implementation.
This doesn't create regressions technically. Let's fix the remaining issues in OP and merge it :)

Fine with me as well, as then it will make it obvious that it will have to be fixed. :D

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 New feature or request feature: app-content Related to the app-content component feature: app-navigation Related to the app-navigation component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Always show toggle for snap.js to hide appnavigation
7 participants