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

add_voucher_used-info#3972 #4161

Merged
merged 2 commits into from
Sep 19, 2023

Conversation

itsjainrishi
Copy link
Contributor

@itsjainrishi itsjainrishi commented Sep 4, 2023

closes #3972

Screenshots

Before
before

After
after

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://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=2

@changeset-bot
Copy link

changeset-bot bot commented Sep 4, 2023

⚠️ No Changeset found

Latest commit: e40e6de

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@CLAassistant
Copy link

CLAassistant commented Sep 4, 2023

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

/>
</Typography>
<Typography>
{maybe<React.ReactNode>(() => voucher.used, <Skeleton />)}
Copy link
Member

Choose a reason for hiding this comment

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

suggestion: We avoid using maybe, instead try something like this:

Suggested change
{maybe<React.ReactNode>(() => voucher.used, <Skeleton />)}
{ voucher?.used ?? <Skeleton />

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have made the suggested change.

Note: Maybe has been used multiple times in the code before. If you look at Voucher Summary file, I made changes to you will find other instances of maybe.

Copy link
Member

Choose a reason for hiding this comment

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

We are aware of it - maybe was used in the codebase when optional chaining (?.) was not yet supported by javascript. We are progressively dropping it.

@andrzejewsky andrzejewsky merged commit d4e3052 into saleor:main Sep 19, 2023
13 checks passed
Droniu pushed a commit that referenced this pull request Sep 19, 2023
* add_voucher_used-info#3972

* suggested-update_voucher-used
Droniu added a commit that referenced this pull request Sep 21, 2023
* Strict TS adjustments

* Add datagrid to shipping zones list

* Support for bulk delete

* Extract messages

* Add changeset

* Cleanup

* Fix stories & fixtures

* Fix freeze columns

* Replace params.ids with selectedRowIds

* Implement search & relocate bulk delete button

* Unify margins

* Move default weight unit form to TopNav.Menu

* Add weight configuration modal

* Fix type issue

* Add messages

* Fix strict mode

* Simplify modal closing

* Disable dialog when incorrect unit is selected

* Move outside render

* Disable pricerange column

* e2e fixes

* Replace combobox with select

* shipping method test - remove wait for skeleton

* Update macaw-ui

* Skip cypress cloud when running e2e tests (#4162)

* wip 
* cr fixes

---------

Co-authored-by: Paweł Chyła <pawel.chyla@saleor.io>

* Update vite sentry library and handle legacy uploading (#4169)

* Handle legacy sentry

* Changeset

* Increate memory for vite sourcemaps (sentry) (#4173)

* Increate memory for vite sourcemaps (sentry)

* Changeset

* Remove legacy sentry

* Use sentry cli (#4175)

* use sentry cli

* use sentry cli

* use sentry cli

* Fix rendering of top products on home, when attributes does not have value (#4172)

* Fix top product on home

* Fix top product on home

* Changeset

* Fix attribute creation when we change input type (#4177)

* Fix attribute creation

* Fix attribute creation

* Fix layouts for translation edition pages (#4178)

* Fix translation pages

* Fix translation pages

* Update changesets based deployments (#4167)

* 3.15.3 release cleanup (#4180)

* Fix address form keeps country state from prev address provided (#4188)

* Fixes Dashboard crash on quick-menu escape (#4166)

* crash-fix#3933

* Update changesets based deployments

* Added sk translation (#4144)

* Added sk translation

* add changeset for SK translation

---------

Co-authored-by: Ladislav Hano <524934@mail.muni.cz>

* Migrate product page to new macaw (#4125)

Co-authored-by: timur <timuric@gmail.com>

* Dashboard modal (#4198)

* Datagrid cell improvements (#4091)

* Implement status cell

* Add auto tags cell

* Tighten types

* Redesign money cell

* Add light text color

* Add custom date cell

* Add color difference

* Remove moment

* Make font bolder

* Add range price

* Switch to new date cell

* Made font heavier

* Make image bigger

* Use tag cells

* Fixed lint errors

* Add percentage display

* Fix type errors

* Add safety check

* Add safety check

* Remove duplicate

* Enable darkmode support

* Fix linter issue

* Refactor date cell

* Refactor money cell

* Rename AutoTags cell to PillCell

* TS cleanup

* Add changeset

* Fix strict mode

* Strict TS fixes

* Tune dark mode colors

* Add fallback for oklch

* Fix date cell

* Fix tests after oklch fallback is added

* Add type - strict mode fix

* Reading channel

* Conditionally set selected channel based on feature flag

* Fix currency crash

* Obtain channel

* Cleanup

* Fix test

* Validate date cell

* Fix passing incorrect date in order list

* Fix invisible dates

* Make default width of date column larger on product and order views

---------

Co-authored-by: timur <timuric@gmail.com>
Co-authored-by: andrzejewsky <vox3r69@gmail.com>

* Update release workflow (#4187)

* Update relase workflow

* Workflow update

* Changesets

* Ubuntu version

* Aws actions update

* Add triage status (#4200)

* Bug triage

* Bug triage

* Triage status

* Bump @adobe/css-tools from 4.0.1 to 4.3.1 (#4145)

Bumps [@adobe/css-tools](https://github.com/adobe/css-tools) from 4.0.1 to 4.3.1.
- [Changelog](https://github.com/adobe/css-tools/blob/main/History.md)
- [Commits](https://github.com/adobe/css-tools/commits)

---
updated-dependencies:
- dependency-name: "@adobe/css-tools"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fixed inconsistent capitalization on translation page (#4160)

* add_voucher_used-info#3972 (#4161)

* add_voucher_used-info#3972

* suggested-update_voucher-used

* Epics template (#4202)

* Add epic template

* Add epic template

* Add epic template

* Improve text

* Fix external app crashing (#4205)

* Fix external app crashing

* Fix external app crashing

* Bump tough-cookie and @cypress/request (#4069)

* Bump tough-cookie and @cypress/request

Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) and [@cypress/request](https://github.com/cypress-io/request). These dependencies needed to be updated together.

Updates `tough-cookie` from 2.5.0 to 4.1.3
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](salesforce/tough-cookie@v2.5.0...v4.1.3)

Updates `@cypress/request` from 2.88.11 to 2.88.12
- [Release notes](https://github.com/cypress-io/request/releases)
- [Changelog](https://github.com/cypress-io/request/blob/master/CHANGELOG.md)
- [Commits](cypress-io/request@v2.88.11...v2.88.12)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
- dependency-name: "@cypress/request"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Trigger CI

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: andrzejewsky <vox3r69@gmail.com>

* Fix prepare release workflow dependency (#4207)

* Fix workflow

* Fix workflow

* Handle null

* Refactor modal

* Change as to satisfies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: wojteknowacki <wojciech.nowacki@saleor.io>
Co-authored-by: wojteknowacki <124166231+wojteknowacki@users.noreply.github.com>
Co-authored-by: Paweł Chyła <pawel.chyla@saleor.io>
Co-authored-by: Patryk Andrzejewski <vox3r69@gmail.com>
Co-authored-by: Krzysztof Żuraw <9116238+krzysztofzuraw@users.noreply.github.com>
Co-authored-by: Paweł Chyła <chyla1988@gmail.com>
Co-authored-by: Rishi Jain <itsjainrishi@users.noreply.github.com>
Co-authored-by: Djkáťo <radovan.katrencik@gmail.com>
Co-authored-by: Ladislav Hano <524934@mail.muni.cz>
Co-authored-by: timur <timuric@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tushar Rathore <tushh.r1212@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add used info to voucher screen
6 participants