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(accordion): styles #1834

Merged
merged 3 commits into from
Mar 19, 2024
Merged

fix(accordion): styles #1834

merged 3 commits into from
Mar 19, 2024

Conversation

kishore03109
Copy link
Contributor

@kishore03109 kishore03109 commented Mar 14, 2024

Problem

Design review for accordions, addressing changes here.

Solution

Fix styling issues

Copy link
Contributor Author

kishore03109 commented Mar 14, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @kishore03109 and the rest of your teammates on Graphite Graphite

@kishore03109 kishore03109 force-pushed the 03-14-fix_accordion_styles branch from bf61867 to 1b5e0ba Compare March 14, 2024 04:36
@kishore03109 kishore03109 marked this pull request as ready for review March 14, 2024 04:37
@kishore03109 kishore03109 requested a review from a team March 14, 2024 04:37
@@ -31,6 +31,7 @@ export const BlockWrapper = ({
backgroundColor="#055AFF"
textColor="white"
p="0.25rem"
mt="-0.75rem"
Copy link
Contributor

Choose a reason for hiding this comment

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

why's this required? from the review, this seems like accordion should have a 0.75rem gap, not that the gap between elements should be reduced by 0.75rem

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hey this crit from design was outdated (look at the Se Hyun's comments)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

on why this is needed,

before:

Screenshot 2024-03-14 at 1 03 47 PM

after:

Screenshot 2024-03-14 at 1 04 39 PM

Comment on lines +40 to +41
mr="-0.5rem"
mt="-1.5rem"
Copy link
Contributor

Choose a reason for hiding this comment

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

could we need to use negative margins to remove padding? wouldn't this cause accordion to be out of alignment with the other elements

Copy link
Contributor Author

Choose a reason for hiding this comment

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

on why this is needed

before:

Screenshot 2024-03-14 at 1 14 29 PM

after:
Screenshot 2024-03-14 at 1 14 06 PM

note that this needs to be consistent with card grid:
Screenshot 2024-03-14 at 1 14 16 PM

Copy link
Contributor

Choose a reason for hiding this comment

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

hmm i get that - but the odd thing is i couldn't find negative margins being used in card grid ._.

i'm ok with this for now ba but if there's time, please try to figure out why card grids doesn't require the negative margin

Comment on lines +132 to +133
borderTop="1px solid #d4d4d4"
borderBottom="1px solid #d4d4d4"
Copy link
Contributor

Choose a reason for hiding this comment

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

should we use colour tokens here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sadly we dont have a token for this yet.
@sehyunidaaa may i get your help in this ya

Copy link
Contributor

Choose a reason for hiding this comment

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

ahh this is cos i used the colors from the template. my bad!

can use divider/strong from OGPDS please thank you

Copy link
Contributor

@seaerchin seaerchin left a comment

Choose a reason for hiding this comment

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

we shouldn't be mixing production code w/ testing code; additionally, the usage of negative margins might be problematic - i might be lacking context here, but best is if we can reduce the actual padding elsewhere rather than using negative margins

Copy link
Contributor

@seaerchin seaerchin left a comment

Choose a reason for hiding this comment

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

please use colour tokens!

borderColor="base.divider.medium"
display="flex"
justifyContent="flex-end"
boxShadow="0px 8px 12px 0px rgba(187, 187, 187, 0.50)"
Copy link
Contributor

Choose a reason for hiding this comment

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

could we use a token for this?

boxShadow: `0 0 0 1px var(--chakra-colors-gray-400)`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sehyunidaaa may i get token for this please?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

hmmm can we use this shadow-sm from OGPDS?
https://github.com/opengovsg/design-tokens/blob/09eeb37eaca44f0cb56e64d992cdee75b34e7661/tokens.json#L1109C1-L1110C1 ? might look a bit different but not earth-shattering, it's a small shadow

but we've been using the same bespoke shadow for other bubble menus btw

boxShadow="0px 8px 12px 0px rgba(187, 187, 187, 0.50)"

@kishore03109 kishore03109 force-pushed the 03-14-fix_accordion_styles branch from 555656f to 825766a Compare March 18, 2024 10:19
@kishore03109 kishore03109 merged commit e0a8e6d into develop Mar 19, 2024
8 checks passed
@seaerchin seaerchin mentioned this pull request Mar 21, 2024
7 tasks
@mergify mergify bot deleted the 03-14-fix_accordion_styles branch April 18, 2024 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants