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

[KED-1611] Refactor node-list #152

Merged
merged 13 commits into from
Apr 29, 2020
Merged

Conversation

richardwestenra
Copy link
Contributor

@richardwestenra richardwestenra commented Apr 28, 2020

Description

Improve the code for the node-list-components by separating them into different files better, and add some more/better tests

Development notes

Pure refactor, no functionality changes. The Sass in particular is just copy-pasting code into different files.

The file/component that got the mode changes is node-list/index.js, where I split out the class methods into a new file (filter-nodes.js) as they're mostly just pure functions that don't need access to the instance except for arguments. I also split out the searchbar into a new file so it can handle its own keyboard event. And now the main NodeList component just handles search state (which it uses to filter the nodes prop and pass it to its children), and scrollbars.

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

Legal notice

  • I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

  • I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.

  • I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorised to submit this contribution on behalf of the original creator(s) or their licensees.

  • I certify that the use of this contribution as authorised by the Apache 2.0 license does not violate the intellectual property rights of anyone else.

@richardwestenra richardwestenra marked this pull request as ready for review April 28, 2020 15:24
@richardwestenra richardwestenra changed the title Refactor node-list [KED-1611] Refactor node-list Apr 29, 2020
@richardwestenra richardwestenra merged commit a2c92e4 into develop Apr 29, 2020
@richardwestenra richardwestenra deleted the feature/node-list-refactor branch April 29, 2020 13:18
@richardwestenra richardwestenra mentioned this pull request May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants