Repository navigation
BidiLens: native-first mixed-direction fixtures for NiceGUI chat and Markdown #6360
CodeinScrubs
started this conversation in
Show and tell
Replies: 1 comment
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Hi NiceGUI community. I maintain BidiLens, an MIT mixed RTL/LTR rendering toolkit, and wanted to share a practical resource for multilingual chat and Markdown interfaces.
Your Python ChatMessage builds Quasar chat content using
Html; Markdown renders Markdown and keeps sanitization configurable. Those are useful boundaries for a small, optional text-direction example without changing the Python app's layout or transport.Three fixtures worth trying in an English UI:
Native
dir="auto"is a good baseline. Its first-strong rule does not infer the intended RTL base of Latin-name-first RTL prose; a configurable majority policy or explicit direction can address that different requirement. Direction should remain separate from left/center/right alignment, and editable fields need their own IME/caret treatment.BidiLens provides a native-first guide, versioned fixtures, and optional browser-side tools. There is no BidiLens Python package, and this is not a tested NiceGUI integration. A fixtures-only or native-HTML example may be simpler than adding a dependency. Keep DOMPurify, escape/sanitize untrusted text, preserve the original copy text, and leave ordinary LTR scopes unchanged.
If this is useful, which would you prefer: a small documentation example or host-native regression fixtures? I would start with one read-only chat/Markdown component, not a global DOM observer or root RTL switch.
Prepared with AI assistance; the referenced NiceGUI sources were inspected. Native-language/accessibility review is still needed before a production rollout.
All reactions