-
Notifications
You must be signed in to change notification settings - Fork 229
data: Clarify the usage of the notification ActionInvoked parameter #1822
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
base: main
Are you sure you want to change the base?
Conversation
It's not very clear how the target value is used with the platform data, so at least avoid the potential misunderstanding, by clarifying that the target value is a variant that must be always present, even if unset
|
Just had an in-person discussion with @swick about this. I agree the current API We discussed also to eventually revert the changes to the This way the parameter only contains the |
| the following values in order: | ||
| #. The `target` for the action, if one was specified. | ||
| #. The `target` for the action (``v``) (the value may |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D-Bus doesn't have the concept of empty value, so it's not possible to have an unset variant. We could set it to an empty array but that's not correct since we wouldn't be able to differentiate whether it's unset or the actual target of the button
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D-Bus doesn't have the concept of empty value, so it's not possible to have an unset variant. We could set it to an empty array but that's not correct since we wouldn't be able to differentiate whether it's unset or the actual target of the button
Sure, indeed that was my main concern of this API when I saw the recent changes.
HOWEVER, indeed we can send an empty container (as for example was done in GLib IIRC), but it's not the greatest option since the API is technically new.
At the same time, since that parameter is controlled by the application, if the application, it should not care about it when the value is set to something else.
And, if we want to use an array for these values, having it of a "flexible length" it does not make sense, so or we use a fixed number of elements or we need to trash the API.
Yep, reason why of my (late, sorry) comments on #1298
That is not something we should do, having a flexible length for an array that is supposed to be in order always leave with the possibility that something in the path changed it, so I'd rather use an empty container in case, since at least we're always sure what's at each index of such array.
Sure thing, and I'm glad you did since that very same API was proposed 3+ years ago in #791 since I was facing the very same issue already and I didn't want to accept workarounds, so I'm happy to reiterate there if we all agree. |
|
@3v1n0 You still seem to be working on related things. Mind opening a PR for reverting the original v2 changes to ActionInvoked and adding the ActionInvoked2 signal? Otherwise I will take this over (but I'd really like to not have to :) ) |
Sure, I'll prepare it |
|
@swick btw since v2 has been technically out, should we move to v3 or wasn't it be released yet? |
|
I hope that no once will notice, it has been obviously broken anyway. So I would prefer to just stick to v2 and pretend this thing never happened. |
It's not very clear how the target value is used with the platform data, so at least avoid the potential misunderstanding, by clarifying that the target value is a variant that must be always present, even if unset
/cc @swick @jsparber