Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MobX removal take 2 #5381

Merged
merged 2 commits into from
Sep 24, 2024
Merged

MobX removal take 2 #5381

merged 2 commits into from
Sep 24, 2024

Conversation

mary-ext
Copy link
Contributor

@mary-ext mary-ext commented Sep 17, 2024

Subset of #3925 (don't close/delete this branch yet)

Refactors the image functionality on the editor and removes remaining the MobX dependency completely. Worth noting that web-only image editor has been ripped out completely (too tangled in mutations which makes it infeasible to do in the same PR, we'll re-add this in a follow-up)

Image states are now immutable. Images are moved into a temporary path dedicated for the composer and they're purged upon closing the composer (IIRC asked @haileyok for where to place the purgeTemporaryFiles call).

Some manual checks

Web

  • Send an image without alt text
  • Enable alt text enforcement, composer should warn on missing alt text, send image with alt text
  • Send an external link embed containing a thumbnail (e.g. https://github.com/bluesky-social/social-app)
  • Send a GIF embed
  • Send a milly post, ensure alt text is present when sharing

Native (Android)

Untested, haven't dealt with Android Studio in a bit, have gotten around to wrangling with it. There hasn't been any differences between #3925 and this with regards to how the temporary files are dealt with, but extra verification wouldn't hurt
Image editing flow needs testing as well.

Native (iOS)

Untested, no iOS device.
Image editing flow needs testing as well.

Follow-ups

#3942 is required for pulling in the new cropper from #3925, as we're going to be importing a CSS file from the new package we'd be using for cropping functionality.

@mary-ext

This comment was marked as resolved.

@mary-ext
Copy link
Contributor Author

I've rebased this PR and #3942

@gaearon
Copy link
Contributor

gaearon commented Sep 23, 2024

Can you please rebase and also clarify the relationship between #3925 and this PR?
Is this PR a subset of the changes there?

@mary-ext
Copy link
Contributor Author

mary-ext commented Sep 23, 2024

will rebase again tomorrow since it's getting late, PR is a subset of Paul's, only containing the bits related to removing MobX.

@mary-ext
Copy link
Contributor Author

@gaearon should be ok to review now 👌

@mary-ext mary-ext mentioned this pull request Sep 24, 2024
@haileyok
Copy link
Member

Just fyi @gaearon I think we need to rm mobx from package.json now too haha.

@gaearon
Copy link
Contributor

gaearon commented Sep 24, 2024

Gave this some testing across platforms, seems solid. Thank you for untangling this and bringing it up to date!

@gaearon gaearon merged commit 8ea8946 into bluesky-social:main Sep 24, 2024
6 checks passed
estrattonbailey added a commit that referenced this pull request Sep 24, 2024
* origin/main:
  Remove image resizer (#5464)
  Remove `react-native-fs` (#5463)
  Revamp image editor (#5462)
  Revamp edit image alt text dialog (#5461)
  MobX removal take 2 (#5381)
  Edit self hosting copy (#5469)
  Automatically optimise SVG assets (#5467)
  [Share Extension] Update to support video (#5385)
  Revert change in FAB animation (#5465)
  Improvements to NSE (#4992)
  Don't use flex on inputs (#5458)
  Fix web splash (#5456)
  invert the fab animation, play a haptic (#4309)
  add sideborders to <ProfileHeaderLoading> (#4995)
  [Video] Flush low quality segments once focused (#5430)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants