Rewrite composer image state management, remove MobX #3925
+976
−1,709
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.
Supersedes #3890 by @mary-ext.
Original PR description:
Decided to do this separately from #3813, removes the only remaining MobX dependency from the app.
{cacheDirectory}/bsky-composer
, this folder is set to purge when the composer is closed. I feel this is a worthwhile approach compared to making sure that images are being purged properly every time it's being manipulated.react-avatar-editor
has been replaced withreact-image-crop
which is slightly more workable. Would've preferred one that also does fixed cropping butreact-easy-crop
is being finicky with initial states.Additions