-
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
[KED-2981] Re-write Kedro UI buttons #716
Conversation
Signed-off-by: Rashida Kanchwala <[email protected]>
Signed-off-by: Rashida Kanchwala <[email protected]>
Signed-off-by: Rashida Kanchwala <[email protected]>
…org/kedro-viz into KED-2981/rewrite-kedro-ui-buttons
Signed-off-by: Rashida Kanchwala <[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 great! Just one tiny comment about not removing the theme
prop in one file, but it's not a blocker :)
@@ -181,7 +181,7 @@ const ExperimentWrapper = ({ theme }) => { | |||
rel="noreferrer" | |||
target="_blank" | |||
> | |||
<Button theme={theme}>View docs</Button> |
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 noticed you're removing the theme
prop here, which is fine, but didn't remove it on the buttons in the src/components/export-modal/export-modal.js
file. I wonder why? I think you can remove it there as well can't 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.
yes, i will remove it :) .. thanks!
Signed-off-by: Rashida Kanchwala <[email protected]>
src/components/button/button.js
Outdated
`kui-button__btn--${size}`, | ||
`kui-button__btn--${mode}` |
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.
Just curious... what's up with the ` instead 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.
It's called template literals similar to f-string or % in python ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
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.
Ahh cool, 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.
I just had an initial skim through and tested the button, looks good! I'll do a more through dive into the code and let you know if I spot anything.
Please update the release notes for this feature in the meantime :)
src/components/button/button.scss
Outdated
--color-button__text: #{rgba($color-light, 0.85)}; | ||
} | ||
|
||
.kui-button { |
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.
Please remove references of kui
and rename all css classnames for this component to either kedro-button
or just button
( also note that we are moving away from the pipeline
prefix as well, which we have started doing from the experiment tracking components and will do so for new components moving forward)
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.
The code overall looks good! Requesting changes mainly for renaming the button classes as we are moving away from kui references. (I understand we have used kui-theme
for the theme naming for the overall app given our previous setup and links to kui, which I have put in a ticket to rename those class name to strip away the kui reference( just theme--light
or theme--dark
, and can be done in one go after we have migrated all kui elements.)
Signed-off-by: Rashida Kanchwala <[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.
Nice one 👏
Description
This PR is a part of the Kedro-UI migration ticket. In this PR we migrate the button functionality from Kedro-ui to Kedro-viz
Development notes
The Kedro-UI button functionality had lot of styles that we weren't using in Kedro-viz. So I have made that simple in this PR. In Kedro-UI, we have primary button, second button, small button, button with wipe transition. For consistency sake, I have used only one button style (primary) for all buttons on Kedro-viz. Additionally added the size small since it was used in the experiment tracking. I have removed secondary button style (which was also used for experiment tracking) and also removed the wipe transition (used in large pipeline warning) for the sake of consistency and simplicity.
UPDATE - As per the discussion with Tynan, and Gabriel in the check-in, I have added secondary mode for buttons (since it's used). I have removed wipe transition which was used in large pipelines - and Gabriel is comfortable with it.
I have also removed disable since we are not using it atm.
QA notes
Checklist
RELEASE.md
file