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

Fix pasting float number into datagrid #4335

Merged
merged 6 commits into from
Oct 19, 2023
Merged

Fix pasting float number into datagrid #4335

merged 6 commits into from
Oct 19, 2023

Conversation

poulch
Copy link
Member

@poulch poulch commented Oct 16, 2023

I want to merge this because it fix problem with pasting floating-point price in product variant datagrid

Screenshots

Pull Request Checklist

  1. This code contains UI changes
  2. All visible strings are translated with proper context including data-formatting
  3. Attributes data-test-id are added for new elements
  4. The changes are tested in Chrome/Firefox/Safari browsers and in light/dark mode
  5. Your code works with the latest stable version of the core
  6. I added changesets file (instructions in contribution guide

Test environment config

API_URI=https://automation-dashboard.staging.saleor.cloud/graphql/
APPS_MARKETPLACE_API_URI=https://apps.staging.saleor.io/api/v2/saleor-apps

Do you want to run more stable tests?

To run all tests, just select the stable checkbox. To speed up tests, increase the number of containers. Tests will be re-run only when the "run e2e" label is added.

  1. stable
  2. app
  3. attribute
  4. category
  5. collection
  6. customer
  7. giftCard
  8. homePage
  9. login
  10. menuNavigation
  11. navigation
  12. orders
  13. pages
  14. payments
  15. permissions
  16. plugins
  17. productType
  18. products
  19. sales
  20. shipping
  21. translations
  22. variants
  23. vouchers

CONTAINERS=6

@poulch poulch requested review from a team, andrzejewsky and Droniu October 16, 2023 14:35
@changeset-bot
Copy link

changeset-bot bot commented Oct 16, 2023

🦋 Changeset detected

Latest commit: 27bb5ed

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
saleor-dashboard Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot temporarily deployed to 2882-fix-pasting-price October 16, 2023 14:35 Destroyed
@github-actions github-actions bot temporarily deployed to storybook 2882-fix-pasting-price October 16, 2023 14:35 Destroyed
@github-actions github-actions bot temporarily deployed to 2882-fix-pasting-price October 16, 2023 18:28 Destroyed
@github-actions github-actions bot temporarily deployed to storybook 2882-fix-pasting-price October 16, 2023 18:28 Destroyed
@github-actions github-actions bot temporarily deployed to 2882-fix-pasting-price October 17, 2023 07:48 Destroyed
@github-actions github-actions bot temporarily deployed to storybook 2882-fix-pasting-price October 17, 2023 07:48 Destroyed
@poulch poulch added the run e2e Runs cypress end-to-end tests label Oct 17, 2023
@github-actions github-actions bot temporarily deployed to 2882-fix-pasting-price October 17, 2023 10:39 Destroyed
@github-actions github-actions bot temporarily deployed to storybook 2882-fix-pasting-price October 17, 2023 10:39 Destroyed
@github-actions github-actions bot temporarily deployed to 2882-fix-pasting-price October 18, 2023 14:35 Destroyed
@github-actions github-actions bot temporarily deployed to storybook 2882-fix-pasting-price October 18, 2023 14:35 Destroyed
@github-actions github-actions bot temporarily deployed to 2882-fix-pasting-price October 19, 2023 07:20 Destroyed
@poulch poulch merged commit 3f6dcfa into main Oct 19, 2023
19 of 20 checks passed
@poulch poulch deleted the 2882-fix-pasting-price branch October 19, 2023 07:49
Comment on lines +85 to +88
const testRegExp = data.options?.hasFloatingPoint
? flaotingPointDigits
: onlyDigitsRegExp;
if (!testRegExp.test(value)) {
Copy link
Member

@Cloud11PL Cloud11PL Apr 19, 2024

Choose a reason for hiding this comment

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

Question: It causes copy/paste issues if value is below 10 or doesn't have ".x". hasFloatingPoint is set to true for all number cells. Was there a requirement why this test was made like that?

@poulch poulch restored the 2882-fix-pasting-price branch July 1, 2024 11:27
@poulch poulch deleted the 2882-fix-pasting-price branch July 1, 2024 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run e2e Runs cypress end-to-end tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants