mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-31 18:02:27 +00:00
[decompose] extract BlockList and EditProfile from ProfileModalController
Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
40d72709c8
commit
bd6ca5b54e
8 files changed
+1047
-742
No files matched your search
@@ -0,0 +1,29 @@
|
||||
# Decomposition Context
|
||||
|
||||
- **Task:** Decompose `js/ui/profileModalController.js` (6258 lines).
|
||||
- **Reason:** Largest grandfathered file, highly coupled UI logic.
|
||||
- **Goal:** Extract "Block List" and "Edit Profile" logic into separate controllers to reduce line count by >200 lines and improve maintainability.
|
||||
- **Target Branch:** `unstable` (via `agents/daily/...` branch).
|
||||
- **Plan:**
|
||||
1. Extract `ProfileBlockListController` to manage blocked users list, add/remove blocks.
|
||||
2. Extract `ProfileEditController` to manage profile editing form, uploads, and saving.
|
||||
3. Update `ProfileModalController` to delegate to these new controllers.
|
||||
|
||||
## Selected Blocks
|
||||
|
||||
1. **Block List Management**:
|
||||
- `populateBlockedList`
|
||||
- `handleAddBlockedCreator`
|
||||
- `handleRemoveBlockedCreator`
|
||||
- `ensureBlockListStatusElement`
|
||||
- `setBlockListLoadingState`
|
||||
- `mutateBlocklist`
|
||||
- Event listeners and DOM cache for block list elements.
|
||||
|
||||
2. **Edit Profile Management**:
|
||||
- `handleEditProfile`
|
||||
- `populateEditPane`
|
||||
- `checkStorageForUploads`
|
||||
- `handleUpload`
|
||||
- `handleSaveProfile`
|
||||
- Event listeners and DOM cache for edit profile elements.
|
||||
Reference in new issue
Block a user