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

Description for commands #2

Open
sottey opened this issue Sep 3, 2023 · 2 comments
Open

Description for commands #2

sottey opened this issue Sep 3, 2023 · 2 comments

Comments

@sottey
Copy link

sottey commented Sep 3, 2023

I made a change to the code that might be nice to add to the main codebase. I changed this:

return cmdNotes.map(n => ({ id: n.noteId, name: n.getLabelValue('cmdPalette')}));

to this:
return cmdNotes.map(n => ({ id: n.noteId, name: n.getLabelValue('cmdPalette') + " - " + n.getLabelValue('cmdPaletteDesc') }));

Now, if I add an attribute of, say, #cmdPaletteDesc="Sort the current note's lines ascending" , it will show that in addition to the name.
I know I could just add it to the name, but I felt like having it discrete from the name would, possibly in the future, allow an option to turn descriptions on or off.

@justyns
Copy link
Owner

justyns commented Sep 6, 2023

Thanks for the suggestion, I added this to a new version of the script I'm working on and also changed it so cmdPalette can be empty now (to use the note title by default).

@sottey
Copy link
Author

sottey commented Sep 6, 2023

Love the changes. It is nice to have the Note Title used (less duplication)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants