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

Voucher codes component #4195

Merged
merged 75 commits into from
Oct 12, 2023
Merged

Voucher codes component #4195

merged 75 commits into from
Oct 12, 2023

Conversation

poulch
Copy link
Member

@poulch poulch commented Sep 15, 2023

Voucher codes component with generating and paginating voucher codes on the client side hidden behind a feature flag.
Run this code in browser console to set the enable feature flag

localStorage.setItem('FF_voucher_codes', '{"enabled":true,"payload":"default"}')

AC:

  • As user I should see voucher codes only when feature flag is enable
  • As user I should be able to generate voucher codes manually by providing my own voucher code
  • As user I should be able to generate voucher codes automatically by providing quantity and prefix
  • As use I should be able to paginate voucher codes
  • Voucher codes are client only and will not be saved in API

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 and read good practices

Test environment config

API_URI=https://master.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

@changeset-bot
Copy link

changeset-bot bot commented Sep 15, 2023

🦋 Changeset detected

Latest commit: 2058447

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 Minor

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 4182-voucher-codes-datagrid September 15, 2023 09:01 Destroyed
@github-actions github-actions bot temporarily deployed to storybook 4182-voucher-codes-datagrid September 15, 2023 09:01 Destroyed
@github-actions github-actions bot temporarily deployed to 4182-voucher-codes-datagrid September 15, 2023 09:18 Destroyed
@github-actions github-actions bot temporarily deployed to storybook 4182-voucher-codes-datagrid September 15, 2023 09:18 Destroyed
@github-actions github-actions bot temporarily deployed to 4182-voucher-codes-datagrid September 19, 2023 07:40 Destroyed
@github-actions github-actions bot temporarily deployed to storybook 4182-voucher-codes-datagrid September 19, 2023 07:40 Destroyed
@github-actions github-actions bot temporarily deployed to 4182-voucher-codes-datagrid September 20, 2023 13:30 Destroyed
@github-actions github-actions bot temporarily deployed to storybook 4182-voucher-codes-datagrid September 20, 2023 13:30 Destroyed
@github-actions github-actions bot temporarily deployed to 4182-voucher-codes-datagrid September 20, 2023 21:52 Destroyed
@github-actions github-actions bot temporarily deployed to storybook 4182-voucher-codes-datagrid September 20, 2023 21:52 Destroyed
@github-actions github-actions bot temporarily deployed to storybook 4182-voucher-codes-datagrid October 10, 2023 18:45 Destroyed
@poulch poulch changed the title Voucher codes Voucher codes component Oct 10, 2023
@github-actions github-actions bot temporarily deployed to 4182-voucher-codes-datagrid October 10, 2023 18:54 Destroyed
@github-actions github-actions bot temporarily deployed to storybook 4182-voucher-codes-datagrid October 10, 2023 18:54 Destroyed
@poulch poulch marked this pull request as ready for review October 10, 2023 18:57
@poulch poulch requested review from a team, andrzejewsky and Droniu October 10, 2023 18:57
@github-actions github-actions bot temporarily deployed to 4182-voucher-codes-datagrid October 10, 2023 19:13 Destroyed
@github-actions github-actions bot temporarily deployed to storybook 4182-voucher-codes-datagrid October 10, 2023 19:13 Destroyed
@github-actions github-actions bot temporarily deployed to 4182-voucher-codes-datagrid October 12, 2023 11:17 Destroyed
@github-actions github-actions bot temporarily deployed to storybook 4182-voucher-codes-datagrid October 12, 2023 11:17 Destroyed
@poulch poulch requested a review from Droniu October 12, 2023 11:20
@github-actions github-actions bot temporarily deployed to 4182-voucher-codes-datagrid October 12, 2023 12:35 Destroyed
@poulch poulch added the run e2e Runs cypress end-to-end tests label Oct 12, 2023
@@ -86,7 +76,7 @@ export const VoucherCodesGenerateDialog = ({
label={intl.formatMessage(messages.codeQuantity, {
maxCodes: MAX_VOUCHER_CODES,
})}
onKeyDown={handleKeyDown}
// onKeyDown={handleKeyDown}
Copy link
Member

Choose a reason for hiding this comment

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

nitpick: can be deleted

@poulch poulch merged commit e090f17 into main Oct 12, 2023
35 of 36 checks passed
@poulch poulch deleted the 4182-voucher-codes-datagrid branch October 12, 2023 18:05
@andrzejewsky andrzejewsky modified the milestone: Saleor 3.18 Oct 30, 2023
@poulch poulch restored the 4182-voucher-codes-datagrid branch July 1, 2024 11:27
@poulch poulch deleted the 4182-voucher-codes-datagrid branch July 1, 2024 11:32
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
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants