-
Notifications
You must be signed in to change notification settings - Fork 302
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
Convert balstack to a render function component #1313
Conversation
if (Array.isArray(styledNestedChildren)) { | ||
// and those children can be nullish too | ||
const nonNullishChildren = styledNestedChildren.filter( | ||
nestedChild => nestedChild !== undefined || nestedChild !== null |
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.
I assume you wanted nestedChild !== undefined && nestedChild !== null
right?
nestedChild => nestedChild !== undefined || nestedChild !== null | |
nestedChild => nestedChild != null |
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.
lgtm
708c8b2
to
576de39
Compare
Prerequisite to this being merged is merge of #1322 |
@@ -0,0 +1,83 @@ | |||
import { render } from '@testing-library/vue'; |
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.
This looks nice! Glad we have something to do UI tests!
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.
Render tests look great, nice work!
expect(getByText('First')).toHaveClass('mb-4 border-b'); | ||
expect(getByText('Second')).toHaveClass('mb-4 border-b'); | ||
// last el shouldn't have a spacing class | ||
expect(getByText('Third')).not.toHaveClass('mb-4 border-b'); |
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.
These tests are great! Just a minor thing here, is there any advantage to maybe using the divide class and flexgrid rather than margins and flexbox?
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.
I'll look into it
Description
#1322 Must be merged first.
There were a few issues with out existing stack component. Given the fact that it relied on computed variable changes to re-render was a big one. It meant that it was not dynamic to changes in slots as well as having difficulty with binding v-model.
The
isDynamic
prop has been made redundant as a result. So should be a bit easier to understand its APIType of change
How should this be tested?
The change is pretty visual. Just test that the app styles haven't been broken in pool creation and other areas that BalStack is used.
Visual context
Non-providable.
Checklist:
master
if hotfix,develop
if not