Skip to content
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

QA: Feature branch for refactor node list #2193

Merged
merged 16 commits into from
Nov 19, 2024

Conversation

Huongg
Copy link
Contributor

@Huongg Huongg commented Nov 15, 2024

Description

#2192

This PR focuses on ensuring thorough QA throughout the changes for the significant refactor of the node-list, before we merge it to main branch

The final structure looks as below:

Screenshot 2024-11-15 at 11 06 08

Miro board: https://miro.com/app/board/uXjVLTeWe88=/

Development notes

QA notes

Checklist

  • Read the contributing guidelines
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added new entries to the RELEASE.md file
  • Added tests to cover my changes

Huongg and others added 4 commits October 29, 2024 14:44
* update classnames to match the component name

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* update names in tests

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* update the rest of the classnames

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* abstract node-list-row-toggle component

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* tidy up code for toggle component

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* update classnames in tests

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* simplify the css

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* add tests for node-list-row-toggle

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* remove handleToggle on VisibilityIcon

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* remove redux from node-list-row

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* split node-list-row into row and filter-row

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* rename toggle icon component

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* move row and filter-row to components level

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* move css to row and filterRow

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* remove node-list-row

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* separate the row-text component

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* include parent classname

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* update name for toggle-icon, to visibility-control

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* fix css and move nodeListRowHeight to config

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* adding test for new component

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* update classname for tests

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* move row inside node-list

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* connect redux store to component

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* fix styling

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* update name to ToggleControl

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* remove disable props as no longer needed

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* replace js code with css to simplify the code

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* update classnames in cypress test

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* Styling for hovering and focus mode

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* fixing small styling

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* fix the disable styling for row

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* fix the disable styling on focus mode

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* remove one of the old test

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* update name for icons for FilterRow

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* fixing the icon highlighting issue

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* remove un-used li element

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* remove styling for pipeline-nodelist__placeholder-upper and lower class as nolonger used

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* update test in node-list

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* update cypress tests

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* moving .pipeline-nodelist__group--all-unchecked to the parent

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* prevent page reload on form submission

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* remove wrong classname in the test

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* remove unique ID

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* apply hovering styling on the parent instead of row

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* styling for selected element

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* fixing hover styling on the icon from MUI

Signed-off-by: Huong Nguyen <huongg1409@gmail>

---------

Signed-off-by: Huong Nguyen <huongg1409@gmail>
Co-authored-by: Huong Nguyen <huongg1409@gmail>
* Create new structure and its own folder for filters or groups

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* better names for component structure

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* FiltersSectionHeading

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* filters-section

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* filters component

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* filtersSectionHeading component

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* tidy up code

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* including new tests for new components

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* update and remove existing tests

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* remove un-used variables

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* remove components folder

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* update tests path

Signed-off-by: Huong Nguyen <huongg1409@gmail>

---------

Signed-off-by: Huong Nguyen <huongg1409@gmail>
Co-authored-by: Huong Nguyen <huongg1409@gmail>
* foundation for FiltersContext

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* remove unused props

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* node-list-context

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* restructure node-list-item as a helper function

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* rename selectors

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* rename functions in FiltersContext

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* move redux selector to node-list-context

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* fixing the hovered node issue

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* move getFilteredItems to selector

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* fix the modularpipeline highlight issue

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* Adding test for selector

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* update tests

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* update names to be nodes-panel

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* Fixing the filters problem

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* update test

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* fixing the highlight issue through getNodesActive

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* move node-list-tree to its own component

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* update row to node-list-row

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* move style to be inside node-list-tree

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* fix the filters URL update

Signed-off-by: Huong Nguyen <huongg1409@gmail>

* update name for nodes panel context

Signed-off-by: Huong Nguyen <huongg1409@gmail>

---------

Signed-off-by: Huong Nguyen <huongg1409@gmail>
Co-authored-by: Huong Nguyen <huongg1409@gmail>
This is a smaller refactor. Previously, the logic for determining which nodes were disabled due to modular pipelines was duplicated in both the NodeListTree component and the getNodeDisabled selector. To improve maintainability and reduce redundancy, the getnodesDisabledViaModularPipeline logic was extracted and made into it's own selector. Now, this logic is shared and reused by both the NodeListTree component and the getNodeDisabled selector.
Copy link
Contributor

@rashidakanchwala rashidakanchwala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AMAZZZINNGGG!!

@jitu5
Copy link
Contributor

jitu5 commented Nov 18, 2024

@Huongg I tested locally, I observed few differences compared to demo site

  1. On demo project, when you clicks on focus icon of "train_evaluation", "Evaluate Model" and "Train Model" is disabled but on demo site its not.
Screenshot 2024-11-18 at 5 51 26 p m Screenshot 2024-11-18 at 5 50 19 p m
  1. When you click on any row on node list and then when you de-select or click any where else it removed selection but on demo site it remains highlighted.

high-w
high-nw-1

@rashidakanchwala
Copy link
Contributor

rashidakanchwala commented Nov 19, 2024

Hi @jitu5,

I’m looking into this. Here’s what I’ve found so far:

  1. On both demo.kedro.org and localhost, the grandchildren nodes are not visible on the flowchart. Additionally, on the demo site, the nodes on the nodelist are still not disabled, which is incorrect because they cannot be interacted with. However, overall, they shouldn't be disabled, so we’ll address this issue.

  2. It seems the highlight node bug is now resolved with this refactor.

Signed-off-by: rashidakanchwala <[email protected]>
Signed-off-by: rashidakanchwala <[email protected]>
Signed-off-by: rashidakanchwala <[email protected]>
Signed-off-by: rashidakanchwala <[email protected]>
Signed-off-by: rashidakanchwala <[email protected]>
@jitu5
Copy link
Contributor

jitu5 commented Nov 19, 2024

Hi @jitu5,

I’m looking into this. Here’s what I’ve found so far:

  1. On both demo.kedro.org and localhost, the grandchildren nodes are not visible on the flowchart. Additionally, on the demo site, the nodes on the nodelist are still not disabled, which is incorrect because they cannot be interacted with. However, overall, they shouldn't be disabled, so we’ll address this issue.
  2. It seems the highlight node bug is now resolved with this refactor.

Hi @rashidakanchwala
For point 1 now its fixed for the grandchildren nodes but I notice one more issue, when I click a focus icon for "train_evaluation.linear_regression" now I cant un-do focus when I click on the same focus icon again, even I cant collapse or expand "train_evaluation.linear_regression"

child-par

For point 2, still its not retaining highlight.

@Huongg
Copy link
Contributor Author

Huongg commented Nov 19, 2024

hey @jitu5 retaining highlighted when de-selecting on a node is a bug on the demo site, which is addressed with this refactoring. So when you click on a node, it should highlight, when not clicking on a node, it shouldn't highlight

@jitu5
Copy link
Contributor

jitu5 commented Nov 19, 2024

when I click a focus icon for "train_evaluation.linear_regression" now I cant un-do focus when I click on the same focus icon again, even I cant collapse or expand "train_evaluation.linear_regression"

@rashidakanchwala Now its working as expected. Thanks

Copy link
Contributor

@jitu5 jitu5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!!!

Huong Nguyen added 3 commits November 19, 2024 14:35
Signed-off-by: Huong Nguyen <huongg1409@gmail>
…org/kedro-viz into feature-branch/refactor-node-list
@stephkaiser
Copy link

great work team! I've noticed a few things:

  1. the padding space at the bottom of filters under the last tag is shorter than previous (see current vs demo site):
Screenshot 2024-11-19 at 14 28 29 Screenshot 2024-11-19 at 14 28 18
  1. Not sure if its just me or gitpod, but im noticing some delay when I move/hover my mouse across the node list:
Screen.Recording.2024-11-19.at.14.33.05.mov
  1. I've noticed the hide + focus buttons on child pipelines are not positioned the same like the parent hide + focus buttons (the hide + focus buttons should always be in the same position, its currently too close to the utility bar on the right). We should shorten the label if there isn't enough space for the buttons. In the screenshot, it also looks like the spacing between the label and hide button is smaller than the space between the hide + focus buttons.
Screen.Recording.2024-11-19.at.14.42.10.mov
Screenshot 2024-11-19 at 14 26 26
  1. I've spotted something too - it's currently quite difficult to see if an item is hidden or not - unless you hover on that item and see that the hide icon has changed, the label colour also changes to a lighter grey but its very subtle. I suggest when an item is hidden, we always show the hide icon (not only on hover) until the user clicks the icon again to un-hide the item then the icon goes back to being shown only on hover (kind of the same behaviour as the focus icon except the hide icon stays grey and doesn't become blue, and it doesn't disable the other list items when activated)
Screen.Recording.2024-11-19.at.14.23.11.mov
  1. Another spot - could we add tooltips for 'Hide' and 'Focus' buttons? currently when hovering over these two buttons they show the name of the item, rather than showing the tooltip for the buttons.
Screenshot 2024-11-19 at 14 32 44 Screenshot 2024-11-19 at 14 32 43

Thank you!!

Signed-off-by: Huong Nguyen <huongg1409@gmail>
@Huongg
Copy link
Contributor Author

Huongg commented Nov 19, 2024

Hi @stephkaiser, thanks for reviewing this! I discussed with @rashidakanchwala, and we agreed that only the first issue is introduced by the refactored code, which I’ve now addressed.
Screenshot 2024-11-19 at 16 24 57

Regarding point 2, I suspect it might be related to the Gitpod setup, as I’m seeing the hover state working fine on my end.

The remaining issues are not introduced from the refactoring work, for example, point 3 is an existing bug (it’s also visible on the demo site when "pretty name" is turned off), and points 4 and 5 are new enhancements. I’ve combined these into a single ticket: #2197.

If you're happy with this suggestion, can we merge this so it won't delay the release?

@stephkaiser
Copy link

@Huongg sounds good to me! thanks Huong. I just checked the first issue and it looks good now, thank you!

@Huongg Huongg merged commit a0931ee into main Nov 19, 2024
10 checks passed
@Huongg Huongg deleted the feature-branch/refactor-node-list branch November 19, 2024 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants