podman-desktop icon indicating copy to clipboard operation
podman-desktop copied to clipboard

Different colour header on top of modal for push images

Open cdrage opened this issue 1 year ago • 4 comments

Bug description

Screenshot 2024-06-04 at 2 01 46 PM

If you go to push an image, there is some odd colouring happening at the top?

Operating system

mac m1

Installation Method

None

Version

1.10.2

Steps to reproduce

Push any image

Relevant log output

No response

Additional context

No response

cdrage avatar Jun 04 '24 18:06 cdrage

All modals bellow are using the --pd-modal-header-bg variable which is black or gray depending on the theme

https://github.com/containers/podman-desktop/blob/88907772c08058ac7bb91a79e9afec367f43ca75/packages/main/src/plugin/color-registry.ts#L808

Modal Screenshot
Install Extension from OCI image image
Create a new container image
Share your feedback image
Push image image
Edit Image image
PreferencesProviderInstallationModal.svelte N/A
TroubleshootingPageStoreDetails.svelte image

⚠️ The modal in TroubleshootingPageStoreDetails.svelte is very buggy

Some of the modal have a purple line between the header and the body. We probably need to define some guideline to choose a consistent style for the modals, as for the majority we are not using some specific color for the header.

axel7083 avatar Jun 10 '24 14:06 axel7083

Is there a way we could get rid of the black header and the purple line? It's an older iteration of the modal dialog. I dont think there's a need to have them there anymore. The spacing between the header and the body text would have to be adjusted too probably.

They should all match this one:

image

ekidneyrh avatar Jun 14 '24 09:06 ekidneyrh

Just commenting a mock-up I have for the modal dialogs:

Image Modal Dialog.pdf

Elements like the input field and dropdown are to follow the guidelines we have already.

Will I log a ticket for the implementation of removing the headers and following the layout above?

ekidneyrh avatar Jul 02 '24 15:07 ekidneyrh

@ekidneyrh just to confirm - action buttons should always be at the bottom and aligned to the right?

All of these dialogs were created when we had a different design, especially the ones with a purple underline are at least '2 generations' out of date.

TBH I thought Charlie was opening this up for implementation/fix more than confirming the design. I agree we should either create a new issue with the list of dialogs above and knock them off, or just add the list to the description here and reassign.

From an implementation perspective, I think we should add title/close action as optional properties of Modal to ensure consistency, also in case we ever have another design iteration. Right-aligned slot for buttons as well. Or, we create a Dialog subclass that does this.

deboer-tim avatar Jul 03 '24 16:07 deboer-tim

From an implementation perspective, I think we should add title/close action as optional properties of Modal to ensure consistency

I think Modal should stay generic, so it can be used for the Quickpick and other Modal. A component with some utility properties could be made, but should be name differently and not included in the Modal component.

axel7083 avatar Jul 04 '24 08:07 axel7083

I think having the modal follow the format, and as Tim said, make the Title and X button optional.

modal

And just add the content in like you would on a page. Maybe just limit to input fields, dropdowns and file uploads.

The styling of the 'content' text (anything other than the header and actions) should just be normal, no bold or heavyweight.

ekidneyrh avatar Jul 04 '24 10:07 ekidneyrh

I took a look at creating a reusable Dialog that has a standard header/content area/button bar, but I ran into two design questions @ekidneyrh :

  • The last design (and hence most of the dialogs today) used the 'link' style button for Cancel (purple text with hover), but in the design above it is 'secondary' (grey text + outline). Is this an intentional switch?
  • The feedback form uses the space to the left of the buttons for validation, e.g. 'Please select a smiley'. Is this a good pattern to keep/allow other dialogs to use, or should it be 'up' in the content area?

deboer-tim avatar Jul 04 '24 15:07 deboer-tim

I had feedback on the standup that the (optional) validation area is useful, and button style can easily be changed later, so I went ahead and put up a PR for a basic Dialog component.

deboer-tim avatar Jul 05 '24 15:07 deboer-tim

* The last design (and hence most of the dialogs today) used the 'link' style button for Cancel (purple text with hover), but in the design above it is 'secondary' (grey text + outline). Is this an intentional switch?

That was from me playing around with the primary and secondary buttons, so it can be ignored for now. Apologies for that.

The work on the PR is great and fixes the issue :) Thanks!

ekidneyrh avatar Jul 09 '24 11:07 ekidneyrh