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

[Custom Fields] Support for copying key and value #12579

Merged
merged 3 commits into from
Sep 16, 2024

Conversation

hichamboushaba
Copy link
Member

@hichamboushaba hichamboushaba commented Sep 11, 2024

Closes: #12578

Description

This PR adds two menu entries to the overflow menu to allow copying either the key or the value of the custom field.

Steps to reproduce

  1. Make sure an order has at least one custom field.
  2. Open the order in the app.
  3. Tap on "View custom fields"
  4. Add or edit a new custom field.
  5. Tap on the overflow menu.

Testing information

Test copying the key and the value

  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on big (tablet) and small (phone) in case of UI changes, and no regressions are added.

@hichamboushaba hichamboushaba added type: enhancement A request for an enhancement. feature: order details Related to order details. labels Sep 11, 2024
@hichamboushaba hichamboushaba changed the base branch from trunk to issue/12563-delete-custom-fields September 11, 2024 10:08
@wpmobilebot
Copy link
Collaborator

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit4be88f0
Direct Downloadwoocommerce-wear-prototype-build-pr12579-4be88f0.apk

@wpmobilebot
Copy link
Collaborator

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit4be88f0
Direct Downloadwoocommerce-prototype-build-pr12579-4be88f0.apk

@codecov-commenter
Copy link

codecov-commenter commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 40.64%. Comparing base (15dbfa7) to head (4be88f0).
Report is 221 commits behind head on trunk.

Additional details and impacted files
@@            Coverage Diff            @@
##              trunk   #12579   +/-   ##
=========================================
  Coverage     40.63%   40.64%           
- Complexity     5668     5670    +2     
=========================================
  Files          1228     1228           
  Lines         68930    68938    +8     
  Branches       9547     9547           
=========================================
+ Hits          28011    28019    +8     
  Misses        38345    38345           
  Partials       2574     2574           

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

Comment on lines +73 to +74
R.string.custom_fields_editor_copy_key,
R.string.custom_fields_editor_copy_value,
Copy link
Member Author

Choose a reason for hiding this comment

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

These entries will be shown even when the key or value are empty, I thought about hiding them when they are, but I didn't implement it because I think it'll complicate the logic for not much added value, WDYT?

@hichamboushaba hichamboushaba marked this pull request as ready for review September 11, 2024 15:39
@hichamboushaba hichamboushaba added the status: do not merge Dependent on another PR, ready for review but not ready for merge. label Sep 12, 2024
Base automatically changed from issue/12563-delete-custom-fields to trunk September 12, 2024 18:42
@JorgeMucientes JorgeMucientes self-assigned this Sep 13, 2024
@hichamboushaba hichamboushaba removed status: do not merge Dependent on another PR, ready for review but not ready for merge. labels Sep 16, 2024
Copy link
Contributor

@JorgeMucientes JorgeMucientes left a comment

Choose a reason for hiding this comment

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

Works as expected and code looks good. :shipit:

@JorgeMucientes JorgeMucientes added this to the 20.5 milestone Sep 16, 2024
@JorgeMucientes JorgeMucientes merged commit d1eb9ed into trunk Sep 16, 2024
19 of 20 checks passed
@JorgeMucientes JorgeMucientes deleted the issue/12578-copy-field branch September 16, 2024 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: order details Related to order details. type: enhancement A request for an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Custom Fields] Add menu buttons to copy key or value
4 participants