Conversation
Parse <obsoleteConform/> as tag Z, hide obsolete attributes/commands/events from configurator views, and expose an obsolete flag so templates can skip them. Co-authored-by: Cursor <cursoragent@cursor.com>
The test fixture and Matter data model use <obsoleteConform/>, which xml-validate rejected because zcl.xsd only listed deprecateConform. Co-authored-by: Cursor <cursoragent@cursor.com>
99b8322 to
aa95a1c
Compare
| function isObsoleteConformance(conformance) { | ||
| return conformance === dbEnums.conformanceTag.obsolete | ||
| } | ||
|
|
There was a problem hiding this comment.
Don't put this function here. Add it to conformance-expression-evaluator.js
| * - manufacturerCode | ||
| * - mustUseTimedInvoke | ||
| * - name | ||
| * - obsolete |
There was a problem hiding this comment.
zcl-commands helper still does not have the obsolete access. You need to update update functions like query-command.js#selectAllCommands to get access to obsolete through zcl_commands and you need to do this for all the other helpers here as well.
Your alternate option which is way better and a lot more scalable where you will not need to update so many of these helpers and use existing infrastructure we have for conformance every where is to add this to existing conformance and none of the helpers will need to be updated. Will save you a ton of changes here. @ethanzhouyc would that be the correct assumption?
There was a problem hiding this comment.
Functionality wise this should be very similar to disallowConformance
There was a problem hiding this comment.
Agreed. Using the existing conformance infrastructure is cleaner and more scalable. is already parsed into the existing CONFORMANCE field as Z, and the conformance evaluator treats Z as notSupported, similar to disallowConform.
I’ll remove the separate obsolete property and use conformance as the source of truth.
One note: the main zcl_commands helper already has access to conformance because both selectAllCommands and selectCommandsByClusterId select COMMAND.CONFORMANCE. I’ll check the other helper query paths for consistency, but they should not need a separate obsolete field.
| * @param {*} conformance optional conformance string | ||
| * @returns boolean | ||
| */ | ||
| function isObsolete(conformance) { |
There was a problem hiding this comment.
This helper is not needed. Will be retrieved from existing helpers or conformance.
There was a problem hiding this comment.
Understood. I’ll remove this helper and use the existing conformance value instead. Obsolete elements will remain represented as Z, and templates can check it using the existing string comparison helper.
Parse as tag Z, hide obsolete attributes/commands/events from configurator views, and expose an obsolete flag so templates can skip them.
#1695