-
Notifications
You must be signed in to change notification settings - Fork 1k
feat: add baseline on alignSelf attribute #6413
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, just a few things...
Can you add a jest test to cover this enhancement? Also can you create a pull request on grommet-site to add 'baseline' to the docs?
Sure thing. What kind of test do you imagine? Just test snapshots? |
Created the PR on grommet-site: grommet/grommet-site#428 |
Yeah i think we can just do a snapshot test to make sure the styling was correctly applied when we use |
Idk why, but when I add a new Box inside Box/alignSelf test 2 tests fail when rendering, and also I see this message:
Have you already seen this? NOTE If I remove one Box (e.g.: |
Just checked and I am getting that same error on my end. I think it is related to how many versions of styled boxes we have in that test file. I think in this case it makes sense to suppress the error in this file because we know that the reason we are over limit is just because of how many test cases we have. |
I am unsure how to suppress the error in this file, any suggestions? |
Hmm yeah I am not finding any good options for disabling the error for the test file. If possible I think we should avoid splitting this up into two test files. Ideally it would be nice to keep things organized under one file. I'll keep looking to see if I can find any other possible solutions... |
I moved one style to attrs on StyledBox as the error suggested and now the tests are passing. |
I think this ☝️ is the right direction. I believe @jcfilben was also exploring this approach. |
Hey @matheushahnn I'm thinking this is probably the direction we will go. I'm going to look at it a bit more on Monday, I'm thinking about if we want to move additional items in styledBox within attrs not just |
Update: I chatted with some other members of the team and we are thinking that we do want to use |
@jcfilben Followed your instructions 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
What does this PR do?
Add baseline as one of the alignSelf possible attribute
Where should the reviewer start?
What testing has been done on this PR?
How should this be manually tested?
Do Jest tests follow these best practices?
screen
is used for querying.userEvent
is used in place offireEvent
.asFragment()
is used for snapshot testing.Any background context you want to provide?
What are the relevant issues?
#6376
Screenshots (if appropriate)
Do the grommet docs need to be updated?
Yes
Should this PR be mentioned in the release notes?
Is this change backwards compatible or is it a breaking change?