Knowt Hotkeys Project #3
Edge Cases and Tasks
for now it’s been implemented. The shortcuts working good. I notice, when shortcut is pressed, the button is not actually click rather it’s calling the same function as the button, this causes the button won’t show the loading spinner
Tasks
Since we are sure now shortcut is embed through button, we should be clear now that pressing shortcut should just trigger the button
onClickinstead of passing the same function to be called.This is very important because passing two same handler would introduce having to have same checker for button and shortcut, a lot of duplicate codes and edge cases
Mock exam and Assignment AITest has been updated with all the shortcuts
Let’s now do for Create Content for each item in it
We should be thinking on how we embed meta better. currently the props is too long
shortcut={{
hotkey: "Escape",
options: {
meta: { name: "Close popup" },
},
}}
...btnPropsMigrate the flashcards page to use this same setup for shortcut too
We must pass meta to all of our shortcut, otherwise it won’t have a good description to it