[PR #3244] [MERGED] feature: support configurable left and right message layout #4240

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

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/3244
Author: @MrGaoGang
Created: 2/17/2025
Status: Merged
Merged: 2/25/2025
Merged by: @timothycarambat

Base: masterHead: master


📝 Commits (10+)

  • bfeb552 feat: support user select message direction
  • 0ef1f7f feat: optimizing the code
  • 1166138 feat: lint code
  • c819f30 Merge branch 'master' into master
  • e6a78bd Merge branch 'Mintplex-Labs:master' into master
  • d40b4bf Merge branch 'master' of github.com:Mintplex-Labs/anything-llm into pr-3244-branch
  • 63255e1 fix: prevent localstorage read on every message component render
  • 941e011 Merge branch 'master' into master
  • 60b1912 Merge branch 'master' of github.com:MrGaoGang/anything-llm into pr-3244-branch
  • 723360d docs: update jsdoc comment for hook

📊 Changes

7 files changed (+125 additions, -14 deletions)

View changed files

📝 frontend/src/components/DefaultChat/index.jsx (+13 -11)
📝 frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/Actions/index.jsx (+2 -1)
📝 frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/index.jsx (+5 -2)
📝 frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/index.jsx (+6 -0)
frontend/src/hooks/useChatMessageAlignment.js (+30 -0)
frontend/src/pages/GeneralSettings/Appearance/MessageDirection/index.jsx (+67 -0)
📝 frontend/src/pages/GeneralSettings/Appearance/index.jsx (+2 -0)

📄 Description

Pull Request Type

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

resolves #3253

What is in this change?

  • In Appearance add [Message Direction] config!

The Message default direction is align left, follow the online! , we can change the different direction use the bottom bubble

image
  • In Message List:

    • default direction
      image

    • left to right direction
      image

  • Impact on code

    • Step1: Write direction config: frontend/src/pages/GeneralSettings/Appearance/MessageDirection/index.jsx
    • Step2: Register Direction Config: frontend/src/pages/GeneralSettings/Appearance/index.jsx
    • Step3: Change The Message Direction use Class name
      • frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/Actions/index.jsx
      • frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/index.jsx

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/3244 **Author:** [@MrGaoGang](https://github.com/MrGaoGang) **Created:** 2/17/2025 **Status:** ✅ Merged **Merged:** 2/25/2025 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (10+) - [`bfeb552`](https://github.com/Mintplex-Labs/anything-llm/commit/bfeb552c24d8b1883dd4d6ed460db2ea8f3b011d) feat: support user select message direction - [`0ef1f7f`](https://github.com/Mintplex-Labs/anything-llm/commit/0ef1f7f3f0174b5ceb436ea6ba8b2a60f933f614) feat: optimizing the code - [`1166138`](https://github.com/Mintplex-Labs/anything-llm/commit/116613825f1b6b6eaccd7abed0d00e05b963333b) feat: lint code - [`c819f30`](https://github.com/Mintplex-Labs/anything-llm/commit/c819f30538d1baccbee6a75bab9b7d985a9bdc14) Merge branch 'master' into master - [`e6a78bd`](https://github.com/Mintplex-Labs/anything-llm/commit/e6a78bde7eac4a44b8f98f1cefd94821919ae8d7) Merge branch 'Mintplex-Labs:master' into master - [`d40b4bf`](https://github.com/Mintplex-Labs/anything-llm/commit/d40b4bf699b765f9679943aa071baa9664a55911) Merge branch 'master' of github.com:Mintplex-Labs/anything-llm into pr-3244-branch - [`63255e1`](https://github.com/Mintplex-Labs/anything-llm/commit/63255e1a516075a39143688b18435b27c7ec015a) fix: prevent localstorage read on every message component render - [`941e011`](https://github.com/Mintplex-Labs/anything-llm/commit/941e0113ff35532f001c7bbc093292d90ec8e054) Merge branch 'master' into master - [`60b1912`](https://github.com/Mintplex-Labs/anything-llm/commit/60b1912979e3f7a64320854c97991676b96d72d7) Merge branch 'master' of github.com:MrGaoGang/anything-llm into pr-3244-branch - [`723360d`](https://github.com/Mintplex-Labs/anything-llm/commit/723360d88b2d164bc15c0adad7d4da34ab519297) docs: update jsdoc comment for hook ### 📊 Changes **7 files changed** (+125 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/DefaultChat/index.jsx` (+13 -11) 📝 `frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/Actions/index.jsx` (+2 -1) 📝 `frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/index.jsx` (+5 -2) 📝 `frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/index.jsx` (+6 -0) ➕ `frontend/src/hooks/useChatMessageAlignment.js` (+30 -0) ➕ `frontend/src/pages/GeneralSettings/Appearance/MessageDirection/index.jsx` (+67 -0) 📝 `frontend/src/pages/GeneralSettings/Appearance/index.jsx` (+2 -0) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [ ] ✨ feat - [ ] 🐛 fix - [ ] ♻️ refactor - [x] 💄 style - [ ] 🔨 chore - [ ] 📝 docs resolves #3253 ### What is in this change? - **In Appearance add [Message Direction] config!** > The Message default direction is align left, follow the online! , we can change the different direction use the bottom bubble <img width="959" alt="image" src="https://github.com/user-attachments/assets/2bb4121e-f3fb-4e38-8560-0d3776cf1bb7" /> - **In Message List**: - default direction <img width="500" alt="image" src="https://github.com/user-attachments/assets/aeac7f75-86b1-4c34-b33c-4cda2d29ba0b" /> - left to right direction <img width="500" alt="image" src="https://github.com/user-attachments/assets/d75112fa-b1c6-4f9e-b58c-08faf0d5f5e6" /> - **Impact on code** - Step1: Write direction config: frontend/src/pages/GeneralSettings/Appearance/MessageDirection/index.jsx - Step2: Register Direction Config: frontend/src/pages/GeneralSettings/Appearance/index.jsx - Step3: Change The Message Direction use Class name - frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/Actions/index.jsx - frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/index.jsx <!-- Describe the changes in this PR that are impactful to the repo. --> ### 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:35:25 -05:00
yindo closed this issue 2026-02-22 18:35:25 -05:00
yindo changed title from [PR #3244] feature: support configurable left and right message layout to [PR #3244] [MERGED] feature: support configurable left and right message layout 2026-06-05 15:17:33 -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#4240