MyHomeworkSpace / client

The MyHomeworkSpace client.
MIT License
4 stars 4 forks source link

Shortcuts in Quick Add #129

Closed amazansky closed 4 years ago

amazansky commented 4 years ago
thatoddmailbox commented 4 years ago

So I added support for direct submission by holding down literally any modifier key (Alt, Control, Shift, and maybe Command? Need someone on macOS to verify that) and pressing Enter. I don't really know where the best place to document this is. I suppose we could put it in the keyboard shortcuts modal, but then we might want to add a specific "Quick Add" section. We could also maybe just add it somewhere in the Quick Add popup? "Enter to submit / Shift+Enter to really submit"?

Also right now, if there's an error, it will open up the homework modal with as much information you gave it and whatever error there was. I think we could maybe make this a bit more elegant (like maybe it could just blink the "unknown due date" or "unknown class" text red a few times when you try to submit it, instead of opening a whole new modal?) but it works for now. #128 is also something that could be considered for the class assignment, but we probably still want to require due dates for new homework.

willbarkoff commented 4 years ago

@thatoddmailbox command + enter doesn't work on macOS; however control + enter does.

In terms of suggesting the keyboard shortcuts, maybe something like this would work, but I think it would have to be a bit more subtle.

image
thatoddmailbox commented 4 years ago

Huh, that's weird. Was that in Firefox? I'm pretty sure e.metaKey should work for Command...can you try a different browser?

Also, for the text underneath: it feels a bit weird to say press enter to modify. Shouldn't they just modify by editing the text that's there? Not sure on that one though.

willbarkoff commented 4 years ago

That was in Firefox 76.0b8, and I also tested it in Safari 13.1 (both on macOS 10.15.4), and command + enter doesn't work on either of them

thatoddmailbox commented 4 years ago

Should be fixed now.