[PR #4890] [MERGED] Toggle switch component #4809

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

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/4890
Author: @shatfield4
Created: 1/21/2026
Status: Merged
Merged: 1/28/2026
Merged by: @timothycarambat

Base: masterHead: 4889-feat-toggle-component-implementation


📝 Commits (10+)

  • 93ecf64 replace all toggle switches with toggle component
  • 001695d add variant, label, and description support for toggle component
  • b4b959f Merge branch 'master' into 4889-feat-toggle-component-implementation
  • 6756ccd refactor Toggle with subcomponents and JSDoc
  • 45b9fdb use checked value from Toggle onChange callback
  • c0b32d5 replace missed inline toggles with Toggle component
  • 58d8cd6 Merge branch 'master' of github.com:Mintplex-Labs/anything-llm into 4889-feat-toggle-component-implementation
  • ceca422 fix jsdoc to use optional props
  • f979d05 Merge branch 'master' of github.com:Mintplex-Labs/anything-llm into 4889-feat-toggle-component-implementation
  • ea8886f Merge branch 'master' into 4889-feat-toggle-component-implementation

📊 Changes

22 files changed (+448 additions, -481 deletions)

View changed files

📝 frontend/src/components/Modals/ManageWorkspace/DataConnectors/Connectors/Gitlab/index.jsx (+11 -24)
📝 frontend/src/components/UserMenu/AccountModal/index.jsx (+13 -34)
frontend/src/components/lib/Toggle/index.jsx (+163 -0)
📝 frontend/src/pages/Admin/AgentBuilder/BlockList/index.jsx (+15 -26)
📝 frontend/src/pages/Admin/AgentBuilder/nodes/WebScrapingNode/index.jsx (+11 -31)
📝 frontend/src/pages/Admin/Agents/AgentFlows/FlowPanel.jsx (+12 -16)
📝 frontend/src/pages/Admin/Agents/DefaultSkillPanel/index.jsx (+6 -12)
📝 frontend/src/pages/Admin/Agents/GenericSkillPanel/index.jsx (+22 -28)
📝 frontend/src/pages/Admin/Agents/Imported/ImportedSkillConfig/index.jsx (+18 -18)
📝 frontend/src/pages/Admin/Agents/SQLConnectorSelection/NewConnectionModal.jsx (+8 -15)
📝 frontend/src/pages/Admin/Agents/SQLConnectorSelection/index.jsx (+19 -21)
📝 frontend/src/pages/Admin/Agents/WebSearchSelection/index.jsx (+19 -21)
📝 frontend/src/pages/Admin/ExperimentalFeatures/Features/LiveSync/toggle.jsx (+2 -9)
📝 frontend/src/pages/Admin/Users/index.jsx (+14 -25)
📝 frontend/src/pages/GeneralSettings/ChatEmbedWidgets/EmbedConfigs/NewEmbedModal/index.jsx (+10 -18)
📝 frontend/src/pages/GeneralSettings/PrivacyAndData/index.jsx (+8 -12)
📝 frontend/src/pages/GeneralSettings/Security/index.jsx (+21 -35)
📝 frontend/src/pages/GeneralSettings/Settings/components/AutoSpeak/index.jsx (+15 -27)
📝 frontend/src/pages/GeneralSettings/Settings/components/AutoSubmit/index.jsx (+15 -27)
📝 frontend/src/pages/GeneralSettings/Settings/components/ChatRenderHTML/index.jsx (+15 -27)

...and 2 more files

📄 Description

Pull Request Type

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

Relevant Issues

resolves #4889

What is in this change?

  • Implements standardized <Toggle /> component
  • Replaces all instances of existing toggle switches to help reduce code duplication and complexity
  • Standard layouts for label and descriptions
  • Adds default and horizontal variant to match internal designs
  • Supports sm, md, and lg sizes
  • Supports onChange and form modes

Additional Information

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/4890 **Author:** [@shatfield4](https://github.com/shatfield4) **Created:** 1/21/2026 **Status:** ✅ Merged **Merged:** 1/28/2026 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `4889-feat-toggle-component-implementation` --- ### 📝 Commits (10+) - [`93ecf64`](https://github.com/Mintplex-Labs/anything-llm/commit/93ecf648f8473dfc6b6966ab3cbf29b1f6fe55ac) replace all toggle switches with toggle component - [`001695d`](https://github.com/Mintplex-Labs/anything-llm/commit/001695de5de642cfb0dc0d0f92118dd3c45c3333) add variant, label, and description support for toggle component - [`b4b959f`](https://github.com/Mintplex-Labs/anything-llm/commit/b4b959f4af9cfbbc99c9f7c00be828c6697331ea) Merge branch 'master' into 4889-feat-toggle-component-implementation - [`6756ccd`](https://github.com/Mintplex-Labs/anything-llm/commit/6756ccdb2cce663750daa8ba57cf135a615faec7) refactor Toggle with subcomponents and JSDoc - [`45b9fdb`](https://github.com/Mintplex-Labs/anything-llm/commit/45b9fdb0c394405165dc785d5bf611425170a606) use checked value from Toggle onChange callback - [`c0b32d5`](https://github.com/Mintplex-Labs/anything-llm/commit/c0b32d5b521ac4e36487bb84171ff6c084264271) replace missed inline toggles with Toggle component - [`58d8cd6`](https://github.com/Mintplex-Labs/anything-llm/commit/58d8cd6d65bc9602b4424af1f4461676d453055d) Merge branch 'master' of github.com:Mintplex-Labs/anything-llm into 4889-feat-toggle-component-implementation - [`ceca422`](https://github.com/Mintplex-Labs/anything-llm/commit/ceca422842762b62244f1756a06631daa1f39eb4) fix jsdoc to use optional props - [`f979d05`](https://github.com/Mintplex-Labs/anything-llm/commit/f979d0511d5ba8d119e06ccc01e3329367bfca1f) Merge branch 'master' of github.com:Mintplex-Labs/anything-llm into 4889-feat-toggle-component-implementation - [`ea8886f`](https://github.com/Mintplex-Labs/anything-llm/commit/ea8886fd4bff177513e05b2dd64a4b29313bcf36) Merge branch 'master' into 4889-feat-toggle-component-implementation ### 📊 Changes **22 files changed** (+448 additions, -481 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/Modals/ManageWorkspace/DataConnectors/Connectors/Gitlab/index.jsx` (+11 -24) 📝 `frontend/src/components/UserMenu/AccountModal/index.jsx` (+13 -34) ➕ `frontend/src/components/lib/Toggle/index.jsx` (+163 -0) 📝 `frontend/src/pages/Admin/AgentBuilder/BlockList/index.jsx` (+15 -26) 📝 `frontend/src/pages/Admin/AgentBuilder/nodes/WebScrapingNode/index.jsx` (+11 -31) 📝 `frontend/src/pages/Admin/Agents/AgentFlows/FlowPanel.jsx` (+12 -16) 📝 `frontend/src/pages/Admin/Agents/DefaultSkillPanel/index.jsx` (+6 -12) 📝 `frontend/src/pages/Admin/Agents/GenericSkillPanel/index.jsx` (+22 -28) 📝 `frontend/src/pages/Admin/Agents/Imported/ImportedSkillConfig/index.jsx` (+18 -18) 📝 `frontend/src/pages/Admin/Agents/SQLConnectorSelection/NewConnectionModal.jsx` (+8 -15) 📝 `frontend/src/pages/Admin/Agents/SQLConnectorSelection/index.jsx` (+19 -21) 📝 `frontend/src/pages/Admin/Agents/WebSearchSelection/index.jsx` (+19 -21) 📝 `frontend/src/pages/Admin/ExperimentalFeatures/Features/LiveSync/toggle.jsx` (+2 -9) 📝 `frontend/src/pages/Admin/Users/index.jsx` (+14 -25) 📝 `frontend/src/pages/GeneralSettings/ChatEmbedWidgets/EmbedConfigs/NewEmbedModal/index.jsx` (+10 -18) 📝 `frontend/src/pages/GeneralSettings/PrivacyAndData/index.jsx` (+8 -12) 📝 `frontend/src/pages/GeneralSettings/Security/index.jsx` (+21 -35) 📝 `frontend/src/pages/GeneralSettings/Settings/components/AutoSpeak/index.jsx` (+15 -27) 📝 `frontend/src/pages/GeneralSettings/Settings/components/AutoSubmit/index.jsx` (+15 -27) 📝 `frontend/src/pages/GeneralSettings/Settings/components/ChatRenderHTML/index.jsx` (+15 -27) _...and 2 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 #4889 ### What is in this change? <!-- Describe the changes in this PR that are impactful to the repo. --> - Implements standardized `<Toggle />` component - Replaces all instances of existing toggle switches to help reduce code duplication and complexity - Standard layouts for label and descriptions - Adds default and horizontal variant to match internal designs - Supports `sm, md, and lg` sizes - Supports `onChange` and `form` modes ### 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. --> - [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:36:34 -05:00
yindo closed this issue 2026-02-22 18:36:34 -05:00
yindo changed title from [PR #4890] Toggle switch component to [PR #4890] [MERGED] Toggle switch component 2026-06-05 15:20:28 -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#4809