Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update color tokens for modal component #291

Merged
merged 11 commits into from
Dec 13, 2024
Merged

Conversation

tulasigudibanda
Copy link
Contributor

@tulasigudibanda tulasigudibanda commented Dec 10, 2024

Updated to theme based color tokens.

ADO Story or GitHub Issue Link

TASK 2003584

Figma Link

https://www.figma.com/design/CQuDZEeLiuGiALvCWjAKlu/branch/qMpff4GuFUEcsMUkvacS3U/Applications---Component-Library?node-id=11285-770&node-type=instance&m=dev

Notes

Updated tokens in below components :
Modal

Copy link

netlify bot commented Dec 10, 2024

Deploy Preview for shidoka-applications ready!

Name Link
🔨 Latest commit e7b44b1
🔍 Latest deploy log https://app.netlify.com/sites/shidoka-applications/deploys/675c4576b308e500089061e5
😎 Deploy Preview https://deploy-preview-291--shidoka-applications.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@tulasigudibanda tulasigudibanda requested review from srpriyankashetty and a team December 11, 2024 15:21
@@ -169,4 +172,5 @@ h1 {
overflow-y: auto;
margin: -4px;
padding: 4px 16px 4px 4px;
background: var(--kd-color-background-accent-subtle);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we actually want a background color on the body here. I think that was just done in Figma to indicate a slot.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure @brian-patrick-3 . Will check with Chandan

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed with UX. Removed the background color on the body

@brian-patrick-3
Copy link
Contributor

I think the designers also added some styles for the X button states?

@tulasigudibanda
Copy link
Contributor Author

I think the designers also added some styles for the X button states?

@brian-patrick-3 , included these styles.

@brian-patrick-3
Copy link
Contributor

@brian-patrick-3 , included these styles.

Hmm, they don't seem to match Figma at all to me

@tulasigudibanda
Copy link
Contributor Author

tulasigudibanda commented Dec 11, 2024

@brian-patrick-3 , included these styles.

Hmm, they don't seem to match Figma at all to me

Yes, they look different , may be because it blends with the modal background color . But I used same tokens as in figma :
image

@brian-patrick-3
Copy link
Contributor

brian-patrick-3 commented Dec 11, 2024

Yes, they look different , may be because it blends with the modal background color . But I used same tokens as in figma

I think the colors are correct, but the size and shape of the button, and the outline/border thickness on active/focus, seems wrong.

border-radius: 8px;
border: 1px solid var(--kd-color-border-light);
border: 1px solid var(--kd-color-border-variants-light);
box-shadow: 0px 2px 12px 0px rgba(61, 60, 60, 0.25);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This box-shadow shouldn't be needed, as Elevation is already included.

@tulasigudibanda
Copy link
Contributor Author

Yes, they look different , may be because it blends with the modal background color . But I used same tokens as in figma

I think the colors are correct, but the size and shape of the button, and the outline/border thickness on active/focus, seems wrong.

Pushed the changes

}

&:active {
color: var(--kd-color-text-pressed);
border-radius: 2px;
border: 1px solid var(--kd-color-border-ui-pressed);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is causing the button size to change when it is clicked.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Size remains same but it appears to shift slightly . Because focus state has only outline, while pressed state has a border + outline
Please let me know if it should be either border for both states or outline.

Copy link
Contributor

@brian-patrick-3 brian-patrick-3 Dec 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can have both. To fix the size shift, you either need to set fixed width/height on the button (box-sizing: border-box from global.scss makes this work), or give it a 1px transparent border in the default state.

In figma, I only see a 1px border for both pressed and focus.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added 1px transparent border . Thanks Brian

@srpriyankashetty
Copy link

Hi @tulasigudibanda,
Hide cancel is not hiding the cancel button in Modal and before close component, can you please check.!
image

@srpriyankashetty
Copy link

srpriyankashetty commented Dec 12, 2024

The OK and secondary button is without any background color in both light and dark mode, is it intentional??
Able to see the button background on click and for Cancel it is showing color on hover.!
As Figma has color for Primary and secondary button!
image

Copy link

@srpriyankashetty srpriyankashetty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test comment

@tulasigudibanda
Copy link
Contributor Author

tulasigudibanda commented Dec 12, 2024

Hi @tulasigudibanda, Hide cancel is not hiding the cancel button in Modal and before close component, can you please check.! image

@srpriyankashetty ,
Hide cancel is a storybook doc update ,not related to colors. Pushed the change anyway.
Rebuilt and buttons show colors as per the latest tokens.
Screenshot 2024-12-12 at 2 42 33 PM

@srpriyankashetty
Copy link

Verified

Copy link

@srpriyankashetty srpriyankashetty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified Modal component in Light and dark mode theme and looks fine
Verified the OK button actions and color changes in Modal, Action button, before close and with form and looks fine
Verified the hide close and looks fine
Verified the Secondary button color in both dark and light mode theme

@tulasigudibanda tulasigudibanda merged commit f6cc6cf into next Dec 13, 2024
8 of 9 checks passed
@tulasigudibanda tulasigudibanda deleted the feat/themes branch December 13, 2024 14:44
@brian-patrick-3
Copy link
Contributor

🎉 This PR is included in version 2.0.0-next.28 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants