[PR #1025] [MERGED] rf: less dom queries using bind:this #43606

Closed
opened 2026-04-29 17:40:43 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/1025
Author: @Carlos-err406
Created: 3/3/2024
Status: Merged
Merged: 3/4/2024
Merged by: @tjbck

Base: devHead: fix/dom-queries


📝 Commits (10+)

  • cc47159 rf: message input dom queries
  • 0fc76d4 rf: dom queries in ResponseMessageComponent
  • a5c1ac9 rf: dom queries in Account component
  • 13f0052 rf: dom queries in UserMessage component
  • f4f6724 rf: dom queries in Chats component
  • fe040ce rf: dom queries in Models component
  • 15e0f9d rf: dom queries in AddDocModal component
  • 0def6f8 rf: dom queries in ChatCompletion component
  • 50acdb0 fix: better variable names
  • b986c2a rf: dom queries in layout and pages

📊 Changes

15 files changed (+87 additions, -82 deletions)

View changed files

📝 src/lib/components/chat/MessageInput.svelte (+8 -13)
📝 src/lib/components/chat/Messages/ResponseMessage.svelte (+4 -4)
📝 src/lib/components/chat/Messages/UserMessage.svelte (+6 -6)
📝 src/lib/components/chat/Settings/Account.svelte (+5 -5)
📝 src/lib/components/chat/Settings/Chats.svelte (+10 -4)
📝 src/lib/components/chat/Settings/Models.svelte (+3 -4)
📝 src/lib/components/documents/AddDocModal.svelte (+11 -6)
📝 src/lib/components/playground/ChatCompletion.svelte (+8 -8)
📝 src/routes/(app)/+layout.svelte (+3 -2)
📝 src/routes/(app)/+page.svelte (+6 -4)
📝 src/routes/(app)/c/[id]/+page.svelte (+6 -4)
📝 src/routes/(app)/documents/+page.svelte (+3 -4)
📝 src/routes/(app)/modelfiles/+page.svelte (+3 -4)
📝 src/routes/(app)/playground/+page.svelte (+7 -9)
📝 src/routes/(app)/prompts/+page.svelte (+4 -5)

📄 Description

Pull Request Checklist

  • Description: Briefly describe the changes in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?

Description

addresses issue #1020 about querying the DOM

refactored the dom queries (document.getElementById) for a more svelte-ish approach using bind:this


Changelog Entry

Added

Fixed

  • centralized the way to access the dom elements in a more efficient and clean manner

Changed

  • the way to query the dom

Removed

  • some of the manual dom queries accross the codebase

🔄 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/open-webui/open-webui/pull/1025 **Author:** [@Carlos-err406](https://github.com/Carlos-err406) **Created:** 3/3/2024 **Status:** ✅ Merged **Merged:** 3/4/2024 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `fix/dom-queries` --- ### 📝 Commits (10+) - [`cc47159`](https://github.com/open-webui/open-webui/commit/cc471597cdde23cfa0272b5761d5d149fb24bd32) rf: message input dom queries - [`0fc76d4`](https://github.com/open-webui/open-webui/commit/0fc76d46db9a0589cc852291a382132226c0e5cd) rf: dom queries in ResponseMessageComponent - [`a5c1ac9`](https://github.com/open-webui/open-webui/commit/a5c1ac9680b63ff47cacd6aa34fded311d0a51cf) rf: dom queries in Account component - [`13f0052`](https://github.com/open-webui/open-webui/commit/13f00521225db4d41d37c901ea0a87baae64a63b) rf: dom queries in UserMessage component - [`f4f6724`](https://github.com/open-webui/open-webui/commit/f4f6724d960b8a7a943b84a4c90668d61eb52fd4) rf: dom queries in Chats component - [`fe040ce`](https://github.com/open-webui/open-webui/commit/fe040ce82b6d20a8afe3cf492d3b7ad21b92d108) rf: dom queries in Models component - [`15e0f9d`](https://github.com/open-webui/open-webui/commit/15e0f9de86ba7d05dfa25a7aead30ea63ddc33c3) rf: dom queries in AddDocModal component - [`0def6f8`](https://github.com/open-webui/open-webui/commit/0def6f87249295506d1e2dfd56114b99d1b38f8d) rf: dom queries in ChatCompletion component - [`50acdb0`](https://github.com/open-webui/open-webui/commit/50acdb09de84c8a6b52c6e0bbff4c1c1a7ce6f13) fix: better variable names - [`b986c2a`](https://github.com/open-webui/open-webui/commit/b986c2aefd34df8ee1000615fdb151d87d7b7432) rf: dom queries in layout and pages ### 📊 Changes **15 files changed** (+87 additions, -82 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/chat/MessageInput.svelte` (+8 -13) 📝 `src/lib/components/chat/Messages/ResponseMessage.svelte` (+4 -4) 📝 `src/lib/components/chat/Messages/UserMessage.svelte` (+6 -6) 📝 `src/lib/components/chat/Settings/Account.svelte` (+5 -5) 📝 `src/lib/components/chat/Settings/Chats.svelte` (+10 -4) 📝 `src/lib/components/chat/Settings/Models.svelte` (+3 -4) 📝 `src/lib/components/documents/AddDocModal.svelte` (+11 -6) 📝 `src/lib/components/playground/ChatCompletion.svelte` (+8 -8) 📝 `src/routes/(app)/+layout.svelte` (+3 -2) 📝 `src/routes/(app)/+page.svelte` (+6 -4) 📝 `src/routes/(app)/c/[id]/+page.svelte` (+6 -4) 📝 `src/routes/(app)/documents/+page.svelte` (+3 -4) 📝 `src/routes/(app)/modelfiles/+page.svelte` (+3 -4) 📝 `src/routes/(app)/playground/+page.svelte` (+7 -9) 📝 `src/routes/(app)/prompts/+page.svelte` (+4 -5) </details> ### 📄 Description ## Pull Request Checklist - [x] **Description:** Briefly describe the changes in this pull request. - [ ] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [ ] **Documentation:** Have you updated relevant documentation? - [ ] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? --- ## Description addresses issue #1020 about querying the DOM refactored the dom queries (document.getElementById) for a more svelte-ish approach using bind:this --- ### Changelog Entry ### Added - ### Fixed - centralized the way to access the dom elements in a more efficient and clean manner ### Changed - the way to query the dom ### Removed - some of the manual dom queries accross the codebase --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-29 17:40:43 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#43606