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

Enable all features on Smartphones - don't require alt-left click (aka opt-left click) #25

Closed
david-a-wheeler opened this issue May 24, 2023 · 3 comments
Labels
Milestone

Comments

@david-a-wheeler
Copy link
Contributor

david-a-wheeler commented May 24, 2023

Metamath-lamp is surprisingly functional on smartphones. However, there is no "alt-left click" on typical smartphones. I propose adding some mechanism so that users who can't (easily) do alt-left click can still access all of metamath-lamp's functionality.

I propose adding two more buttons on the toolbar:

  • "S" - Select statement fragments. When this is selected, the cursor changes, and you can pick a statement, which immediately opens like alt-left click & lets you keep selecting statement fragments. Use circled X, or this "S" again, to leave the mode.
  • "H" - "Hypothesis Toggle" - Only works when 1+ statements are selected; those statements are toggled between "hypothesis" or not.

Feel free to implement it some better way. At the least, being able to create hypotheses is key for creating proofs on smartphones, but simplifying statement fragment handling is also very nice on smartphones.

The only other issue on smartphones that I found is that smartphone touchscreens don't have "hover". To address that, see #23. In short, long-downpress could also show the hover text (but make sure the pressing finger doesn't cover the text!).

@david-a-wheeler
Copy link
Contributor Author

david-a-wheeler commented May 24, 2023

Here's another idea to meet this goal: interpret a "long click" as alt-left click instead of left-click. A "long click" is a downpress, held for a long time (say 1.5seconds or more), then an uppress.

As far as I know React doesn't directly support longpress, but it doesn't appear to be hard to implement. Here's a discussion and sample code:
https://stackoverflow.com/questions/48048957/react-long-press-event

The "time for long press" could be a configurable setting.

Even if this is done, a "Hypothesis toggle" button might still be a good idea, because that is far more discoverable (it would only work if one or more statements are selected).

@expln expln added the UI UI related label Jun 7, 2023
@expln expln added this to the v11 milestone Jun 7, 2023
@david-a-wheeler
Copy link
Contributor Author

I think this is ready-on-dev, yes?

@expln
Copy link
Owner

expln commented Jun 25, 2023

Yes, that's ready-on-dev. Just for the future reference - #97

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants