Add scroll direction to extension settings #85
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the new Scroll Direction variable to the extension settings as requested by issue 83 this was a simple and quick implementation so any changes are welcomed. My main goal was to quickly improve the UX for myself and others that find "up-out" scrolling unusual and prefer not to hold Ctrl.
Changes Made:
Add property to extension settings: Added dbmlERDPreviewer.scrollDirection with values 'up-out' and 'up-in' to extension settings, leaving up-out as default to preserve UX for current users.
Create ScrollDirectionProvider: A new provider to give context to components. This could later be refactored to something like NavigationProvider to provide other navigation related extension settings.
DiagramWrapper.tsx consumes the new context: Scroll direction is added as a const prop which flips the direction of scroll in handleZooming().
Types adjustments: To support these changes, the ScrollDirection type was created and ConfigKeys type was updated.
Impact:
No Regression: The changes do not affect current functionality.
Improved UX: Improves navigation for users not used to "up-out" scrolling.
Testing:
The changes have been tested to ensure no change in default behaviour and successful scroll switching. Further testing is welcome.
Conclusion:
This PR should make UX better for at least myself and issue 83. I appreciate your consideration and look forward to your feedback.
Thank you muchly,
ColinEge