Better custom ContextDrawer support
Open, Needs TriagePublic

Description

Kirigami supports custom ContextDrawer and this was really helpful for implementing NeoChat fancy sidebar. Unfortunately, a custom drawer also means that the contextualActions won't be displayed at all on mobile.

This isn't a problem for NeoChat, but I tried to add a sidebar with the variable in Kalgebra mobile and while this makes the interface much more powerful on the desktop it also breaks the mobile usecase.

Probably it would be a good idea to only move the actions to the context Drawer if it is a Kirigami.ContextDrawer and otherwise move the context actions to the top like on the desktop.

ognarb created this task.Dec 12 2020, 3:19 PM

What happens if you force toolbar header style on mobile? As far as I know there is nothing special excluding actions from the toolbar, it's just that we use a different header style on mobile, so it should just display your contextual actions.

@ahiemstra for the moment I used a conditional drawer using a more desktop-oriented drawer on the desktop and a contextDrawer on mobile. See https://invent.kde.org/education/kalgebra/-/merge_requests/6

I prefer actions always being in a sidebar, especially via mobile, so I believe that mimicking how desktop applications provide their actions is regressive.