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

Datagrid cell improvements #4091

Merged
merged 45 commits into from
Sep 18, 2023
Merged

Datagrid cell improvements #4091

merged 45 commits into from
Sep 18, 2023

Conversation

Droniu
Copy link
Member

@Droniu Droniu commented Aug 17, 2023

This PR improves UI of various datagrid columns in the dashboard.

AC

  • As a user, when I shrink date column I can see three different formats based on cell width
  • As a user, I should see colorful pills in product type column (on product list)
    • Identical product types should have identical colors
    • Slightly different product types should have completely different colors
    • Contrast should be good in both light & dark mode
    • Pills should work in browsers not supporting oklch (https://caniuse.com/mdn-css_types_color_oklch)
  • As a user I should see colorful pills in order status & payment status columns (on order list)
    • Pill colors should match statuses UX-wise (e.g. fulfilled is green)
  • As a user, I can see currency & price in money cell based on my locale. If cell width is too narrow and currency has a symbol, it is displayed instead of currency code.
  • As a user, I can see voucher value in voucher list. Percentage-based voucher display percent symbol next to value, whereas currency-based voucher display value in money cells.
  • As a user, I can cell with a status dot in availability column on product list
    • Green dot is displayed when product is available in at least 1 channel and red dot otherwise
    • If channel filter is active - green, red and blue dots are displayed depending on product status in the particular channel. Blue means product is scheduled to publish

Screenshots

image image

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 Aug 17, 2023

🦋 Changeset detected

Latest commit: 33ee178

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 datagrid-cell-improvements August 17, 2023 13:04 Inactive
@github-actions github-actions bot temporarily deployed to storybook datagrid-cell-improvements August 17, 2023 13:04 Inactive
@github-actions github-actions bot temporarily deployed to datagrid-cell-improvements August 17, 2023 13:07 Inactive
@github-actions github-actions bot temporarily deployed to storybook datagrid-cell-improvements August 17, 2023 13:07 Inactive
@github-actions github-actions bot temporarily deployed to datagrid-cell-improvements August 23, 2023 08:53 Inactive
@github-actions github-actions bot temporarily deployed to storybook datagrid-cell-improvements August 23, 2023 08:53 Inactive
@github-actions github-actions bot temporarily deployed to datagrid-cell-improvements September 8, 2023 12:18 Destroyed
@github-actions github-actions bot temporarily deployed to storybook datagrid-cell-improvements September 8, 2023 12:18 Destroyed
@wojteknowacki
Copy link
Member

Based on AC scheduled to publish dot should have yellow color
Zrzut ekranu 2023-09-11 o 09 53 19

@wojteknowacki
Copy link
Member

Changing locale ( language in account settings ) crashes when moving further to orders list view

Nagranie.z.ekranu.2023-09-11.o.10.23.10.mov

@Droniu
Copy link
Member Author

Droniu commented Sep 12, 2023

Regarding yellow dot, I have updated AC and changed it to blue. We don't have yellow warning token in macaw right now and writing special workaround for this is not worth it because these tokens are going to get reworked soon.

@github-actions github-actions bot temporarily deployed to datagrid-cell-improvements September 12, 2023 13:47 Destroyed
@github-actions github-actions bot temporarily deployed to storybook datagrid-cell-improvements September 12, 2023 13:47 Destroyed
@Droniu Droniu requested a review from poulch September 12, 2023 13:57
poulch
poulch previously approved these changes Sep 13, 2023
@github-actions github-actions bot temporarily deployed to datagrid-cell-improvements September 15, 2023 11:25 Destroyed
@github-actions github-actions bot temporarily deployed to storybook datagrid-cell-improvements September 15, 2023 11:25 Destroyed
@Droniu Droniu requested a review from poulch September 15, 2023 11:25
@wojteknowacki wojteknowacki added the run e2e Runs cypress end-to-end tests label Sep 18, 2023
@wojteknowacki wojteknowacki self-requested a review September 18, 2023 09:55
@Droniu Droniu merged commit 2055b25 into main Sep 18, 2023
@Droniu Droniu deleted the datagrid-cell-improvements branch September 18, 2023 09:56
@Droniu Droniu added this to the Saleor 3.16 milestone Sep 18, 2023
Droniu added a commit that referenced this pull request Sep 19, 2023
* 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>
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
run e2e Runs cypress end-to-end tests
Projects
Status: ✅ Done
Status: Shipped 🚚
Development

Successfully merging this pull request may close these issues.

5 participants