[PR #641] [MERGED] [REFACTOR] remove all <dialog> modals and replace with custom ModalWrapper component #3438

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

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/641
Author: @shatfield4
Created: 1/22/2024
Status: Merged
Merged: 1/23/2024
Merged by: @timothycarambat

Base: masterHead: 640-bug-dialog-not-showing-on-browsers-that-do-not-support-dialog-element


📝 Commits (2)

  • 55f5515 add useModal hook and ModalWrapper component that will be used to replace all modals for better browser support
  • e506563 implement useModal hook and ModalWrapper component to replace all exisiting

📊 Changes

23 files changed (+722 additions, -745 deletions)

View changed files

📝 frontend/src/components/ChangeWarning/index.jsx (+33 -35)
frontend/src/components/ModalWrapper/index.jsx (+9 -0)
📝 frontend/src/components/UserMenu/index.jsx (+1 -1)
📝 frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/Citation/index.jsx (+6 -22)
📝 frontend/src/components/WorkspaceChat/index.jsx (+3 -6)
frontend/src/hooks/useModal.js (+10 -0)
📝 frontend/src/pages/Admin/Invitations/NewInviteModal/index.jsx (+60 -71)
📝 frontend/src/pages/Admin/Invitations/index.jsx (+8 -5)
📝 frontend/src/pages/Admin/Users/NewUserModal/index.jsx (+93 -104)
📝 frontend/src/pages/Admin/Users/UserRow/EditUserModal/index.jsx (+89 -99)
📝 frontend/src/pages/Admin/Users/UserRow/index.jsx (+12 -5)
📝 frontend/src/pages/Admin/Users/index.jsx (+8 -5)
📝 frontend/src/pages/Admin/Workspaces/NewWorkspaceModal/index.jsx (+55 -65)
📝 frontend/src/pages/Admin/Workspaces/WorkspaceRow/EditWorkspaceUsersModal/index.jsx (+109 -116)
📝 frontend/src/pages/Admin/Workspaces/WorkspaceRow/index.jsx (+13 -9)
📝 frontend/src/pages/Admin/Workspaces/index.jsx (+8 -5)
📝 frontend/src/pages/GeneralSettings/ApiKeys/NewApiKeyModal/index.jsx (+67 -77)
📝 frontend/src/pages/GeneralSettings/ApiKeys/index.jsx (+9 -5)
📝 frontend/src/pages/GeneralSettings/Chats/ChatRow/index.jsx (+42 -37)
📝 frontend/src/pages/GeneralSettings/EmbeddingPreference/index.jsx (+12 -7)

...and 3 more files

📄 Description

Pull Request Type

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

Relevant Issues

resolves #640

What is in this change?

Describe the changes in this PR that are impactful to the repo.

  • Replace all modals with our ModalWrapper component to improve browser compatibility
  • Introduce a new hook called useModal to keep track of modal states
  • Standardize all modals in AnythingLLM for consistency

Additional Information

Add any other context about the Pull Request here that was not captured above.

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/641 **Author:** [@shatfield4](https://github.com/shatfield4) **Created:** 1/22/2024 **Status:** ✅ Merged **Merged:** 1/23/2024 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `640-bug-dialog-not-showing-on-browsers-that-do-not-support-dialog-element` --- ### 📝 Commits (2) - [`55f5515`](https://github.com/Mintplex-Labs/anything-llm/commit/55f551552bbc8a868b5c1770be42cc616c5bc8e9) add useModal hook and ModalWrapper component that will be used to replace all <dialog> modals for better browser support - [`e506563`](https://github.com/Mintplex-Labs/anything-llm/commit/e506563173ed4dee85ee569c8cbfe13148f92aeb) implement useModal hook and ModalWrapper component to replace all exisiting <dialog> ### 📊 Changes **23 files changed** (+722 additions, -745 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/ChangeWarning/index.jsx` (+33 -35) ➕ `frontend/src/components/ModalWrapper/index.jsx` (+9 -0) 📝 `frontend/src/components/UserMenu/index.jsx` (+1 -1) 📝 `frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/Citation/index.jsx` (+6 -22) 📝 `frontend/src/components/WorkspaceChat/index.jsx` (+3 -6) ➕ `frontend/src/hooks/useModal.js` (+10 -0) 📝 `frontend/src/pages/Admin/Invitations/NewInviteModal/index.jsx` (+60 -71) 📝 `frontend/src/pages/Admin/Invitations/index.jsx` (+8 -5) 📝 `frontend/src/pages/Admin/Users/NewUserModal/index.jsx` (+93 -104) 📝 `frontend/src/pages/Admin/Users/UserRow/EditUserModal/index.jsx` (+89 -99) 📝 `frontend/src/pages/Admin/Users/UserRow/index.jsx` (+12 -5) 📝 `frontend/src/pages/Admin/Users/index.jsx` (+8 -5) 📝 `frontend/src/pages/Admin/Workspaces/NewWorkspaceModal/index.jsx` (+55 -65) 📝 `frontend/src/pages/Admin/Workspaces/WorkspaceRow/EditWorkspaceUsersModal/index.jsx` (+109 -116) 📝 `frontend/src/pages/Admin/Workspaces/WorkspaceRow/index.jsx` (+13 -9) 📝 `frontend/src/pages/Admin/Workspaces/index.jsx` (+8 -5) 📝 `frontend/src/pages/GeneralSettings/ApiKeys/NewApiKeyModal/index.jsx` (+67 -77) 📝 `frontend/src/pages/GeneralSettings/ApiKeys/index.jsx` (+9 -5) 📝 `frontend/src/pages/GeneralSettings/Chats/ChatRow/index.jsx` (+42 -37) 📝 `frontend/src/pages/GeneralSettings/EmbeddingPreference/index.jsx` (+12 -7) _...and 3 more files_ </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [ ] ✨ feat - [ ] 🐛 fix - [x] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues <!-- Use "resolves #xxx" to auto resolve on merge. Otherwise, please use "connect #xxx" --> resolves #640 ### What is in this change? Describe the changes in this PR that are impactful to the repo. - Replace all <dialog> modals with our ModalWrapper component to improve browser compatibility - Introduce a new hook called useModal to keep track of modal states - Standardize all modals in AnythingLLM for consistency ### Additional Information Add any other context about the Pull Request here that was not captured above. ### Developer Validations <!-- All of the applicable items should be checked. --> - [ ] 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 --- <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:33:47 -05:00
yindo closed this issue 2026-02-22 18:33:47 -05:00
yindo changed title from [PR #641] [REFACTOR] remove all <dialog> modals and replace with custom ModalWrapper component to [PR #641] [MERGED] [REFACTOR] remove all <dialog> modals and replace with custom ModalWrapper component 2026-06-05 15:13:25 -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#3438