-
Notifications
You must be signed in to change notification settings - Fork 528
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
feat(widgets): annotate widget instances with $$widgetType #4624
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit d05e693:
|
c8f19b7
to
7d06cbc
Compare
e24b401
to
aebaf52
Compare
240b49f
to
ca93e85
Compare
b345e49
to
1fa70b8
Compare
@@ -50,6 +51,7 @@ function extractPayload( | |||
|
|||
payload.widgets.push({ | |||
type: widget.$$type, | |||
widgetType: widget.$$widgetType, |
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.
If I understand correctly widget.$$type
is the connector type and widget.$$widgetType
is the actual widget type, is that right ?
If that the case maybe it would be clearer to rename type
to connectorType
in the payload ?
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.
widgets without a connector (index, analytics) technically set type too, which is why I didn't rename it to connectorType :)
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.
What if we clean up the types for widgets without a connector? Is it a good time to do so? No strong opinion, but genuinely asking.
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.
Looks good to me!
chore: add typedObject helpers these aren't exposed
1baf046
to
d05e693
Compare
Adds a new $$widgetType to all widgets, so they can be differentiated from connectors, as well as differentiating between widgets that share a connector.
This differentiation hasn't been done for rangeInput & rangeSlider yet