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

Improve issue handlers for Form submissions #2266

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

Soare-Robert-Daniel
Copy link
Contributor

@Soare-Robert-Daniel Soare-Robert-Daniel commented Jul 23, 2024

Closes https://github.com/Codeinwp/otter-internals/issues/176

Summary

  • Improved the error messages when the tester is an admin.
  • Added error log step for warnings.
  • Code refactoring

Screenshots

Erorr displayed with admin details.

image

Issue logged in debug.log

We are dumbing the error along with the requested data:

[23-Jul-2024 07:57:13 UTC] [Otter Blocks][Form Block] Issue: Email could not be send. Might be an error with the service. The function `wp_mail` is not working properly. Please check the email provider settings.| Form data received: {"form_data":{"handler":"submit","payload":{"formInputsData":[{"label":"Form submission from","value":"http:\/\/localhost:10005\/form-block\/","metadata":{"position":"0"}},{"label":"(Field 1) Name","value":"yes","type":"text","id":"wp-block-themeisle-blocks-form-input-d8b68920","metadata":{"version":"1","position":"1","mappedName":""}}],"formOption":"1675009503e227cf028e7b282a731f32510ba3df_35c3d102","formId":"wp-block-themeisle-blocks-form-35c3d102","nonceValue":"5cbc632f7a","antiSpamTime":"166789","antiSpamHoneyPot":"","postUrl":"http:\/\/localhost:10005\/form-block\/","postId":"385"}},"uploaded_files_path":[],"files_loaded_to_media_library":[],"keep_uploaded_files":false,"metadata":[]}

Test instructions


Checklist before the final review

  • Included E2E or unit tests for the changes in this PR.
  • Visual elements are not affected by independent changes.
  • It is at least compatible with the minimum WordPress version.
  • It loads additional script in frontend only if it is required.
  • Does not impact the Core Web Vitals.
  • In case of deprecation, old blocks are safely migrated.
  • It is usable in Widgets and FSE.
  • Copy/Paste is working if the attributes are modified.
  • PR is following the best practices

@Soare-Robert-Daniel Soare-Robert-Daniel self-assigned this Jul 23, 2024
@Soare-Robert-Daniel Soare-Robert-Daniel added the pr-checklist-skip Allow this Pull Request to skip checklist. label Jul 25, 2024
@Soare-Robert-Daniel Soare-Robert-Daniel marked this pull request as ready for review July 25, 2024 07:47
@Soare-Robert-Daniel
Copy link
Contributor Author

@ineagu, is this how you envisioned the logging?

@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label Jul 25, 2024
@pirate-bot
Copy link
Contributor

pirate-bot commented Jul 25, 2024

Bundle Size Diff

Package Old Size New Size Diff
Animations 263.56 KB 263.56 KB 0 B (0.00%)
Blocks 1.51 MB 1.51 MB 0 B (0.00%)
CSS 93.26 KB 93.26 KB 0 B (0.00%)
Dashboard 203.99 KB 203.99 KB 0 B (0.00%)
Onboarding 153.22 KB 153.22 KB 0 B (0.00%)
Export Import 90.28 KB 90.28 KB 0 B (0.00%)
Pro 365.35 KB 365.35 KB 0 B (0.00%)

@pirate-bot
Copy link
Contributor

pirate-bot commented Jul 25, 2024

Plugin build for 1e908b2 is ready 🛎️!

@pirate-bot
Copy link
Contributor

pirate-bot commented Jul 25, 2024

E2E Tests

Playwright Test Status:

Performance Results serverResponse: 236.45, firstPaint: 153.45, domContentLoaded: 1532.45, loaded: 1533.3, firstContentfulPaint: 3473.35, firstBlock: 7566.95, type: 12.58, minType: 11.11, maxType: 16.53, typeContainer: 8.37, minTypeContainer: 7.54, maxTypeContainer: 11.3, focus: 31.49, minFocus: 29.01, maxFocus: 35.13, inserterOpen: 22.1, minInserterOpen: 19.38, maxInserterOpen: 31.83, inserterSearch: 0.7, minInserterSearch: 0.61, maxInserterSearch: 0.82, inserterHover: 3.93, minInserterHover: 3.55, maxInserterHover: 5.34, listViewOpen: 140.95, minListViewOpen: 129.23, maxListViewOpen: 157.59

Copy link
Collaborator

@carlalexander carlalexander left a comment

Choose a reason for hiding this comment

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

No major thing here! I found a typo.

As discussed, let's try to not use the modules with conventional commits. So just use feat:. But otherwise, the message is clear and good 🙌

inc/server/class-form-server.php Outdated Show resolved Hide resolved
@ineagu
Copy link
Contributor

ineagu commented Aug 6, 2024

looks good to me @Soare-Robert-Daniel

@Soare-Robert-Daniel Soare-Robert-Daniel merged commit 8e2aca5 into development Aug 6, 2024
9 checks passed
@Soare-Robert-Daniel Soare-Robert-Daniel deleted the feat/form-logging branch August 6, 2024 14:55
@pirate-bot
Copy link
Contributor

🎉 This PR is included in version 3.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-checklist-complete The Pull Request checklist is complete. (automatic label) pr-checklist-skip Allow this Pull Request to skip checklist. released Indicate that an issue has been resolved and released in a particular version of the product.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants