spreed icon indicating copy to clipboard operation
spreed copied to clipboard

Mobile View: should open the chat list first

Open szaimen opened this issue 5 years ago • 10 comments

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.

  1. The default view when opening the chat app: 20190702_014048

  2. Probably a better default site: 20190702_014637

szaimen avatar Jul 01 '19 23:07 szaimen

@nextcloud/designers You can test this feature by adding

})(OC, OCA, Marionette, Backbone, _, $);

$(document).ready(function () {
	if ($(window).width() <= 600) {
		$('#app-navigation-toggle').click();
	}
});

at the bottom of app.js.

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 avatar Aug 02 '19 15:08 danxuliu

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

jancborchardt avatar Aug 06 '19 14:08 jancborchardt

This is quite messed up on my screen on Firefox, Android 10 Samsung a6 NC19.0.1

Screenshot_20200722-005147_Firefox

rubo77 avatar Jul 21 '20 22:07 rubo77

@rubo77 I think this is doesn't have anything to do with this issue. Could you please open another issue with that?

szaimen avatar Jul 21 '20 23:07 szaimen

@ma12-co something for you :)

jancborchardt avatar Jul 22 '20 09:07 jancborchardt

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

marcoambrosini avatar Jul 22 '20 11:07 marcoambrosini

Just a little comment, when you directly load into a conversation it should also hide the left sidebar

nickvergessen avatar Jul 22 '20 11:07 nickvergessen

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

szaimen avatar Jun 15 '22 00:06 szaimen

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

szaimen avatar Jun 15 '22 01:06 szaimen

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

PVince81 avatar Aug 05 '22 08:08 PVince81