Skip to content

Conversation

t0m3k
Copy link
Collaborator

@t0m3k t0m3k commented May 14, 2023

As described in #131, using default shortcuts would cause a typescript error. This is due to the fact that [key: string]: ShortcutsItem; option was overriding today?: string; ... options.

That was also preventing intellisense from providing correct options to users.

With this PR:

  • Custom options is an array of ShortcutsItem in shortcuts element named custom.
  • Change to add custom options, as it is an array now it's simpler to enumerate.
  • Remove question mark from fields that should not be optional.

@onesine
Copy link
Owner

onesine commented May 17, 2023

Thanks for this PR @t0m3k. The problem is that the API is changing. Users will no longer be able to use the custom shortcuts in the same way. I wanted the keys for the custom shortcuts to be at the same level as the default shortcuts. But we will use this solution in the meantime.

But as I said, there will be a problem when users migrate to the new version.

@onesine onesine merged commit b1b0afe into onesine:master May 17, 2023
@onesine
Copy link
Owner

onesine commented May 17, 2023

This also poses another problem. A user cannot put a custom shortcut before a default shortcut.

@t0m3k
Copy link
Collaborator Author

t0m3k commented May 19, 2023

Thanks for comments @onesine, I have fixed both points in PR #138

And sorry for uploading this without giving it enough thought,

@onesine
Copy link
Owner

onesine commented Jun 2, 2023

Don't worry @t0m3k. Thanks for the new PR

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