Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Dec 18, 2025

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Adds proper Markdown list and table rendering/styling to the Ultralytics Chat web widget for cleaner, more readable responses πŸ“βœ¨

πŸ“Š Key Changes

  • βœ… Enhanced chat message CSS to properly format unordered/ordered lists (ul, ol, li) with consistent spacing.
  • πŸ“‹ Added Markdown table support in the custom renderMarkdown() parser:
    • Detects | ... | table rows
    • Skips separator rows like |---|---|
    • Generates <table><thead>...</thead><tbody>...</tbody></table> wrapped in a horizontally scrollable container (.ult-table-wrap)
  • 🎨 Introduced table-specific styling:
    • Restores default table element behavior using all: revert (helps avoid broken styles from global CSS resets)
    • Adds borders, padding, font sizing, and overflow handling for wide tables
  • πŸ”„ Updated the bundled js/chat.min.js to include the same list/table parsing and styling changes.

🎯 Purpose & Impact

  • πŸ“ˆ Improves readability of AI responses that include step-by-step instructions (lists) or structured data (tables).
  • 🧩 More robust embedding on external sites: all: revert helps tables render correctly even when host pages apply aggressive CSS resets.
  • πŸ“± Better UX on mobile and small screens: tables won’t break layout thanks to horizontal scrolling.
  • ⚠️ Potential edge case: any line matching |...| will be treated as a table row, so content using pipes for other formatting could render as a table.

@vercel
Copy link

vercel bot commented Dec 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
llm Ready Ready Preview, Comment Dec 18, 2025 1:17am

@glenn-jocher glenn-jocher changed the title Fix bullet points Add tables Dec 18, 2025
- Parse `| col | col |` syntax and render as HTML tables
- Add `all:revert` to table elements to prevent host page style leakage
- Add compact list styles (ul/ol/li) with proper margins
- Add header styles (h1/h2/h3) with appropriate sizing

πŸ€– Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@glenn-jocher glenn-jocher merged commit e86e859 into main Dec 18, 2025
2 checks passed
@glenn-jocher glenn-jocher deleted the chat-widget-style-isolation branch December 18, 2025 01:19
@UltralyticsAssistant
Copy link
Member

Mergedβ€”huge thanks @glenn-jocher! πŸ™Œ

β€œDetails make perfection, and perfection is not a detail.” β€” Leonardo da Vinci
This PR is a perfect example of that mindset: by tightening up Markdown list formatting and adding resilient table rendering (including the .ult-table-wrap scroll behavior and all: revert to survive hostile CSS resets), the Ultralytics Chat widget becomes noticeably clearer and more dependable everywhere it’s embedded. Clean UI polish like this turns good answers into great experiences.

Appreciate you pushing the UX forward for everyone building with Ultralytics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants