SinclaM / desmos-unlocked

Browser extension for better user control of the Desmos graphing calculator configuration
MIT License
9 stars 1 forks source link

Symbol shortcuts no longer work #14

Open qy9git opened 1 year ago

qy9git commented 1 year ago

The extention doesn't work.

Context: A year I was using an other extention called "Desmos More Greek Letters" but it suddenly stoped working. I downloaded the source and figured out a fix. Well now it's broke again idk how to fix it.

So I searched another extension that can do the same thing! But unfortunatly it's not working here either :( Here's the video that explains the issue more clearly: https://user-images.githubusercontent.com/51716593/205407145-3fb87594-636d-44df-bc14-cf378bb8d7a9.mp4

SinclaM commented 1 year ago

You're right--it's totally broken right now. I'm not sure what changed on Desmos' end, but this is definitely a must-fix. I'm really busy this week, but I'll try to get it working again as soon as I have the time.

qy9git commented 1 year ago

I hope u fix it 🥺

SinclaM commented 1 year ago

I think I've found the source of the issue.

The autoCommands option (which controlls symbol shortcuts) in the object passed to the Desmos.MathQuill.config function is now being ignored. This really sucks since it's basically the foundation of this extension and also pretty frustrating since it's supposed to be part of MathQuill's public API.

I don't know if this was specifically meant to stop users from using custom symbols (which they have always discouraged) through extensions like this or just a side-effect of some other big changes they've been making. If the latter is true, it might be possible that there's another way to cleanly update the autoCommands, but I'm not terribly optimistic. It's more likely that a fix would require more preload overrides which is likely doable but would probably not be very stable and would require a lot of time to figure out.

I don't have as much time to work on this extension as I did when I made it, so sadly I don't think a fix is coming for this anytime soon.

At least the other options are still working (breakout characters, auto-parenthesized functions, shortcuts in subscripts).

SinclaM commented 1 year ago

As a side note, this would be a great opportunity for DesModder to take over custom shortcuts (which seems to be on the docket anyway).

qy9git commented 1 year ago

Well your extention was great because it had other symbols like ± that was very handy.

GanerCodes commented 1 year ago

does anyone have like, maybe an offline version of desmos where this extension (and desmodder) are working? Like almost all my college notes are now corrupted because I use a lot of desmos unlocked math symbols

GanerCodes commented 1 year ago

does anyone have like, maybe an offline version of desmos where this extension (and desmodder) are working? Like almost all my college notes are now corrupted because I use a lot of desmos unlocked math symbols

bumping this it's seriously annoying

Reeperto commented 1 year ago

I've experimented and seem to have found a way to enable autocommands again. The following code snippet when ran seems to allow the user to input Gamma and have it properly turn into Γ.

function ApplyAutocommands() {
  const fields = document.querySelectorAll('.dcg-mq-editable-field')
  fields.forEach(field => {
    const opt = field._mqMathFieldInstance.__controller.root.cursor.options;
    opt.autoCommands.Gamma = 1;

    // The following also works. Anything that coerces to true enables it and vice versa for disabling
    // opt.autoCommands.Gamma = true;
  })
}

One important thing to note is that this only will apply to all the current mathquill boxes and any new expression wont have the autoCommand. A potential solution is to just repeatedly call the function on a timer to apply this to all the expression inputs. Maybe slightly hacky but it works. Alternatively one could just call this every time enter, up, or down are pressed, applying the new config to the maybe new entry box. Hopefully this insight could help re-enable symbol shortcuts.

qy9git commented 1 year ago

Wait a second, you're saying it can rework 👀

faisalnjs commented 11 months ago

We need this!!

Pencilfish1 commented 2 weeks ago

Has there been any progress on this?

SinclaM commented 1 week ago

I haven't been maintaining this project for quite some time. My hope was that DesModder would have had equivalent features by now, but it sounds like that's not the case. Although I don't have the time for it myself, if someone is interested in maintaining this project, please feel free to fork it and to reach out to me if you need help (but it's been a while since I developed this--not sure how useful I'd be).