Skip to content

Conversation

@mdperez86
Copy link
Contributor

All Submissions:

Changes proposed in this Pull Request:

Closes #35558

  • This PR is a very minor change/addition and does not require testing instructions (if checked you can ignore/remove the next section).

How to test the changes in this Pull Request:

  1. Go to Products -> Add New (MVP)
  2. Any price input field should has
  3. Currency unit follows the store's locale
  4. The symbol aligned always left
  5. The symbol color now is gray-700
  6. The value is aligned right
  7. Field formatting respects the store's setting, including thousand and decimal separators
  8. On blur, commas are added when the user enters a value
  9. On focus, we highlight the field's content
  10. On focus, the user can press the up and down arrow keys to increase or decrease the value by 1

Screen.Recording.2022-11-24.at.4.13.59.PM.mov

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you created a changelog file for each project being changed, ie pnpm --filter=<project> changelog add?

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

@mdperez86 mdperez86 self-assigned this Nov 24, 2022
@github-actions github-actions bot added focus: react admin plugin: woocommerce Issues related to the WooCommerce Core plugin. labels Nov 24, 2022
@mdperez86 mdperez86 force-pushed the enhancement/35558 branch 2 times, most recently from 97c9ea4 to bc6b30e Compare November 24, 2022 19:27
@github-actions
Copy link
Contributor

github-actions bot commented Nov 24, 2022

Test Results Summary

Commit SHA: 0c36e0b

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 52s
E2E Tests186006019214m 1s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

@mdperez86 mdperez86 changed the title Enhancement/35558 Fix price field currency symbol position Nov 25, 2022
@AnnaMag AnnaMag self-requested a review November 25, 2022 14:11
AnnaMag
AnnaMag previously approved these changes Nov 25, 2022
Copy link
Contributor

@AnnaMag AnnaMag left a comment

Choose a reason for hiding this comment

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

LGTM :shipit:

Copy link
Contributor

@louwie17 louwie17 left a comment

Choose a reason for hiding this comment

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

LGTM 🚀 Nice work! I did leave one comment about the addition of an empty function.

const amount = Number.parseFloat(
sanitizePrice( values[ name ] || '0' )
);
const step = Number( event.currentTarget.step || '1' );
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

return value === undefined ? value : format( value ).replace( regex, '' );
};

export function stepUp() {}
Copy link
Contributor

Choose a reason for hiding this comment

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

@mdperez86 I assume this can be deleted and was maybe added by accident?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you are right! We don't need this at all. Thanks!!!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Solved -> 0c36e0b

Copy link
Contributor

@louwie17 louwie17 left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix, looks good to me ✔️

Also I guess @AnnaMag had beat me to this PR, sorry for the double review.

@mdperez86
Copy link
Contributor Author

Thanks for the quick fix, looks good to me ✔️

Also I guess @AnnaMag had beat me to this PR, sorry for the double review.

More eyes can always see more!!! So happy to receive feedback from different sources and point of views.

@mdperez86 mdperez86 merged commit 3857b51 into trunk Nov 25, 2022
@mdperez86 mdperez86 deleted the enhancement/35558 branch November 25, 2022 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement]: Fix price field currency symbol position

4 participants