Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify server announcement formatting between CLI and WebUI #3194

Open
achimnol opened this issue Dec 4, 2024 · 0 comments
Open

Unify server announcement formatting between CLI and WebUI #3194

achimnol opened this issue Dec 4, 2024 · 0 comments
Labels
area:ux UI / UX issue. comp:client Related to Client component comp:webui Related to WebUI component urgency:1 If no other duties are available, volunteer to help.
Milestone

Comments

@achimnol
Copy link
Member

achimnol commented Dec 4, 2024

cc: @yomybaby @adrysn
upstream: Textualize/rich#3565

I found that one of our customer sites has a server announcement like:

Image

The CLI interprets the server announcement as the Markdown formatter via Rich, and it seems to strip all the remaining text once an HTML tag appears.

import sys
from rich.console import Console
from rich.markdown import Markdown


raw_doc = """
# header
plain text
<p>html paragraph</p>
another line
"""
print("------------", file=sys.stderr)
print(raw_doc)
print("------------", file=sys.stderr)
console = Console(stderr=True)
doc = Markdown(raw_doc)
console.print(doc)

Image

We need to ensure that either rich.markdown recognizes the HTML tags or the Web UI uses a proper Markdown renderer and let the customer admins write the server announcements in Markdown without mixing HTML.

@achimnol achimnol added area:ux UI / UX issue. comp:client Related to Client component comp:webui Related to WebUI component labels Dec 4, 2024
@achimnol achimnol added this to the 24.09 milestone Dec 4, 2024
@achimnol achimnol added the urgency:1 If no other duties are available, volunteer to help. label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:ux UI / UX issue. comp:client Related to Client component comp:webui Related to WebUI component urgency:1 If no other duties are available, volunteer to help.
Projects
None yet
Development

No branches or pull requests

1 participant