Update architecture docs and rename manager variables to match Trash interface#121
Merged
Update architecture docs and rename manager variables to match Trash interface#121
Conversation
- Add Trash interface to class diagram (Manager implements it) - Add Remove method to Manager - Add ForceHomeTrash to Config - Add mu sync.Mutex to LegacyStorage - Add Trash Interface section explaining the decoupling
Now that CLI and UI depend on the trash.Trash interface rather than *trash.Manager, rename variables to reflect the actual type: - cli.CLI.manager -> cli.CLI.trash (c.trash.Put(), c.trash.List()) - ui.Model.trashManager -> ui.Model.trash (m.trash.Remove()) - Render(manager, ...) -> Render(t, ...) - NewModel(manager, ...) -> NewModel(t, ...)
Contributor
Code Metrics Report
Details | | main (b7d1d1f) | #121 (d70623a) | +/- |
|---------------------|----------------|----------------|-------|
- | Coverage | 44.2% | 44.1% | -0.1% |
| Files | 24 | 24 | 0 |
| Lines | 1821 | 1824 | +3 |
| Covered | 806 | 806 | 0 |
| Code to Test Ratio | 1:1.5 | 1:1.5 | 0.0 |
| Code | 2772 | 2772 | 0 |
| Test | 4248 | 4248 | 0 |
| Test Execution Time | 3s | 3s | 0s |Code coverage of files in pull request scope (35.3% → 35.2%)
Reported by octocov |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WHAT
Update
docs/architecture.mdto reflect the Phase 1-3 refactoring changes, and renamemanagervariables across CLI and UI totrashto match thetrash.Trashinterface they now hold.WHY
After introducing the
Trashinterface, variables likecli.CLI.managerandui.Model.trashManagerstill carried the oldManagername despite holding an interface value. Variable names should reflect their type. The architecture documentation also lacked the newTrashinterface in its class diagram.