db-schema-visualizer icon indicating copy to clipboard operation
db-schema-visualizer copied to clipboard

Add scroll direction to extension settings

Open ColinEge opened this issue 6 months ago • 0 comments

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

ColinEge avatar May 16 '25 10:05 ColinEge