-
-
Notifications
You must be signed in to change notification settings - Fork 432
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
feat: allow ordering of gcode macros #1041
feat: allow ordering of gcode macros #1041
Conversation
@@ -40,37 +40,31 @@ export const getters: GetterTree<MacrosState, RootState> = { | |||
|
|||
return macro | |||
}) | |||
.sort((a, b) => a.name.localeCompare(b.name)) | |||
|
|||
return macros | |||
}, | |||
|
|||
// Gets visible macros, transformed. Should include the macro's config. | |||
// Is only used on the dashboard. Grouped by category. | |||
getVisibleMacros: (state, getters) => { |
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.
This needed to be updated to utilize getMacrosByCategory
so that macros would be sorted per-category, rather than being sorted overall then split into categories which lead to unexpected behaviour. Since I needed to update it anyway, I thought I'd refactor it to DRY things up somewhat
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.
Good point, this was actually rather stupid considering we will then do other operations on this!
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
Resolves #1027
Signed-off-by: Kieran Eglin kieran.eglin@gmail.com
Screen.Recording.2023-02-16.at.2.19.50.PM.mov