Add convenience methods for Tips control with clickable links in ContentValue #3722
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Users reported that Tips controls in WeChat Work approval flows could not render URLs as clickable links ("Tips控件无法将url渲染为可点击的链接"). While the underlying
ContentValue.NewTips
structure supported the necessary JSON format for clickable links, creating Tips with mixed text and link content required verbose nested object creation, making it difficult for developers to implement properly.Solution
This PR adds three static factory methods to
ContentValue.NewTips
to simplify creation of Tips controls with clickable links:New Methods
Generated JSON Structure
The methods generate the correct WeChat Work API JSON format with proper type differentiation:
Key Features
type: 1
(plain text) vstype: 2
(clickable links)Example Usage
Before (verbose manual creation):
After (simple and intuitive):
Files Changed
This enhancement makes it significantly easier for developers to create Tips controls with clickable links that render properly in WeChat Work approval flows.
Fixes #3418
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.