mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-05 04:12:25 +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,15 @@
|
||||
# Decomposition Decisions
|
||||
|
||||
- **File:** `js/ui/profileModalController.js`
|
||||
- **Extracted Controllers:**
|
||||
- `js/ui/profileModal/ProfileBlockListController.js` (Block list logic)
|
||||
- `js/ui/profileModal/ProfileEditController.js` (Edit profile logic)
|
||||
- **Rationale:**
|
||||
- Block list management is a distinct feature set (add, remove, list, refresh).
|
||||
- Edit profile is a self-contained form handling workflow (populate, upload, save).
|
||||
- Reducing the main controller size improves readability and separation of concerns.
|
||||
- **Backwards Compatibility:**
|
||||
- New controllers alias DOM references back to the main controller (`this.mainController.blockList = ...`) to maintain compatibility with tests and potentially other external code that expects these properties on the main controller.
|
||||
- Delegate methods added to `ProfileModalController` to forward calls to the new controllers, preserving the public API.
|
||||
- **Baseline Update:**
|
||||
- `js/ui/profileModalController.js` reduced from 6258 to 5541 lines (-717 lines).
|
||||
Reference in new issue
Block a user