mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
feat(client): shortcuts legend modal available on pressing the ? key (#45530)
* Add modal texts in translations.json file * Add shortcuts modal state in redux * Create shortcuts modal * Integrate shortcuts modal * Resolve codefactor.io issues * Extend list of shortcuts Based on this comment: https://github.com/freeCodeCamp/freeCodeCamp/issues/36841#issuecomment-933310078 * Remove temporary placeholder for modal title * Open modal fom Hotkeys instead of learn.tsx As suggested in this comment: https://github.com/freeCodeCamp/freeCodeCamp/pull/45530#issuecomment-1101224993 * Complete list in transaltions * Change shortcut presentation fo better a11y Use table instead of list items as suggestedin this comment: https://github.com/freeCodeCamp/freeCodeCamp/pull/45530#issuecomment-1101796368 * Add aria-labelledby * Remove GAnalytics * Remove leftover style * Remove table caption * autofocus on modal close button * Improve modal a11y - Add requested changes from https://github.com/freeCodeCamp/freeCodeCamp/pull/45530#issuecomment-1104764766 - Leave autofocus and parent div role=dialog changes for later. (https://github.com/freeCodeCamp/freeCodeCamp/pull/45530#issuecomment-1107754148) * [WIP] Alllow users to turn off keyboard shortcuts * Add keyboard shortcuts switch in settings * Disable shortcuts * Remove toggle switch description * Refactor and cleanup * Remove close button from modal header Suggested by bbsmooth: https://github.com/freeCodeCamp/freeCodeCamp/pull/45530#issuecomment-1107861091 * Fix lint issues * Disable shortcuts * Disable shortcuts by default * Update challenge output test * Update challenge-hot-keys test * Disable shortcuts from inside handlers Co-authored-by: Mrugesh Mohapatra <1884376+raisedadead@users.noreply.github.com>
This commit is contained in:
@@ -4711,6 +4711,7 @@ module.exports = {
|
||||
yearsTopContributor: ['2019'],
|
||||
rand: 0.6126749173148205,
|
||||
theme: 'default',
|
||||
keyboardShortcuts: false,
|
||||
profileUI: {
|
||||
isLocked: false,
|
||||
showAbout: true,
|
||||
|
||||
@@ -84,7 +84,8 @@ const authUser = {
|
||||
},
|
||||
isDonating: envVariables.includes('--donor'),
|
||||
emailAuthLinkTTL: null,
|
||||
emailVerifyTTL: null
|
||||
emailVerifyTTL: null,
|
||||
keyboardShortcuts: false
|
||||
};
|
||||
|
||||
const blankUser = {
|
||||
|
||||
Reference in New Issue
Block a user