-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
π Feature Description
Currently, when markdown containing code blocks (e.g., using triple backticks ```) is rendered in components like chat, text, or markdown, the resulting "pre" tags are unstyled or minimally styled.
This leads to:
-
Poor readability of code blocks
-
No visual distinction between normal text and code
-
A less polished user experience, especially in LLM/chat use cases
π‘ Proposed Solution
Introduce a default CSS styling for "pre" and "code" tags rendered by Taipy components. This styling should be:
-
Visually distinctive
-
Readable (e.g., monospaced font, padding, background color)
-
Applied automatically unless overridden
Example default styles:
π Impact of the Feature
Components Affected
chat
-
text (when mode="md" or "pre")
-
markdown (if separated from text)
-
Any custom components rendering markdown with code
Benefits
-
Code samples and responses from LLMs become easier to read and aesthetically pleasing
-
Developers don't have to add custom styling every time
-
Aligns Taipy with modern UI/UX practices for developer tools
π Additional Context (Optional)
Let developers override or disable this default style via theme options or global CSS if needed.
π Code of Conduct
- I have checked the existing issues to avoid duplicates.
- I am willing to work on this issue (optional)
β Acceptance Criteria
- A working demo or example code (if applicable) is provided.
- Integration tests demonstrate the new functionality.
- Any new code is covered by unit tests.
- Code coverage remains at least 90%.
- Related documentation updates and release notes are created.