-
Notifications
You must be signed in to change notification settings - Fork 279
refactor(widget): rename some concepts #4967
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
…re local and explicit
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4967 +/- ##
==========================================
- Coverage 85.98% 85.98% -0.01%
==========================================
Files 325 325
Lines 35652 35660 +8
==========================================
+ Hits 30656 30662 +6
- Misses 4996 4998 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I realize there's a third concept called the |
Your original post seems about right.
This is how the widget MSC's are defining the actions as of now however. So I do think the naming should be as it is in the: MSC's ("not up to date general widget msc"), js-sdk, EW, matrix-widget-api |
After reading the widget code for a long time this afternoon, I think I finally understand some things about it. It seems there are two channels between the widget and the "machine", and the direction is indicated in the name of some structs. For instance,
ToWidgetRequest
= "some request has been sent from the machine to the widget", aka it's always from the point of view of the sender. For the second channel, there'sFromWidgetRequest
, aka it's a request sent from the widget to the machine.Now, this is where it gets confusing for me:
ToWidgetResponse
is the response from the widget to the machine. In other words, what I think motivated the name is that, this is the response to a request of kind "ToWidget". Bizarrely, there's no equivalent for responses to aFromWidgetRequest
; the responses are plain serialized from their original types.If I'm right, then I'm super super confused by this, because I'd imagine a response to a
ToWidgetRequest
(from machine to widget) would be named after the fact it's sent back by the machine to the widget, so I'd intuit it should be theFromWidgetResponse
. But that's the opposite: it is theToWidgetResponse
, which I imagined was the response from the machine to the widget.I think some renaming is due here, but I'm not sure how yet.