cosmic-settings icon indicating copy to clipboard operation
cosmic-settings copied to clipboard

feat(Workspace): add missing settings and update design

Open acolombier opened this issue 1 year ago • 17 comments

This work is mostly focused on the look-n-feel.

Design

image

Current look

https://github.com/user-attachments/assets/880ccea8-b2d4-40af-9aea-752be378b57d

Note there is currently a limitation impacting SVG rendering in iced 0.12.x, but this appear to be fixed in 0.13

Depends of:

  • [x] https://github.com/pop-os/libcosmic/pull/599
  • [x] https://github.com/iced-rs/iced/issues/2566 (backport to 0.12.x or libcosmic upgrade to 0.13.x)
  • [ ] https://github.com/pop-os/cosmic-comp/pull/811
  • [ ] https://github.com/pop-os/cosmic-workspaces-epoch/pull/104

acolombier avatar Sep 04 '24 15:09 acolombier

On the video it looks like the illustrations for workspaces spanning displays and being separate is very dark. Do you know why that it? Are those just SVGs?

I also can't tell from the video is workspace thumbnails change position on the illustration depending on their placement (left, right etc.)

Another question is if the illustrations change for light mode?

The rest of it looks nice on the video, thanks for working on it.

maria-komarova avatar Sep 04 '24 17:09 maria-komarova

On the video it looks like the illustrations for workspaces spanning displays and being separate is very dark. Do you know why that it? Are those just SVGs?

Yes, this is due to the bug in iced I attached above.

I also can't tell from the video is workspace thumbnails change position on the illustration depending on their placement (left, right etc.)

Does that mean that, for example

  • if Left is selected, you get:

image

if Right is selected, you get:

image

If so, would it be worth adding the assets in the design?

Another question is if the illustrations change for light mode?

It does! :)

acolombier avatar Sep 04 '24 17:09 acolombier

Should the trackpad gestures dynamically update depending on workspace orientation and thumbnail placement (once those gestures are implemented/configurable in cosmic-comp)? E.g. if workspaces are horizontal and on the bottom, a four-finger swipe up opens the workspace overview, but if they're on the top, a swipe down would open the overview (and similar for vertical workspaces).

git-f0x avatar Sep 04 '24 17:09 git-f0x

Should the trackpad gestures dynamically update depending on workspace orientation and thumbnail placement (once those gestures are implemented/configurable in cosmic-comp)?

This is already the case. Are you suggesting it shouldn't?

acolombier avatar Sep 04 '24 17:09 acolombier

Oh, right, in the designs the text doesn't change, but in the video it works properly. (should they maybe be called Touchpad gestures, since that's how it's referred to on other pages?) Though does it possibly make more sense to reverse the gesture direction (e.g. when workspaces are on the left, a swipe right opens them)?

git-f0x avatar Sep 04 '24 18:09 git-f0x

If so, would it be worth adding the assets in the design?

Assets are easy to add. Does the thumbnail placement actually change in the overview? If not, we should wait until it does before introducing the setting.

Same thing with trackpad gestures. Do they actually change? They should be but I want to double check.

And same thing with workspace overview thumbnails options like Show workspace number and Show workspace name. I don't believe those are implemented yet so they shouldn't be present in Settings. The mockups you are looking at have been adjusted for first release with a lot of things removed from it.

About the bug in Iced - we should wait merging those illustrations until the bug is fixed.

maria-komarova avatar Sep 04 '24 19:09 maria-komarova

Assets are easy to add.

Great. Please ping me when they are in so I can update the PR!

Does the thumbnail placement actually change in the overview? If not, we should wait until it does before introducing the setting.

Same thing with trackpad gestures. Do they actually change?

Currently not - the setting is not applied yet. I don't quite know how it needs to be persisted for the cosmic-comp to pick it, assuming cosmic-comp already support it.

Note I'm not developing live on COSMIC as well, so this work was mostly focused on the UI only. I might give it a go at some point using a VM (sadly I cannot run cosmic on my setup due to a long standing issue)

The mockups you are looking at have been adjusted for first release with a lot of things removed from it.

Yes, most of the work I've done here is for the second release. AFAIK, Workspace as it stands is is already ready for the first release.

About the bug in Iced - we should wait merging those illustrations until the bug is fixed.

Agreed - this is already in the PR description

image

I have updated the PR title so it is more clear.

acolombier avatar Sep 04 '24 19:09 acolombier

Since libcosmic is now based on iced 0.13, the SVG bug has been resolved.

I have also added the extra assets for right and bottom workspace overview thumbnails as @maria-komarova requested.

Screencast from 07-11-24 21:41:55.webm

acolombier avatar Nov 07 '24 21:11 acolombier

Please remove or comment out non-functional settings, like the Workspace Overview Thumbnails section and Thumbnail placement. The App Library gesture also isn't implemented yet afaik, so that should also probably be commented out. Also, the Trackpad gestures item should only show up if the system has a touchpad. See: https://github.com/pop-os/cosmic-settings/blob/42a3061da0354f0e461b95cfdb80bc2116fd80c7/cosmic-settings/src/pages/input/mod.rs#L204-L221

git-f0x avatar Nov 07 '24 23:11 git-f0x

You disabled the Multi-monitor Behavior section, instead of the Workspace Overview Thumbnails (workspace_overview()) section. The Workspaces Orientation section will have to be refactored to only show the left and top workspace orientation images (depending on selection), and not use the page.comp_workspace_config.workspace_thumbnail_placement variable, since it doesn't exist in cosmic-comp and cosmic-workspaces-epoch don't support bottom and right positions yet.

git-f0x avatar Nov 08 '24 00:11 git-f0x

Thanks for the quick review @git-f0x - I have commented out features unsupported by the cosmic-workspaces-epoch. I'm going to try to add the orientation in there, the multi-monitor behaviour is probably something I won't be able to do as I'm still struggling to understand the cosmic-comp code. Is that something you could give me pointers to or do you reckon it's best letting someone else look into it?

acolombier avatar Nov 08 '24 00:11 acolombier

Workspace Overview Thumbnails is supported and functional in cosmic-workspaces-epoch AFAICT - Multi-monitor Behavior isn't

The Workspaces Orientation section will have to be refactored to only show the left and top workspace orientation

That should already be the case (I've hidden the dropdown for left/right, top/bottom selection)

acolombier avatar Nov 08 '24 00:11 acolombier

Workspace Overview Thumbnails is supported and functional in cosmic-workspaces-epoch AFAICT

Those settings were there previously, but were removed because they were non-functional. Toggling either doesn't change anything in workspaces.

Multi-monitor Behavior isn't

It's supported, and is present in the current master.

That should already be the case (I've hidden the dropdown for left/right, top/bottom selection)

The images cannot show up, since the chosen image depends on a non-existing variable (page.comp_workspace_config.workspace_thumbnail_placement), and that variable has to be removed for Settings to compile.

git-f0x avatar Nov 08 '24 01:11 git-f0x

Workspace Overview Thumbnails is supported and functional in cosmic-workspaces-epoch AFAICT

Those settings were there previously, but were removed because they were non-functional. Toggling either doesn't change anything in workspaces.

Weird - this is working for me. Changing horizontal/vertical does change where the workspace thumbnails get displayed

Multi-monitor Behavior isn't

It's supported, and is present in the current master.

Ah great. I will bring it back then.

That should already be the case (I've hidden the dropdown for left/right, top/bottom selection)

The images cannot show up, since the chosen image depends on a non-existing variable (page.comp_workspace_config.workspace_thumbnail_placement), and that variable has to be removed for Settings to compile.

This PR depends of this one which does add the relevant settings. I've just implemented the support for right/bottom placement on cosmic-workspaces-epoch and testing right now. Should submit a PR in the next few hours

(I'm using a cargo.toml patch locally, which make the repo to point at my comp PR)

acolombier avatar Nov 08 '24 01:11 acolombier

Weird - this is working for me. Changing horizontal/vertical does change where the workspace thumbnails get displayed

I'm referring to the Workspace Overview Thumbnails section, with show name and show number, not the Workspaces Orientation section for choosing vertical/horizontal workspaces.

This PR depends of https://github.com/pop-os/cosmic-comp/pull/811 which does add the relevant settings. I've just implemented the support for right/bottom placement on cosmic-workspaces-epoch and testing right now. Should submit a PR in the next few hours

Oh, didn't know you had implemented it in workspaces as well. Great work!

git-f0x avatar Nov 08 '24 01:11 git-f0x

with show name and show number, not the Workspaces Orientation section

Ah sorry, it's late over there. I've noticed that cosmic-workspaces-epoch does display the workspace number under the thumbnail, so I'll see if I can at least implement number toggle.

image

acolombier avatar Nov 08 '24 01:11 acolombier

I have implemented the features in cosmic-workspaces-epoch so I have restored the settings. I added the cosmic-workspaces-epoch as a dependency above, although the order release doesn't matter, only cosmic-comp setting definition needs to go first

acolombier avatar Nov 08 '24 10:11 acolombier