Skip to content
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

Merged
merged 4 commits into from
Feb 18, 2023

Conversation

kieraneglin
Copy link
Contributor

Resolves #1027

Signed-off-by: Kieran Eglin kieran.eglin@gmail.com

Screen.Recording.2023-02-16.at.2.19.50.PM.mov

@@ -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) => {
Copy link
Contributor Author

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

Copy link
Member

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!

@pedrolamas pedrolamas added the FR - Enhancement New feature or request label Feb 17, 2023
@pedrolamas pedrolamas added this to the 1.23.2 milestone Feb 17, 2023
@matmen matmen merged commit 03f01d7 into fluidd-core:develop Feb 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FR - Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow custom ordering of Macro buttons
3 participants