Allow for signal events to optionally pass dictionaries instead of strings #1829
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This would resolve #1828
I made this mostly to demonstrate how i envision it to work and think it works. I tried playing around with it and am fairly satisfied.
What I added/changed:
KEY_VALUE_PAIRS
, i put it under theOTHER
category in the enum. This type is meant for dictionaries, which are key value pairs. into_text()
they are handled under their own clause, as putting them invar_to_str()
would cause newlines to be added and breaks the syntax highlighting for the text editor. Instead they get serialized densely; example:arg="{"a":"1","b":"2"}"
What can still be added:
I hope you give this feature a try and see if this is a good fit