LG-7620: Update approach to IPP CTA newline control#7069
Conversation
config/locales/idv/en.yml
Outdated
There was a problem hiding this comment.
I wonder if we could just insert the non-breaking space directly?
| are_you_near: 'Are you located near Washington,<nbsp/>D.C. <wbr/>or<nbsp/>Baltimore,<nbsp/>MD?' | |
| are_you_near: 'Are you located near Washington, D.C. or Baltimore, MD?' |
It seems to get past the YAML normalization without issue. I think it does pose a risk to be confusing to developers since visually it appears the same as a normal space, though at least in VSCode there is some additional highlighting on the irregular whitespace:
There was a problem hiding this comment.
Ah, duh! For some reason I thought there was an issue with that.
There was a problem hiding this comment.
I don't know that we ought to export the character for reuse, since it seems rather incidental for implementation and not something that one would expect as a named export of an encrypted upload module. I'd prefer if either (a) we duplicated it in DocumentCaptureTroubleshootingOptions or (b) moved it to some place where one could reasonably expect a named export of the sort (e.g. packages/document-capture/services/typography.ts, packages/typography/index.ts).
e7ecbf1 to
06e6c10
Compare
| troubleshooting: | ||
| headings: | ||
| are_you_near: 'Are you located near Washington, D.C. <br/>or Baltimore, MD?' | ||
| are_you_near: 'Are you located near Washington, D.C. <wbr/>or Baltimore, MD?' |
There was a problem hiding this comment.
Wondering if it might be worth adding a code comment indicating that there are intentional irregular, non-breaking whitespace in this sentence?
* changelog: Improvements, In-Person Proofing, Adjust approach to newline control CTA * Add minor comment

🎫 Ticket
Link to the relevant ticket.
🛠 Summary of changes
Inserts non-breaking spaces where appropriate, leveraging formatHtml's custom element handlers feature.
Fixes an edge case from #7058 while avoiding the (over) complexity of this approach.
📜 Testing Plan
Provide a checklist of steps to confirm the changes.
👀 Screenshots
If relevant, include a screenshot or screen capture of the changes.
Before:
After: