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-2381] Refactor zoom and views #363

Merged
merged 10 commits into from
Feb 10, 2021
Merged

[KED-2381] Refactor zoom and views #363

merged 10 commits into from
Feb 10, 2021

Conversation

bru5
Copy link
Contributor

@bru5 bru5 commented Feb 2, 2021

Description

Abstracts and improves the viewport implementation.
This follows up recent view work from #356.

Development notes

  • moves viewport code into a separate view utility
  • this simplifies and unifies the flowchart and minimap components
  • provides a more consistent and convenient API for this usage
  • improves test coverage throughout

QA notes

Behaviour should not change.

All flowchart and minimap functionality involving view effects should be tested.

Refer to notes in #356 for rules on how the view should now act.

This will include testing in various combinations:

  • open / closed sidebar and metadata panel
  • resizing the browser to various viewport sizes / aspect ratios
  • different graph aspect ratios (square, wide, tall)
  • selecting elements on the sidebar and on the chart
  • selecting tags and pipelines
  • toggling labels
  • using the minimap

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.

src/utils/view.test.js Outdated Show resolved Hide resolved
Copy link
Contributor

@studioswong studioswong left a comment

Choose a reason for hiding this comment

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

Just tested and played around with the new zoom views and they work well, really great stuff @bru5 ! 👍

one thing with regards to structuring of the tests - given the code is highly specialised with different formulas / calculations to cater for the different zoom scenerios that was outlined in the QA section, the cases outlined in the tests would be quite crucial in helping the user understand the different functions and how it caters for the different use case. I understand they are structured as unit tests, could you please add some tests cases to outline the different scenerios you listed in the QA ( or if some unit tests covers that, you can also mention that in the test description?)

Thank you!

src/components/flowchart/index.js Show resolved Hide resolved
src/utils/view.js Show resolved Hide resolved
src/utils/view.js Outdated Show resolved Hide resolved
@bru5 bru5 merged commit 11e1dab into main Feb 10, 2021
@bru5 bru5 deleted the refactor/zoom-view branch February 10, 2021 10:43
@bru5 bru5 mentioned this pull request Feb 10, 2021
6 tasks
@richardwestenra richardwestenra mentioned this pull request Feb 17, 2021
1 task
richardwestenra added a commit that referenced this pull request Feb 19, 2021
# Release 3.9.0

## Major features and improvements

- Add code panel (#346)
- Improve view panning behaviour when a node is selected (#356, #363, #370, #373, #374)
- Improve layout performance for large graphs (#343)
- Save tag state to localStorage (#353)

## Bug fixes and other changes

- Improve graph layout code quality, performance and docs (#347)
- Update docs to remind on compatibility of Kedro-Viz 3.8.0 with Kedro 0.17 (#367)
- Update dependencies (#360, #364, #369)
- Fix failing CircleCI build on Windows (#365, #366)
- Refactor node-list-row CSS, fixing hover and focus states (#355, #358, #362)
- Update iconography (#357, #359)
- Fix missing indicator Chrome zoom bug (#349)
- Fix sidebar border/box-shadow CSS rules (#351)
- Fix server.py to work with versions >0.17 and update contributing docs (#348)
- Fix errors when scrolling with empty pipeline (#342)
- Ignore coverage on some branches and fix e2e tests (#345)
- Fix icon-button tooltips on mobile (#344)
- Update SVG-Crowbar to fix errors (#339)
- Update contributing docs for new dev server (#341)
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.

3 participants