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

Feedback form temporary files #21133

Merged
merged 3 commits into from
Aug 21, 2024
Merged

Feedback form temporary files #21133

merged 3 commits into from
Aug 21, 2024

Conversation

nbradbury
Copy link
Contributor

@nbradbury nbradbury commented Aug 20, 2024

Fixes #21132

When I coded the feedback form, I neglected to delete the temporary files created when uploading attachments. This PR corrects this oversight. Also, previously the temporary files were being created as soon as an attachment was added, but now they're created as part of the upload process.

To test, simply verify that uploading attachments from the feedback form still works as expected, and be sure to close any tickets by visiting https://a8c.zendesk.com/agent/tickets/[TICKET-NUMBER].

Note: The SonarCloud warning about the "delete" function can be ignored.

@dangermattic
Copy link
Collaborator

1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@wpmobilebot
Copy link
Contributor

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
Versionpr21133-2be3b96
Commit2be3b96
Direct Downloadjetpack-prototype-build-pr21133-2be3b96.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

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
Versionpr21133-2be3b96
Commit2be3b96
Direct Downloadwordpress-prototype-build-pr21133-2be3b96.apk
Note: Google Login is not supported on these builds.

Copy link

codecov bot commented Aug 20, 2024

Codecov Report

Attention: Patch coverage is 0% with 27 lines in your changes missing coverage. Please review.

Project coverage is 40.56%. Comparing base (7475ff9) to head (2be3b96).
Report is 6 commits behind head on trunk.

Files Patch % Lines
...roid/ui/main/feedbackform/FeedbackFormViewModel.kt 0.00% 27 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk   #21133      +/-   ##
==========================================
- Coverage   40.57%   40.56%   -0.01%     
==========================================
  Files        1535     1535              
  Lines       70505    70516      +11     
  Branches    11659    11662       +3     
==========================================
  Hits        28607    28607              
- Misses      39313    39324      +11     
  Partials     2585     2585              

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

@nbradbury nbradbury marked this pull request as ready for review August 20, 2024 15:16
@nbradbury nbradbury requested a review from dcalhoun August 20, 2024 15:19
Copy link
Member

@dcalhoun dcalhoun left a comment

Choose a reason for hiding this comment

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

The feedback flow worked as expected for me. However, I noted that I encountered the previously reported issue where video files selected from the "Browse" option do not create a preview thumbnail.

@nbradbury
Copy link
Contributor Author

nbradbury commented Aug 21, 2024

I noted that I encountered the previously reported issue where video files selected from the "Browse" option do not create a preview thumbnail.

@dcalhoun Thank you for the review! I'm surprised about the preview issue since the preview relies on the Coil library. I'm not able to reproduce this, and I don't think it's a serious issue, but I'm wondering if there's anything in the log that indicates what the problem is?

@dcalhoun
Copy link
Member

dcalhoun commented Aug 21, 2024

[...] I'm wondering if there's anything in the log that indicates what the problem is?

One item that stands out to me from "Browse" is the following:

Unable to decode stream: java.io.FileNotFoundException: /data/user/0/com.jetpack.android.prealpha/cache/Screen_Recording_20240821_103514_One%20UI%20Home-4.mp4: open failed: ENOENT (No such file or directory)

The "Choose media" approach has a similar error log, even though it successfully creates a preview thumbnail:

Unable to decode stream: java.io.FileNotFoundException: /storage/emulated/0/DCIM/Screen%20recordings/Screen_Recording_20240821_103514_One%20UI%20Home.mp4: open failed: ENOENT (No such file or directory)

For context, this is a Samsung Galaxy S20 FE running Android 13. Selecting a photo within Google Drive via "Browse" successfully creates a preview thumbnail; selecting a video does not.

@nbradbury nbradbury merged commit 7e6271e into trunk Aug 21, 2024
19 of 20 checks passed
@nbradbury nbradbury deleted the issue/feedback-form-tempfiles branch August 21, 2024 15:04
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.

Feedback form: delete temporary files
4 participants