-
Notifications
You must be signed in to change notification settings - Fork 393
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: add analytics__Dashboard js-meta.xml support, and js-meta bug fixes #3232
Conversation
<xs:sequence> | ||
<xs:element type="xs:boolean" name="hasStep" minOccurs="0"> | ||
<xs:annotation> | ||
<xs:documentation>Specify that your component requires an attached step to function as expected. Only valid for `analytics__Dashboard` targets. With this set to `true`, the Tableau CRM dashboard builder UI prompts you to attach an existing step or create a new step when creating an instance of your component. Components with an attached step have access to step-specific properties like `results` and `selection`.</xs:documentation> |
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.
vscode-xml extension handles markdown in xs:documentation
in the hovers, and markdown works fine as plain text if any other tool ever looks at this xsd.
|
||
const catalogPaths = [ | ||
path.join( | ||
['0.14.0', '0.16.0', '1.0.0'].forEach(rhExtensionVersion => { |
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.
This is just running the existing tests against different versions -- it's more obvious if you look at this part with whitespace diffs off.
ab632a6
to
5e0536f
Compare
cc: @jimmydief |
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.
Added 2 minor edits for doc attributes
12eba1f
to
0311510
Compare
Thanks @smithgp, this looks good to me so far! The one missing piece is the new "Measure" and "Dimension" attribute types. These are only allowed in target configs with |
Yep, I thought of those, but the schema currently has the |
0311510
to
852a40a
Compare
<!-- type attribute on property XSD --> | ||
<xs:simpleType name="propertyTypeAttr"> | ||
<xs:union> | ||
<xs:simpleType> |
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.
This does give code-completion for these enumerated values, but allows people to type in the valid patterns below.
<xs:restriction base="xs:string"> | ||
<xs:enumeration value="Boolean"> | ||
<xs:annotation> | ||
<xs:documentation>A boolean value.</xs:documentation> |
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.
You need to have a documentation annotation here, or the hover text on the attribute value shows the default annotation of the filter
attribute itself which looks funny.
</xs:enumeration> | ||
<xs:enumeration value="Color"> | ||
<xs:annotation> | ||
<xs:documentation>Displays a color selector. Use the default attribute to specify RGBA, RGB, or hex strings. Supported only if the target is `lightningCommunity__Default`.</xs:documentation> |
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.
These descriptions are copied from the public documentation.
852a40a
to
2a5c346
Compare
With how this xsd is currently setup, this is the analytics__Dashboard target and the hasStep targetConfig tag. @W-9191640@
Without this fix, the channel message when 0.16.0 is installed is wrong since the logic here assumed it was 0.13.0 or less. Also, it looks like the original issue in the vscode-xml extension got fixed in the 0.16.0 release, and it is working locally for me. I also made it a little more future proof by also enabling it if/when the version goes to 1.x+, and updated the tests to check for all of those version.
These are in the docs but were not listed here: - <propertyType> - `filter` on <property>
2a5c346
to
c1392f5
Compare
What does this PR do?
This updates the js-meta.xml schema support:
analytics__Dashboard
js-meta.xml support, for the new LWC's in analytics dashboard feature. This includes theDimension
andMeasure
type
's in<property>
.<propertyType>
,filter
on<property>
type
on<property>
What issues does this PR fix or reference?
@W-9191640@, @W-8852786@
Functionality Before
<target>analytics__Dashboard</target>
or used<hasStep>
in a<targetConfig>
.analytics__Dashboard
, nor hover text<propertyType>
andfilter
.js-meta.xml
files didn't work.Functionality After
That all works now.