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

Add option in that controls Home and End. Default unchanged. #222

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

soegaard
Copy link
Member

This PR adds a new option in "Editing | General Editing".

The conventions on macOS differ from Windows/Linux when it comes
the handling of the Home and End keys. On macOs they are move
to the beginning and end of the document, on the other systems to
the beginning and end of the line.

If the new option is checked, the macOS convention is used.
The option also affects shift+Home/End.

The default value is set of false. Should this default to true on macOS?

image

@soegaard
Copy link
Member Author

soegaard commented Mar 27, 2021

Note that this PR relies on

https://github.com/racket/string-constants/pull/51

which add the string constant missing in the test below.

@rfindler
Copy link
Member

I think it would be better if it was clear what both states of the checkbox mean. One option would be to have a more verbose checkbox; another would be to use radio buttons with two strings.

Probably it is good to add some test cases for this.

The documentation in DrRacket also needs a tweak for this change.

There should be a bump to the version dependency with this too.

@soegaard
Copy link
Member Author

I think it would be better if it was clear what both states of the checkbox mean.
One option would be to have a more verbose checkbox; another would be to use radio buttons with two strings.

Ideally I'd like to add a tooltip to this check box.

Alex Harsanyi has a nice tooltip-mixin, but it would be better to have similar functionality directly in the framework.
https://docs.racket-lang.org/gui-widget-mixins/index.html?q=gui-widget-mixins

In the mean time:
Now: "Home and End go to the beginning or end of the document"
Suggestion: "If checked, Home and End keys go to beginning and end of the document.
If unchecked, they go to the beginning and end of the line."

I think, visually it is better to keep a check box - there are no other radiobuttons in that dialog.
Also, there are only two options. [1]

Probably it is good to add some test cases for this.
Is there an existing test that can be mimicked?

The documentation in DrRacket also needs a tweak for this change.

I looked at https://docs.racket-lang.org/drracket/Keyboard_Shortcuts.html
Now, it doesn't mention Home and End. Is this the page, you had in mind?

There should be a bump to the version dependency with this too.
Ok.

[1] "Consider a checkbox when the user needs to choose between two states."
https://developer.apple.com/design/human-interface-guidelines/macos/buttons/radio-buttons/

@rfindler
Copy link
Member

I'll have to ask the release managers about gui-widget-mixins as it would be a new pkg in the distribution but I like the idea of a tooltip.

The page I had in mind is this one, sorry about that.

@rfindler
Copy link
Member

rfindler commented Apr 7, 2021

Hi @soegaard : let's go ahead and add that dependency to have a tooltip for this checkbox item. But let's hold off until next week to merge this pull request so that it'll happen only in the release after the upcoming one (just to avoid trouble).

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