[PR #1799] [MERGED] Patch Embed styles with prefixing #3784

Closed
opened 2026-02-22 18:34:29 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/1799
Author: @timothycarambat
Created: 7/1/2024
Status: Merged
Merged: 7/1/2024
Merged by: @timothycarambat

Base: masterHead: 919-chat-embed-style-prefixing


📝 Commits (2)

📊 Changes

26 files changed (+733 additions, -392 deletions)

View changed files

📝 .vscode/settings.json (+2 -0)
📝 embed/package.json (+11 -4)
embed/postcss.config.js (+10 -0)
📝 embed/src/App.jsx (+13 -13)
📝 embed/src/components/ChatWindow/ChatContainer/ChatHistory/HistoricalMessage/Actions/index.jsx (+6 -6)
📝 embed/src/components/ChatWindow/ChatContainer/ChatHistory/HistoricalMessage/index.jsx (+26 -20)
📝 embed/src/components/ChatWindow/ChatContainer/ChatHistory/PromptReply/index.jsx (+37 -25)
📝 embed/src/components/ChatWindow/ChatContainer/ChatHistory/index.jsx (+15 -12)
📝 embed/src/components/ChatWindow/ChatContainer/PromptInput/index.jsx (+13 -10)
📝 embed/src/components/ChatWindow/ChatContainer/index.jsx (+2 -2)
📝 embed/src/components/ChatWindow/Header/index.jsx (+15 -14)
📝 embed/src/components/ChatWindow/index.jsx (+7 -7)
📝 embed/src/components/Head.jsx (+12 -39)
📝 embed/src/components/OpenButton/index.jsx (+2 -1)
📝 embed/src/components/ResetChat/index.jsx (+3 -2)
📝 embed/src/components/SessionId/index.jsx (+3 -1)
📝 embed/src/components/Sponsor/index.jsx (+3 -2)
embed/src/index.css (+3 -0)
📝 embed/src/main.jsx (+11 -2)
embed/src/static/tailwind@3.4.1.js (+0 -209)

...and 6 more files

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #919

What is in this change?

  • Refactor how chat uses tailwindcss for its class styles
  • Implement tree shaking for TailwindCSS
  • Refactor classes in embed widget to use allm- prefix to avoid default style and class collisions
  • Have widget self-ref and load in its own style sheet to prevent breaking of current embeds.

Additional Information

  • Bundle size now reduced from 900kb -> 600kb
  • Will prevent style collision with host website.
  • Published new embed to frontend with anythingllm-chat-widget.min{.js,.css}

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/1799 **Author:** [@timothycarambat](https://github.com/timothycarambat) **Created:** 7/1/2024 **Status:** ✅ Merged **Merged:** 7/1/2024 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `919-chat-embed-style-prefixing` --- ### 📝 Commits (2) - [`b210340`](https://github.com/Mintplex-Labs/anything-llm/commit/b21034053fa51ee107c201c1648cc0ba0e567de7) Patch Embed styles with prefixing - [`2545538`](https://github.com/Mintplex-Labs/anything-llm/commit/2545538fa8318e0b0f66734382dc9ecf3b97b094) forgot files ### 📊 Changes **26 files changed** (+733 additions, -392 deletions) <details> <summary>View changed files</summary> 📝 `.vscode/settings.json` (+2 -0) 📝 `embed/package.json` (+11 -4) ➕ `embed/postcss.config.js` (+10 -0) 📝 `embed/src/App.jsx` (+13 -13) 📝 `embed/src/components/ChatWindow/ChatContainer/ChatHistory/HistoricalMessage/Actions/index.jsx` (+6 -6) 📝 `embed/src/components/ChatWindow/ChatContainer/ChatHistory/HistoricalMessage/index.jsx` (+26 -20) 📝 `embed/src/components/ChatWindow/ChatContainer/ChatHistory/PromptReply/index.jsx` (+37 -25) 📝 `embed/src/components/ChatWindow/ChatContainer/ChatHistory/index.jsx` (+15 -12) 📝 `embed/src/components/ChatWindow/ChatContainer/PromptInput/index.jsx` (+13 -10) 📝 `embed/src/components/ChatWindow/ChatContainer/index.jsx` (+2 -2) 📝 `embed/src/components/ChatWindow/Header/index.jsx` (+15 -14) 📝 `embed/src/components/ChatWindow/index.jsx` (+7 -7) 📝 `embed/src/components/Head.jsx` (+12 -39) 📝 `embed/src/components/OpenButton/index.jsx` (+2 -1) 📝 `embed/src/components/ResetChat/index.jsx` (+3 -2) 📝 `embed/src/components/SessionId/index.jsx` (+3 -1) 📝 `embed/src/components/Sponsor/index.jsx` (+3 -2) ➕ `embed/src/index.css` (+3 -0) 📝 `embed/src/main.jsx` (+11 -2) ➖ `embed/src/static/tailwind@3.4.1.js` (+0 -209) _...and 6 more files_ </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [ ] ✨ feat - [x] 🐛 fix - [x] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues <!-- Use "resolves #xxx" to auto resolve on merge. Otherwise, please use "connect #xxx" --> resolves #919 ### What is in this change? - Refactor how chat uses tailwindcss for its class styles - Implement tree shaking for TailwindCSS - Refactor classes in `embed` widget to use `allm-` prefix to avoid default style and class collisions - Have widget self-ref and load in its own style sheet to prevent breaking of current embeds. <!-- Describe the changes in this PR that are impactful to the repo. --> ### Additional Information - Bundle size now reduced from 900kb -> 600kb - Will prevent style collision with host website. - Published new embed to frontend with `anythingllm-chat-widget.min{.js,.css}` <!-- Add any other context about the Pull Request here that was not captured above. --> ### Developer Validations <!-- All of the applicable items should be checked. --> - [x] I ran `yarn lint` from the root of the repo & committed changes - [x] Relevant documentation has been updated - [x] I have tested my code functionality - [x] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:34:29 -05:00
yindo closed this issue 2026-02-22 18:34:29 -05:00
yindo changed title from [PR #1799] Patch Embed styles with prefixing to [PR #1799] [MERGED] Patch Embed styles with prefixing 2026-06-05 15:15:12 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#3784