-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Components: update components provider story #32743
Components: update components provider story #32743
Conversation
Size Change: 0 B Total Size: 1.04 MB ℹ️ View Unchanged
|
Working on this refactor has exposed some unexpected behaviour from the Context system: Values from contexts leak to components outside of the context providerOn top of this, if this patch is applied, the resulting behaviour seems also unexpected: diff --git a/packages/components/src/ui/context/stories/ComponentsProvider.stories.js b/packages/components/src/ui/context/stories/ComponentsProvider.stories.js
index 75f6414129..bed36eff14 100644
--- a/packages/components/src/ui/context/stories/ComponentsProvider.stories.js
+++ b/packages/components/src/ui/context/stories/ComponentsProvider.stories.js
@@ -31,6 +31,11 @@ const outerContext = {
display: 'block',
},
},
+ Text: {
+ style: {
+ outline: '2px solid orange',
+ },
+ },
};
const innerContext = { Incrementing the counter (force update) makes the inner card component lose the
|
c16942f
to
7715f32
Compare
5705bfc
to
6c2cbd9
Compare
93afcd7
to
acb8fa3
Compare
6c2cbd9
to
5bd2875
Compare
acb8fa3
to
07c3af6
Compare
Rebased on top of @sarayourfriend could you have a look at this? |
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! Thanks!
const innerContext = { | ||
Card: { | ||
css: { | ||
style: { | ||
background: 'white', |
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.
Should this be something other than white, something we can actually see the difference of?
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.
Good point, I changed it to a shade of green in aff830c
9e89ed6
to
0dc81d6
Compare
0dc81d6
to
ebf2fef
Compare
Description
Following #32566, this PR cleans up the
ComponentsProvider
storybook storyThis PR was mainly created to highlight a bug in the g2 Context system, which was fixed by #32745.
Testing instructions
npm run storybook:dev
and visithttp://localhost:50240/?path=/story/g2-components-experimental-contextsystemprovider--default
Screenshots
Types of changes
Checklist:
*.native.js
files for terms that need renaming or removal).