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

[Voice to Content] Launch edit post with AI content #20992

Merged
merged 15 commits into from
Jun 19, 2024

Conversation

zwarm
Copy link
Contributor

@zwarm zwarm commented Jun 15, 2024

Closes https://github.com/Automattic/wordpress-mobile/issues/78

This PR launches the editPost view after successful recording of audio.

This branch build upon issue/v2c-show-elapsed-time

Important

Merge Instructions
- Make sure #20983 & #20984 have been merged to trunk
- Remove the Not Ready for Merge Label

  • Merge as normal

Note

The following have not yet been implemented:

  • Orientation changes
  • Overall polishing of the UI
  • Unit tests

To Test:

  • Install and launch the app
  • Login with an account that has access to AI credits (Any a8c P2 will have this - other free sites have 20 requests)
  • Navigate to Me > Debug Settings and enable the voice_to_content flag (restart the app)
  • Navigate to My Site and tap the FAB
  • Select the Post with Audio option
  • Start the recording session by tapping on the mic icon
  • Record a blog post - a few words, maybe include a list, try it out
  • Tap the done icon when finished
  • ✅ Verify the processing view is shown
  • ✅ Verify the Edit Post view is shown with your recorded content

Regression Notes

  1. Potential unintended areas of impact
    The recorded content is not shown

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

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


PR Submission Checklist:

  • I have completed the Regression Notes.
  • 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 (strike-out the not-applying and unnecessary ones): N/A

@zwarm zwarm added [Type] Task Do Not Merge In PRs with this label, our automation will fail a require check, preventing accidental merging unit-tests-exemption [Status] Not Ready for Merge and removed Do Not Merge In PRs with this label, our automation will fail a require check, preventing accidental merging labels Jun 15, 2024
@dangermattic
Copy link
Collaborator

dangermattic commented Jun 15, 2024

2 Warnings
⚠️ Class VoiceToContentActionEvent is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jun 15, 2024

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr20992-82a6ca6
Commit82a6ca6
Direct Downloadwordpress-prototype-build-pr20992-82a6ca6.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jun 15, 2024

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr20992-82a6ca6
Commit82a6ca6
Direct Downloadjetpack-prototype-build-pr20992-82a6ca6.apk
Note: Google Login is not supported on these builds.

Copy link

codecov bot commented Jun 15, 2024

Codecov Report

Attention: Patch coverage is 19.04762% with 17 lines in your changes missing coverage. Please review.

Project coverage is 40.74%. Comparing base (b65e2a1) to head (2758f22).
Report is 42 commits behind head on trunk.

Current head 2758f22 differs from pull request most recent head 82a6ca6

Please upload reports for the commit 82a6ca6 to get more accurate results.

Files Patch % Lines
...ava/org/wordpress/android/ui/ActivityLauncher.java 0.00% 8 Missing ⚠️
...oid/ui/voicetocontent/VoiceToContentActionEvent.kt 0.00% 5 Missing ⚠️
...droid/ui/voicetocontent/VoiceToContentViewModel.kt 50.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk   #20992      +/-   ##
==========================================
- Coverage   40.74%   40.74%   -0.01%     
==========================================
  Files        1528     1529       +1     
  Lines       70194    70201       +7     
  Branches    11612    11613       +1     
==========================================
- Hits        28603    28600       -3     
- Misses      39001    39011      +10     
  Partials     2590     2590              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zwarm zwarm requested a review from irfano June 17, 2024 13:50
Base automatically changed from issue/v2c-show-elapsed-time to trunk June 17, 2024 21:38
Copy link
Member

@irfano irfano left a comment

Choose a reason for hiding this comment

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

  • When I add a self-hosted site without logging in with a WP.com account, I see this screen. You can address this in another PR, but let's not forget to hide the button for self-hosted sites.
  • I am supposed to see "Edit Post" after a successful recording session, right? I can't see it.
record-issue.webm

@zwarm
Copy link
Contributor Author

zwarm commented Jun 18, 2024

@irfano - The edit post is fixed - I caught that and fixed it in a future PR, I added it in 2758f22.
Thanks for the heads up on the self-hosted site. As long as the site has AI credits it can work, but I will double check - this error could be because of a jetpaack-ai-assistant API failure, in which case this is the correct error message (but not formatted pretty :)

@zwarm zwarm requested a review from irfano June 18, 2024 13:12
@zwarm zwarm requested a review from irfano June 19, 2024 11:35
Copy link

sonarcloud bot commented Jun 19, 2024

Copy link
Member

@irfano irfano left a comment

Choose a reason for hiding this comment

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

Thank you for your hard work on this project. LGTM! 👍🏻

@zwarm zwarm enabled auto-merge June 19, 2024 11:56
@zwarm zwarm merged commit 612ec78 into trunk Jun 19, 2024
19 of 20 checks passed
@zwarm zwarm deleted the issue/v2c-launch-edit-post branch June 19, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants