Add markdown support in form field errors #555
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.
This PR adds markdown support to form field error messages, allowing servers to send formatted error messages with links, bold text, italic text, and other markdown formatting.
Problem
Previously, form components rendered error messages as plain text. When servers sent HTML or markdown in error messages, it would display as literal text rather than formatted content. This made it impossible to include helpful links or emphasize important parts of error messages.
Solution
The implementation leverages the existing markdown infrastructure (
remarkable
library andrenderMarkdown
directive) already used in other parts of the codebase. The change is minimal and surgical:Before:
After:
Features
**bold**
→ bold*italic*
→ italic[link](https://example.com)
→ linkExample Usage
Testing
Changes
FormField.ts
(2 lines added, 1 modified)temba-formfield.test.ts
and integration testsThe implementation is backward compatible and ready for production use.
Fixes #554.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
example.com
/home/REDACTED/work/temba-components/temba-components/node_modules/puppeteer/.local-chromium/linux-982053/chrome-linux/chrome --disable-REDACTED-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=Translate,BackForwardCache --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --enable-blink-features=IdleDetection --export-tagged-pdf --headless --hide-scrollbars --mute-audio --font-render-hinting=medium --force-color-profile=srgb --hide-scrollbars --disable-web-security --force-device-scale-factor=1 --no-sandbox --disable-gpu --disable-font-subpixel-positioning --disable-lcd-text --force-prefers-reduced-motion --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-renderer-REDACTEDing --disable-gpu-sandbox --disable-software-rasterizer --disable-REDACTED-networking --disable-default-apps --disable-extensions --disable-sync --disable-translate --hide-crash-restore-bubble --metrics-recording-only --no-first-run --safebrowsing-disable-auto-update --use-mock-keychain --disable-ipc-flooding-protection --disable-component-update --disable-domain-reliability --remote-debugging-port=0 --user-data-dir=/tmp/puppeteer_dev_chrome_profile-xx1AZm about:blank
(dns block)/home/REDACTED/work/temba-components/temba-components/node_modules/puppeteer/.local-chromium/linux-982053/chrome-linux/chrome --disable-REDACTED-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=Translate,BackForwardCache --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --enable-blink-features=IdleDetection --export-tagged-pdf --headless --hide-scrollbars --mute-audio --font-render-hinting=medium --force-color-profile=srgb --hide-scrollbars --disable-web-security --force-device-scale-factor=1 --no-sandbox --disable-gpu --disable-font-subpixel-positioning --disable-lcd-text --force-prefers-reduced-motion --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-renderer-REDACTEDing --disable-gpu-sandbox --disable-software-rasterizer --disable-REDACTED-networking --disable-default-apps --disable-extensions --disable-sync --disable-translate --hide-crash-restore-bubble --metrics-recording-only --no-first-run --safebrowsing-disable-auto-update --use-mock-keychain --disable-ipc-flooding-protection --disable-component-update --disable-domain-reliability --remote-debugging-port=0 --user-data-dir=/tmp/puppeteer_dev_chrome_profile-yumQyW about:blank
(dns block)/home/REDACTED/work/temba-components/temba-components/node_modules/puppeteer/.local-chromium/linux-982053/chrome-linux/chrome --disable-REDACTED-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=Translate,BackForwardCache --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --enable-blink-features=IdleDetection --export-tagged-pdf --headless --hide-scrollbars --mute-audio --font-render-hinting=medium --force-color-profile=srgb --hide-scrollbars --disable-web-security --force-device-scale-factor=1 --no-sandbox --disable-gpu --disable-font-subpixel-positioning --disable-lcd-text --force-prefers-reduced-motion --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-renderer-REDACTEDing --disable-gpu-sandbox --disable-software-rasterizer --disable-REDACTED-networking --disable-default-apps --disable-extensions --disable-sync --disable-translate --hide-crash-restore-bubble --metrics-recording-only --no-first-run --safebrowsing-disable-auto-update --use-mock-keychain --disable-ipc-flooding-protection --disable-component-update --disable-domain-reliability --remote-debugging-port=0 --user-data-dir=/tmp/puppeteer_dev_chrome_profile-QlUPm3 about:blank
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.