-
Notifications
You must be signed in to change notification settings - Fork 113
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
Exposing internal state via Kedro Viz React component props #1969
Conversation
Signed-off-by: Jitendra Gundaniya <[email protected]>
Signed-off-by: Jitendra Gundaniya <[email protected]>
Signed-off-by: Jitendra Gundaniya <[email protected]>
Signed-off-by: Jitendra Gundaniya <[email protected]>
Signed-off-by: Jitendra Gundaniya <[email protected]>
Signed-off-by: Jitendra Gundaniya <[email protected]>
Co-authored-by: rashidakanchwala <[email protected]> Signed-off-by: Jitendra Gundaniya <[email protected]>
Signed-off-by: Jitendra Gundaniya <[email protected]>
Hi @jitu5 , Great to see the component having more customizable options. Some suggestions -
Thank you |
Signed-off-by: Jitendra Gundaniya <[email protected]>
Initially, we considered exposing specific props like |
I am fine with having any of the above mentioned names
My main concern is when a user wants to define a prop, he/she needs to do the nesting properly in defining. Seems like this way of nesting is cleaner to merge with what we have now |
Yes, that's true. If we don't nest the configurations, we will need to handle and merge each config individually in our code. By exposing our configurations in a nested dict instead of at the top level, users must follow the exact config structure to override the default settings. This minimizes our code, as we can merge the dict as a whole rather than merging each config individually. I know this may not be the most user-friendly, but there are very few advanced JavaScript users who need this feature, so this approach allows us to balance exposing our config whilst minimizing unnecessary code. i am ok calling it |
Yes, for the nested props we have docs for the right structure and it will help the user. |
Hi @jitu5 , I have commented minor changes and few questions for my understanding. It would be helpful, if you can add QA notes on how to test some changes in this PR (only basic smoke test and not an exhaustive testing). Thank you |
Signed-off-by: Jitendra Gundaniya <[email protected]>
Hi @jitu5 , Thanks for including the QA steps, it is really helpful. I observed few things -
The miniMap display is set to false but the miniMap on visible is set to true, this hides the miniMap icon but continues to show the map as below (this seems like a bug) -
The above change affects the UI but the URL remains as -
Same is the case for tags - Thank you |
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.
all looks good to me, thanks @jitu5. Just 2 small questions about using loadash
Please refer the annotation image
As mentioned above, we are now only documenting
|
Signed-off-by: Jitendra Gundaniya <[email protected]>
Signed-off-by: Jitendra Gundaniya <[email protected]>
Signed-off-by: Jitendra Gundaniya <[email protected]>
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 to me. Thank you for all the refactor here !! I would like to test the combined branch as individual branches seem to miss few updates.
Signed-off-by: Jitendra Gundaniya <[email protected]>
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 too, thanks @jitu5
Closing this PR as it already merged with #1992 to |
Resolves #1745
Description
This PR aims to enhance the flexibility and functionality of the Kedro Viz React component by exposing internal Redux state to component users through props.
Existing props structure:
New props structure:
The new structure consolidates
display
,visible
and other settings under a singleoptions
object, making the component's API more organized and scalable.Note: Other Redux state structure changes like moving some state from
visible
todisplay
is done under PR #1983.Development notes
UPDATE_STATE_FROM_OPTIONS
created to update redux state coming from react props.options
options.display.sidebar
will remove the sidebar & actionToolbarnonPipelineState
andpipelineState
will not accept propsprops.options
will merge to existing state ingetInitialState
kedro viz UI annotation:
QA notes
You can test new
options
prop insrc/components/container.js
as<App />
is the entry point or top level component for a standalone use case.setTimeout
after 10 secs.options
prop to component to test all possible cases.Checklist
RELEASE.md
file