Skip to content

Add typing support to steppers #1209

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

Merged
merged 4 commits into from
Jul 19, 2022
Merged

Conversation

davegarthsimpson
Copy link
Contributor

Motivation

To allow users to change font size and app scaling with the keyboard.

Change description

Use a custom controlled input component for the desired functionality.

Reviewer checklist

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

@davegarthsimpson davegarthsimpson requested a review from fstasi July 18, 2022 15:48
@davegarthsimpson davegarthsimpson marked this pull request as draft July 18, 2022 15:49
@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Jul 18, 2022
@davegarthsimpson davegarthsimpson changed the title [WIP]: add typing support to steppers Add typing support to steppers Jul 19, 2022
@davegarthsimpson davegarthsimpson marked this pull request as ready for review July 19, 2022 08:22
@davegarthsimpson davegarthsimpson requested a review from 91volt July 19, 2022 08:24
@kittaakos
Copy link
Contributor

It's working very nicely. Thank you for the cleanup ❤️

@kittaakos
Copy link
Contributor

I have noticed this:

  • set the zoom level to 14%,
  • UI scales, ✅
  • Open Preferences: Open Settings (JSON),
  • See the "arduino.window.zoomLevel": -4.3, entry,
  • The Arduino preferences say:

Adjust the zoom level of the window. The original size is 0 and each increment above (e.g. 1) or below (e.g. -1) represents zooming 20% larger or smaller. You can also enter decimals to adjust the zoom level with a finer granularity.

So technically, the user can set an invalid preference value, or at least be out of sync with the preferences.

@davegarthsimpson
Copy link
Contributor Author

davegarthsimpson commented Jul 19, 2022

I have noticed this:

  • set the zoom level to 14%,
  • UI scales, ✅
  • Open Preferences: Open Settings (JSON),
  • See the "arduino.window.zoomLevel": -4.3, entry,
  • The Arduino preferences say:

Adjust the zoom level of the window. The original size is 0 and each increment above (e.g. 1) or below (e.g. -1) represents zooming 20% larger or smaller. You can also enter decimals to adjust the zoom level with a finer granularity.

So technically, the user can set an invalid preference value, or at least be out of sync with the preferences.

Thanks for the finding! Hmm, so I guess we should always restrict to nearest valid numbers?

Or is this a case of needing to update what are considered valid settings?

@kittaakos
Copy link
Contributor

so I guess we should always restrict to nearest valid numbers

I propose leaving it as is if it works reliably and seems to work nicely. Let's adjust the scaling when we switch to the scaling from Code.

@davegarthsimpson davegarthsimpson merged commit 1f7c2eb into main Jul 19, 2022
@davegarthsimpson davegarthsimpson deleted the stepper-input-type-support branch July 19, 2022 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants