-
Notifications
You must be signed in to change notification settings - Fork 112
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
Refactor / node list row #2143
Refactor / node list row #2143
Conversation
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
@@ -0,0 +1,65 @@ | |||
import React from 'react'; | |||
import classnames from 'classnames'; | |||
import VisibleIcon from '../icons/visible'; |
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 filter row doesn't have the eye icon, so why are we calling it here?
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.
hey @rashidakanchwala I've updated it to IndicatorIcon instead as its for the FilterRow specifically now
import './filter-row.scss'; | ||
|
||
export const FilterRow = ({ | ||
allUnchecked, |
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.
there's some problem here, when I uncheck everything, the visibility icons disappear.
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 should be fixed now, the PR is ready for reviewing the UI parts now 😄
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
hey @jitu5 good spot, thank you. I missed out the |
@@ -35,31 +35,29 @@ export const NodeListGroup = ({ | |||
)} | |||
> | |||
<h3 className="pipeline-nodelist__heading"> | |||
<NodeListRow | |||
<FilterRow |
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 am not sure if we need all ul, li code now ? it works without it because of FilterRow
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.
hey @rashidakanchwala thanks for spotting this, as discussed I've removed all the un-used li
elements, and add an extra props to FilterRow
to determine whether it should be a div or li
element. The HTML structure will now look something like in the screenshot here
<NodeListRow | ||
container="li" | ||
key={item.id} | ||
<FilterRow |
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.
same here, why do we need the ul/li code now, since FilterRow is a div. when I inspect the code, it looks a bit confusing?
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.
same as above
Signed-off-by: Huong Nguyen <huongg1409@gmail>
…ss as nolonger used Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
} | ||
|
||
// Bright row text when all unchecked | ||
.pipeline-nodelist__group--all-unchecked & { |
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.
why isn't this filter-row-all-unchecked ?
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.
Hey, this one’s a bit unusual, but it's related to this issue. When all the boxes are unchecked, the opacity should stay the same, as it currently does on the demo site. To achieve this, I need to apply styling at the parent level. It might actually make sense for this styling to be handled in the parent component instead. Let me move it over there.
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.
Mostly looks good to me. It's a bit difficult to review because it's only partial refactor, so it will start making more sense when it's all done. I shall approve it once tests pass. thanks @Huongg
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Signed-off-by: Huong Nguyen <huongg1409@gmail>
thanks @rashidakanchwala, i've updated all the tests and also changed the base branch to a feature-branch instead. Let me know if you're happy for me to merge? Also @jitu5 happy for me to merge to feature-branch? |
@Huongg Related to hover, I tested on your latest branch. Its very minor things, the initial part of the row is not getting highlighted. May be not the blocker to merge. |
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Ah I just realised It caused by the MUI, therefore I'm applying the styling to override. It should be okay when hovering over now. Let me know what you think? Thank you for raising it @jitu5 |
Signed-off-by: Huong Nguyen <huongg1409@gmail>
All good now. Thanks @Huongg |
Signed-off-by: Huong Nguyen <huongg1409@gmail>
Description
Development notes
Initially, the node-list-row component was used in three different contexts:
node-list-tree
: (labelled as 3 in the chart below) representing the list of nodesnode-list-group
: (labelled as 4A) is the parent level within the filter panel (e.g., Element types, Tags)node-row-list
: (labelled as 4B) is the child level within the filter panel (e.g., nodes, datasets, parameters)The new approach involves splitting node-list-tree into two distinct components:
row
: dedicated to the hierarchical structure of node elementsfilter-row
: dedicated to the filter panelToggleControl
component is shared between these two components. This simple component renders an icon with the toggle functionality to turn on/off the functionalityQA notes
Please check the changes locally and test throughout to see if any changes that would affect the functionality. I'm currently updating some of the cypress tests which currently failed due to changes in classnames.
Checklist
RELEASE.md
file