stefnotch / quantum-sheet

QuantumSheet - A user friendly mathematics worksheet and solver
https://stefnotch.github.io/quantum-sheet/
GNU General Public License v3.0
55 stars 5 forks source link

QoL fixes #13

Closed stefnotch closed 2 years ago

stefnotch commented 3 years ago

Is the \ when you press Esc intentional?

It switches between the normal mode and the command mode. Replace that with a Esc to escape command mode and Esc to escape the mathfield.

Completed! > This might be a bit annoying. > ![hq13L7GHFl](https://user-images.githubusercontent.com/10220080/92574538-7ffcc480-f287-11ea-9d58-62a550d5e3d9.gif) > When you want to make the `:=` and type `[:] -> [something else] -> [Backspace] -> [=]`, it doesn't make it. Yep, that's annoying. I'll have to fix that. > If you don't need the colon for anything else, you could make it like MathCAD does, so you only need to type `:`. Good idea. That would also make typing `:=[Backspace]` less annoying.

Other than that, it's just that when you type something, it's not at the position of the cursor, but rather quite a bit below.

Yeah, true

Brackets are broken

Uhhh, seems like it.

Typing tan doesn't work. However, typing a*tan works

Typing \tan and then clicking somewhere else results doesn't work

phcreery commented 2 years ago

Typing tan doesn't work. However, typing a*tan works

This is probably a result of the first character inputted is not being parsed into the function recognizer. For example: tan does not recognize the expression f [Backspace] tan recognizes tan sin results in s ∈ as in s "in" s [Backspace] sin results in sin

stefnotch commented 2 years ago

Adding shortcuts[':'] = '\\coloneq' to ExpressionElement.vue would be useful

shortcuts[':'] = {
    mode: 'math',
    value: '\\coloneq',
  }
stefnotch commented 2 years ago

Typing tan doesn't work. However, typing a*tan works

This is probably a result of the first character inputted is not being parsed into the function recognizer. For example: tan does not recognize the expression f [Backspace] tan recognizes tan sin results in s ∈ as in s "in" s [Backspace] sin results in sin

Your guess is spot on. I investigated this a bit more and apparently, mathlive only calls that in to logic when receiving keyboard events. (Mathlive has an internal keystroke buffer. It is a somewhat hack-ish way of keeping track of the last few characters, checking if they match something and then replacing it with the something)

https://github.com/arnog/mathlive/blob/77953fa9417e349b2ab0d5c8718ea21bf358752a/src/editor-mathfield/keyboard-input.ts#L99

stefnotch commented 2 years ago

Another random issue

If you try to assign a value to pi, and press enter, the cursor will keep on blinking, even if you edit another thing (so you can have multiple cursor blinking at the same time).

Basically, type a[Backspace]pi:3

phcreery commented 2 years ago

Hmm, for some reason I am no seeing this in my instance

stefnotch commented 2 years ago

Okay, odd, I'm also struggling to reproduce this. I suppose it's worth keeping out an eye for.

Another piece of feedback I got

a small nit in Quantumsheets: the input boxes capture my scroll events, so if my mouse is somewhere in the doc and I scroll down and intersect one, it stops

stefnotch commented 2 years ago

Typing tan doesn't work. However, typing a*tan works

This is probably a result of the first character inputted is not being parsed into the function recognizer. For example: tan does not recognize the expression f [Backspace] tan recognizes tan sin results in s ∈ as in s "in" s [Backspace] sin results in sin

Your guess is spot on. I investigated this a bit more and apparently, mathlive only calls that in to logic when receiving keyboard events. (Mathlive has an internal keystroke buffer. It is a somewhat hack-ish way of keeping track of the last few characters, checking if they match something and then replacing it with the something)

https://github.com/arnog/mathlive/blob/77953fa9417e349b2ab0d5c8718ea21bf358752a/src/editor-mathfield/keyboard-input.ts#L99

I pushed a little hack/workaround for this 71e1cbdb096da4a56c158392917f88d325967d8e We should eventually find a proper fix/report this on the mathlive repository/submit a pull request for a "insert a letter as if the user typed it" function over there

Another piece of feedback I got

a small nit in Quantumsheets: the input boxes capture my scroll events, so if my mouse is somewhere in the doc and I scroll down and intersect one, it stops

That issue has been reported at https://github.com/arnog/mathlive/issues/1146 For now I'm locally fixing mathlive before deploying it.

stefnotch commented 2 years ago

Alright, I also fixed the feedback about the escape to exit the mathfield.

Let's close this issue, since this issue is pretty much all fixed. If we encounter more such little quality of life issues, we can open new ones