feat(catalogs): allow binding to openUrl url#1453
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request updates the url property definition across several JSON catalog files to support dynamic strings by incorporating a reference to DynamicString and applying conditional URI formatting. It also replaces additionalProperties with unevaluatedProperties in the affected schemas. Feedback was provided regarding the lack of test cases for these changes, which violates the repository style guide's requirement that code changes must include tests to verify new validation logic.
| "allOf": [ | ||
| { | ||
| "$ref": "common_types.json#/$defs/DynamicString" | ||
| }, | ||
| { | ||
| "if": { | ||
| "type": "string" | ||
| }, | ||
| "then": { | ||
| "format": "uri" | ||
| } | ||
| } | ||
| ], |
There was a problem hiding this comment.
The PR description indicates that no tests were added for these changes, and the pre-launch checklist for tests is unchecked. According to the Repository Style Guide (line 17), code changes should have tests.
Please add test cases (e.g., in specification/v0_10/test/cases/) to verify that the url property correctly validates both literal URIs and dynamic bindings (data paths and function calls), and that invalid literal strings still fail validation as expected.
References
- If there are code changes, code should have tests. (link)
Description
Allow the
urlof theopenUrlfunction to bind to a path in the data model.This allows to have buttons in a list of cards that are bound to a url in a datamodel.
Fixes #1390.
Pre-launch Checklist
If you need help, consider asking for advice on the discussion board.