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

Add Image Playground Support #23688

Merged
merged 8 commits into from
Dec 19, 2024
Merged

Add Image Playground Support #23688

merged 8 commits into from
Dec 19, 2024

Conversation

jkmassel
Copy link
Contributor

@jkmassel jkmassel commented Oct 23, 2024

Integrate ImagePlayground in the following screens:

  • Gutenberg (React Native)
  • Site Icon Picker (My Site)
  • Featured Imaged in Post/Page Settings
  • Site Media (Add Media)

Outstanding: Gravatar (asked in the respective iOS team channel)

ScreenRecording_12-16-2024.20-51-06_1.MP4

To test:

Regression Notes

  1. Potential unintended areas of impact

  2. What I did to test those areas of impact (or what existing automated tests I relied on)

  3. What automated tests I added (or what prevented me from doing so)

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Testing checklist:

  • WordPress.com sites and self-hosted Jetpack sites.
  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • VoiceOver.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • iPhone and iPad.
  • Multi-tasking: Split view and Slide over. (iPad)

@dangermattic
Copy link
Collaborator

dangermattic commented Oct 23, 2024

1 Warning
⚠️ This PR is assigned to the milestone 25.6 ❄️. The due date for this milestone has already passed.
Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished.

Generated by 🚫 Danger

@kean kean force-pushed the add/image-playground-support branch from 99c6485 to 6e3bc9a Compare December 17, 2024 02:15
@kean kean added the Media label Dec 17, 2024
@kean kean added this to the 25.6 ❄️ milestone Dec 17, 2024
@kean kean requested a review from crazytonyli December 17, 2024 02:19
@kean kean marked this pull request as ready for review December 17, 2024 02:19
@kean
Copy link
Contributor

kean commented Dec 17, 2024

Hey, @crazytonyli , I updated it and added more screens. It's ready for review.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Dec 17, 2024

WordPress Alpha📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr23688-03ff41c
Version25.6
Bundle IDorg.wordpress.alpha
Commit03ff41c
App Center BuildWPiOS - One-Offs #11204
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Dec 17, 2024

Jetpack Alpha📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr23688-03ff41c
Version25.6
Bundle IDcom.jetpack.alpha
Commit03ff41c
App Center Buildjetpack-installable-builds #10242
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.


let imagePlaygroundVC = ImagePlaygroundViewController()
imagePlaygroundVC.delegate = controller
objc_setAssociatedObject(imagePlaygroundVC, &MediaPickerMenu.strongDelegateKey, controller, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to double-check, should controller or imagePlaygroundVC be stored here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

controller is the value that needs to be retained. ImagePlaygroundViewController is kept in memory by UIKit due to being presented on screen.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, this line should be ...?

Suggested change
objc_setAssociatedObject(imagePlaygroundVC, &MediaPickerMenu.strongDelegateKey, controller, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
objc_setAssociatedObject(controller, &MediaPickerMenu.strongDelegateKey, controller, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)

Copy link
Contributor

@kean kean Dec 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value to be retained is a third parameter. The test is that the delegate gets called.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙈 Of course... Not sure how I misread that...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forget the signature literally every time I use it 😆

@kean kean requested a review from crazytonyli December 17, 2024 20:32
@kean kean force-pushed the add/image-playground-support branch from 5450f9c to 873b455 Compare December 17, 2024 21:14
@kean kean force-pushed the add/image-playground-support branch from 873b455 to 03ff41c Compare December 18, 2024 14:34
@kean kean enabled auto-merge December 19, 2024 13:18
@kean kean added this pull request to the merge queue Dec 19, 2024
Merged via the queue into trunk with commit 046a6c6 Dec 19, 2024
25 checks passed
@kean kean deleted the add/image-playground-support branch December 19, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants