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

fix(zoom): making zoom in+out a usable feature #116

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pongstr
Copy link

@pongstr pongstr commented Dec 22, 2024

  • feat: keyboard viewport addresses bug: setting the zoom value to 200% is not usable #115
    • added: pan around when zoomed in+out
      • hold spacebar and move around
      • hold primary click button to move around
    • added: ui handlers to increase/decrease zoom and reset view to optimal settings
    • refactor: scaling should not require child components to scale too, no re-render while zooming in+out
    • refactor: useLocalStorageState to have default serializer+deserializer
Screen.Recording.2024-12-22.at.20.16.13.mov

- feat: keyboard viewport + tools to pan-around and reset
Copy link

netlify bot commented Dec 22, 2024

Deploy Preview for zmk-studio ready!

Name Link
🔨 Latest commit f76a3a3
🔍 Latest deploy log https://app.netlify.com/sites/zmk-studio/deploys/6769a48ec664ce0008bc1ba0
😎 Deploy Preview https://deploy-preview-116.preview.zmk.studio
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -29,8 +29,7 @@ import { BehaviorBindingPicker } from "../behaviors/BehaviorBindingPicker";
import { produce } from "immer";
import { LockStateContext } from "../rpc/LockStateContext";
import { LockState } from "@zmkfirmware/zmk-studio-ts-client/core";
import { deserializeLayoutZoom, LayoutZoom } from "./PhysicalLayout";
import { useLocalStorageState } from "../misc/useLocalStorageState";
Copy link
Member

Choose a reason for hiding this comment

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

useLocalStorageState was created for future local storage uses. I don't think we should remove it #31 (comment)

Copy link
Author

Choose a reason for hiding this comment

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

restored useLocalStorageState, i slightly modified the hook to have default serialize+deserializer, imho, these options should only be required for specific serialize+deserializer functions. lmk what you think ^^

src/keyboard/KeyboardViewport.tsx Outdated Show resolved Hide resolved
src/keyboard/KeyboardViewport.tsx Show resolved Hide resolved
src/keyboard/KeyboardViewport.tsx Outdated Show resolved Hide resolved
src/keyboard/KeyboardViewport.tsx Outdated Show resolved Hide resolved
@pongstr pongstr requested a review from Nicell December 23, 2024 17:43
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.

2 participants