spreed
spreed copied to clipboard
Mobile View: should open the chat list first
Is your feature request related to a problem? Please describe. The default side when opening the chat app on mobile isn't very compelling: I'm not seeing the chats.
Describe the solution you'd like A clear and concise description of what you want to happen. I think on mobile view when I open the talk app it should open the chat list first.
Additional context Add any other context or screenshots about the feature request here.
-
The default view when opening the chat app:
-
Probably a better default site:
@nextcloud/designers You can test this feature by adding
})(OC, OCA, Marionette, Backbone, _, $);
$(document).ready(function () {
if ($(window).width() <= 600) {
$('#app-navigation-toggle').click();
}
});
It is a bit hacky, but it is necessary to wait until the snapper is initialized by Nextcloud server (which is done in a jQuery ready
handler), and I am not aware of any events that could be listened to for that.
If this behaviour should be added to Talk, which window width should trigger it? Note that when the navigation bar is opened it moves the app contents of Talk to the right, so the Join a conversation or start a new one message is cut with some width sizes which, in my opinion, does not look good for the starting page (that is why I used 600px in that example code instead of the standard 1024px of the mobile breakpoint; at 600px the message is cut too, but most of it is hidden anyway which in my opinion looks better than just cutting the final letters ;-) ).
@danxuliu good one! I’d say let’s always make sure the sidebar shows on views where it wouldn’t be, so 1024. We can always enhance the emptycontent view.
This is quite messed up on my screen on Firefox, Android 10 Samsung a6 NC19.0.1
@rubo77 I think this is doesn't have anything to do with this issue. Could you please open another issue with that?
@ma12-co something for you :)
@szaimen that's related because that's what you actually see on first load since the rewrite to vue. Ok, so as discussed, the sidebars behavior on mobile should be:
- On first load, the conversations list is displayed;
- A click on a conversation routes to it and automatically closes the left sidebar;
- The right sidebar is never shown unless toggled;
Just a little comment, when you directly load into a conversation it should also hide the left sidebar
In order to fix the messy layout for mobile when joining a chat we may need to change this function https://github.com/nextcloud/spreed/blob/9a00b48798ae3d5f38e2070166954edcee09de99/src/App.vue#L442
Edit: we may simply fix this by removing this line: https://github.com/nextcloud/spreed/blob/9a00b48798ae3d5f38e2070166954edcee09de99/src/App.vue#L245
Edit: I do not understand why the onresize function is needed at all. Will habe a look if we can simply remove that...
Regarding this feature: we may be able to open the sidebar automatically using https://github.com/nextcloud/nextcloud-vue/blob/cd98e1dedd3f265ab6555041f198f59a470b5b27/src/components/AppNavigation/AppNavigation.vue#L38-L42 if the viewport ismobile is true and of course only if on the start page is shown
See also https://github.com/nextcloud/nextcloud-vue/blob/cd98e1dedd3f265ab6555041f198f59a470b5b27/src/components/AppNavigation/AppNavigation.vue#L87
I was about to report the sidebar not closing automatically, it's also an issue on narrow screens, not only mobile. For example on the company instance if you narrow the screen horizontally, it switches to "hamburger menu" mode and it's very annoying that when I switch conversations I need to manually close it (and I switch often).
should "mobile view automatically open sidebar" and "close it when selecting an entry or clicking inside the conversation" be separate tasks/topics ?
is old Snapper from server an issue ? I remember that there were ideas/plans to get rid of it / replace it