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

fix: few minor fixes on plugin with menus #636

Merged
merged 1 commit into from
Sep 9, 2021

Conversation

ghiscoding
Copy link
Collaborator

  • make sure commands/options are defined and also allow false to work as it should
  • also make the cellMenu/contextMenu work with just options set (without any commands)

- make sure commands/options are defined and also allow `false` to work as it should
- also make the cellMenu/contextMenu work with just options set (without any commands)
@6pac
Copy link
Owner

6pac commented Sep 9, 2021

can I ask why the change from x || "" to x !== undefined ? x : "" ? Not a criticism, just curious...

@ghiscoding
Copy link
Collaborator Author

ghiscoding commented Sep 9, 2021

@6pac yeah so if x is false it would go on the right side, so

  • if x = false (or x = 0) then x || "" would return ""
  • if x = false (or x = 0) then x !== undefined ? x : "" would return x

@6pac
Copy link
Owner

6pac commented Sep 9, 2021

Sure. Won't item.command and item.option always be either a string or undefined, though?
It doesn't really matter, I'm not familiar with this plugin and probably shouldn't have an opinion.

@ghiscoding
Copy link
Collaborator Author

I had an item.option that its value was false and wasn't working because the associated option was an empty string instead the real value that was supposed to be false

@6pac
Copy link
Owner

6pac commented Sep 9, 2021

No worries, I suppose Typescript would have avoided that conversation .... ;-)

@6pac 6pac merged commit 4d93f52 into master Sep 9, 2021
@ghiscoding
Copy link
Collaborator Author

@6pac
indeed TypeScript is awesome 😉

Question, are you going to have time to look at that PostAsync cleanup PR #495 this week?
If not, I might ask for another release without it, I'm ready for releasing new versions of my libs on my end but really wish to have a new version on your side first.

@6pac
Copy link
Owner

6pac commented Sep 9, 2021

I'm really busy at the moment, I didn't want to merge the issue just because I know if I do, I'll probably never get back to it. However, I may be a while fixing it, so I think I'd better just merge it and release, and then make a note to go back later :-o

Feel free to hassle me in a couple of weeks if I haven't done it.

@ghiscoding
Copy link
Collaborator Author

If we're talking about couple weeks, then I would rather have a new version now and wait for the post async in a few weeks in a separate version. I really wish to do new release this week so... up to you to merge and release or release without it, as long as I see a new version this week I would be quite happy 😄

@ghiscoding ghiscoding deleted the bugfix/menu-defined-command-options branch October 21, 2021 01:22
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

Successfully merging this pull request may close these issues.

2 participants