[PR #75] [MERGED] refactor frontend, remove effect, clean up logic #80

Closed
opened 2026-03-03 01:21:32 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/cs01/termpair/pull/75
Author: @cs01
Created: 8/8/2021
Status: Merged
Merged: 8/8/2021
Merged by: @cs01

Base: masterHead: cs01/refactor-frontend


📝 Commits (3)

  • 47d2497 break App.tsx into smaller files
  • 4686532 more refactoring
  • 5fd356f replace effects with functions

📊 Changes

12 files changed (+1311 additions, -1360 deletions)

View changed files

📝 termpair/frontend_src/src/App.tsx (+202 -1002)
termpair/frontend_src/src/BottomBar.tsx (+69 -0)
termpair/frontend_src/src/CopyCommand.tsx (+34 -0)
termpair/frontend_src/src/ErrorBoundary.tsx (+29 -0)
termpair/frontend_src/src/LandingPageContent.tsx (+254 -0)
termpair/frontend_src/src/TopBar.tsx (+33 -0)
📝 termpair/frontend_src/src/constants.ts (+32 -1)
termpair/frontend_src/src/types.tsx (+29 -0)
termpair/frontend_src/src/utils.tsx (+9 -0)
termpair/frontend_src/src/websocketMessageHandler.tsx (+148 -0)
termpair/frontend_src/src/xtermUtils.tsx (+106 -0)
📝 termpair/frontend_src/yarn.lock (+366 -357)

📄 Description

Summary of changes

  • Break app into smaller pieces/files
  • Clean up logic in react app by replacing calls to useEffect with regular functions. Instead of reacting to changes in variables, explicitly make calls to create the websocket connection when ready. This removes a lot of the "magic" from the way the code was behaving.
  • Upgrade npm packages with yarn upgrade

Test plan

Tested by running

make build_frontend
nox -s serve
nox -s broadcast

🔄 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/cs01/termpair/pull/75 **Author:** [@cs01](https://github.com/cs01) **Created:** 8/8/2021 **Status:** ✅ Merged **Merged:** 8/8/2021 **Merged by:** [@cs01](https://github.com/cs01) **Base:** `master` ← **Head:** `cs01/refactor-frontend` --- ### 📝 Commits (3) - [`47d2497`](https://github.com/cs01/termpair/commit/47d24979123e0328ee7dfa7bbb49981a24eb8d12) break App.tsx into smaller files - [`4686532`](https://github.com/cs01/termpair/commit/468653276ef7e160d4b0cc81db08aa607b007ca6) more refactoring - [`5fd356f`](https://github.com/cs01/termpair/commit/5fd356fbaa9af9f6bdd45b617434601ccd31991d) replace effects with functions ### 📊 Changes **12 files changed** (+1311 additions, -1360 deletions) <details> <summary>View changed files</summary> 📝 `termpair/frontend_src/src/App.tsx` (+202 -1002) ➕ `termpair/frontend_src/src/BottomBar.tsx` (+69 -0) ➕ `termpair/frontend_src/src/CopyCommand.tsx` (+34 -0) ➕ `termpair/frontend_src/src/ErrorBoundary.tsx` (+29 -0) ➕ `termpair/frontend_src/src/LandingPageContent.tsx` (+254 -0) ➕ `termpair/frontend_src/src/TopBar.tsx` (+33 -0) 📝 `termpair/frontend_src/src/constants.ts` (+32 -1) ➕ `termpair/frontend_src/src/types.tsx` (+29 -0) ➕ `termpair/frontend_src/src/utils.tsx` (+9 -0) ➕ `termpair/frontend_src/src/websocketMessageHandler.tsx` (+148 -0) ➕ `termpair/frontend_src/src/xtermUtils.tsx` (+106 -0) 📝 `termpair/frontend_src/yarn.lock` (+366 -357) </details> ### 📄 Description ## Summary of changes * Break app into smaller pieces/files * Clean up logic in react app by replacing calls to useEffect with regular functions. Instead of reacting to changes in variables, explicitly make calls to create the websocket connection when ready. This removes a lot of the "magic" from the way the code was behaving. * Upgrade npm packages with `yarn upgrade` ## Test plan <!-- provide evidence of testing, preferably with command(s) that can be copy+pasted by others --> Tested by running ``` make build_frontend nox -s serve nox -s broadcast ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 01:21:32 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/termpair#80
No description provided.