-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Abbreviate long input commands #16
base: main
Are you sure you want to change the base?
Conversation
- replace if-else chain with switch statement - wrap lodash._mapKeys in function - add empty function as placeholder for shorthand renaming - apply vs code "format document" - add "shorthand" option to naming types in settings
…te-long-input-commands
…te-long-input-commands
…te-long-input-commands
d4rk and i discussed the actual implementation of the updated function into the app and his vision was to have an extra entirely separate setting for longform and shorthand notation, so i've adjusted the function a bit to prepare for him adding a redux store for that setting and some various other changes to support it
…te-long-input-commands
- helpCreateFrameDataJSON now takes in the display state as a parameter - clarification: renamed stateToSet -> vTriggerStateToSet - removed select option I added to 'Move Name Type' dropdown in settings, was using for testing and I swept it up into the commit - uncommented d4rk's notation widget for shorthand/longform naming - renameData func now accepts the display state as an arg, updated interior of function to leverage it - updated function docstring for renameData to reflect changes
- 'change displayState' to 'dataDisplayState'
…te-long-input-commands
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work on this! Your code looks a lot better than mine and I defo should add that @params thing to more of my work haha.
Just a few things that need addressing before we can merge. Please make sure that
Official move names can be shorthanded
Common names can be shorthanded
Inputs can not be shorthanded
- ensured that input name types won't be converted to shorthand - remove ternary operator in return statement in helpCreateFrameDataJSON
…te-long-input-commands
We have another problem I'm afraid! Official Common Inputs |
- fix bug where common inputs with shorthand were leaving specials "untranslated" to common input - refactor formatMoveName to work with moveName property instead of numCmd property due to consistency changes in the way numeric inputs were represented
…te-long-input-commands
…te-long-input-commands
- movesList will now also contain the type of normal it is, i.e., this will hold 'held normal' if it's normal that changes when the button is held - applying some logic changes to skipFormattingMove to function in line with the changes to the frame data - menat was breaking the implementation, i had to create a function for encapsulating the input extraction
- implement 'default to official name' logic for shorthand rename - add edge case catching for Rashid to skipFormattingMove - add edge case catching for Young Zeku and Menat to formatMoveName
…te-long-input-commands
…te-long-input-commands
- logic in index.ts is getting too dense, filled with edge cases - created MoveFormatter class to hold all rules and perform shorthand formatting per rule - created BaseFormatRule class and example derived class
- added the rule for young zeku - update logic for breaking out of format function in base class - add rule to MoveFormatter
As we last discussed in Discord, I've tweaked my approach to the shorthand code in order to cleanly and clearly support shorthand normals for SF5, SF4, and Third Strike. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- replace if-else chain with switch statement - wrap lodash._mapKeys in function - add empty function as placeholder for shorthand renaming - apply vs code "format document" - add "shorthand" option to naming types in settings
d4rk and i discussed the actual implementation of the updated function into the app and his vision was to have an extra entirely separate setting for longform and shorthand notation, so i've adjusted the function a bit to prepare for him adding a redux store for that setting and some various other changes to support it
- 'change displayState' to 'dataDisplayState'
- ensured that input name types won't be converted to shorthand - remove ternary operator in return statement in helpCreateFrameDataJSON
- fix bug where common inputs with shorthand were leaving specials "untranslated" to common input - refactor formatMoveName to work with moveName property instead of numCmd property due to consistency changes in the way numeric inputs were represented
- movesList will now also contain the type of normal it is, i.e., this will hold 'held normal' if it's normal that changes when the button is held - applying some logic changes to skipFormattingMove to function in line with the changes to the frame data - menat was breaking the implementation, i had to create a function for encapsulating the input extraction
- implement 'default to official name' logic for shorthand rename - add edge case catching for Rashid to skipFormattingMove - add edge case catching for Young Zeku and Menat to formatMoveName
- logic in index.ts is getting too dense, filled with edge cases - created MoveFormatter class to hold all rules and perform shorthand formatting per rule - created BaseFormatRule class and example derived class
- added the rule for young zeku - update logic for breaking out of format function in base class - add rule to MoveFormatter
- Simplified if/else chain in renameFrameDataToShorthand - Update setPlayer and helpCreateFrameDataJSON params so we can check which game is currently active - Standardize capitalization in format rule classes - Update stance to abbreviation map
…markman/FAT into abbreviate-long-input-commands
Had to wrestle with some git history (fingers crossed), but the last few issues should be squared away. |
End users are used to and appreciate reading abbreviations of stances, i.e., "stand(ing) medium punch" or "stand mp" becomes "st. mp". This pull request refactors the code used for renaming moves based on the user's app display settings, which includes additional code for creating the specified abbreviations.
It also includes some minor refactoring in regards to what's passed to the frame data formatting function (passing the state object for textual display settings instead of passing each property of the state object), code convention, and some variable renaming.
Fixes #9