No description
Find a file
Michał Droń 66bab6feab
🏛️ Implement new column picker (#3514)
* (wip) basic column picker implementation

* (wip) fix stories error

* (wip) fix custom column cells & sorting

* (wip) Group attributes query values in props

* (wip) Add docs

* (wip) fix story error

* Implement new column picker in order list

* Fix search input padding

* Fix empty settings crash

* Fix empty settings crash

* Portalize popover

* Preselect category when there is only one

* Remove legacy code

* Move product column adapters to proper directory

* Improve file structure

* Rename custom columns to dynamic columns

* Improve strings

* (wip) Implement pagination logic

* Beautify pagination

* Update macaw-ui

* Add unit test for useColumns

* Improve naming

* Code review style fixes

* Update docs

* Remove empty column

* Remove unexpected padding from attribute columns

* Add min height to prevent jumping

* Fix typo in column picker files

* CSS fixes to popover content

* Implement auto-scroll to new column

* Improve docs

* Improve type in useColumns reducer

* Extract dynamic columns from NewColumnPicker as a smaller component

* Disable movement of empty column

* Fix circular loader

* Do not persist expanded state when closing picker

* Fix dynamic columns with long names line break

* Prevent user from disabling all static columns

* Simplify dynamic column reducer into flatMap

* Optimistic UIbasic implementation

* Make available attributes query lazy

* Fix displaying arrow next to sorted column

* Add explainatory comment

* Fix product list stories

* Fix dynamic columns and query handling for empty lists

* Remove jump on first attribute selection

* Remove jump on first attribute selection

* Fix search

* Add debounce to search

* CR - base state change on previous in popover

* Extract search into separate component

* Rename useDynamicColumnSettings to useColumnPickerSettings

* Use difference from lodash

* Improve static column rendering

* Improve order list

* Fix stories error

* Improve search for edge cases

* Extract messages

* Calculate more complex dynamic column adapter parameters in separate functions

* Fix url pointing to CardMenu substitute

* Extract nodes to separate component

* Move files, remove New prefix

* Extract to static columns

* Refactor utility functions

* Render column picker categories only when provided in props

* Replace switch with if statements

* Refactor to hooks

* Remove comments with legacy stacing

* Add spaces for better readibility

* Tighten types

* Add space

* Add extra comments to useColumns optimistic update logic

* Fix paddings

* Add arbitrary min/max height for handling various resolutions

* Add full-width hover & click effect on candidate columns labels

* Handle long attribute names

* Make column picker popover a modal

* Bump macaw-ui

* Fix macaw-ui type mismatch

* Update types

* Add data-test-id

* Fix closing picker with trigger button

* Replace list settings deep merging with shallow merging

* Fix list settings deep merging behaviour for arrays

* Replace conditional data-test-id- with close-search

* Rename targetArray to columnsToCheck

* Rename filterColumns to filterSelectedColumns

* Rename gridAttributes query objects to more descriptive

* Add explainatory comment to customizer function in useListSettings

* Update strictness

* Fix rendering dynamic columns
2023-06-26 11:36:01 +02:00
.changeset Update PR template with changeset (#3797) 2023-06-23 14:59:29 +02:00
.github Update PR template with changeset (#3797) 2023-06-23 14:59:29 +02:00
.husky Run tests on push to origin (#2791) 2022-12-12 11:22:39 +01:00
.storybook Strict mode plugin (#3778) 2023-06-21 11:28:00 +02:00
.tx Update translations (#1965) 2022-04-05 09:33:48 +02:00
assets Setup chromatic and cleanup storybook (#3588) 2023-05-12 13:06:27 +02:00
cypress fixed flaky draft order and products without sku tests (#3795) 2023-06-23 14:51:59 +02:00
docs Appstore improvements for non-cloud dashboard (#3258) 2023-03-03 08:51:35 +01:00
lint/rules Add rule fixer 2019-12-03 16:23:42 +01:00
locale 🏛️ Implement new column picker (#3514) 2023-06-26 11:36:01 +02:00
nginx Update Dockerfile (#2523) 2022-11-16 16:01:34 +01:00
scripts Add changesets (#3786) 2023-06-23 10:26:02 +02:00
src 🏛️ Implement new column picker (#3514) 2023-06-26 11:36:01 +02:00
testUtils Strict mode plugin (#3778) 2023-06-21 11:28:00 +02:00
.codeclimate.yml Initial commit 2019-06-19 16:40:52 +02:00
.dependency-cruiser.js Dependency testing (#3284) 2023-04-06 12:29:24 +02:00
.dockerignore Clean up storybook (#2941) 2023-01-05 13:34:34 +01:00
.env.template Appstore improvements for non-cloud dashboard (#3258) 2023-03-03 08:51:35 +01:00
.eslintrc.json Clean up storybook (#2941) 2023-01-05 13:34:34 +01:00
.gitattributes Set proper line endings for windows (#2665) 2022-11-25 10:25:04 +01:00
.gitignore Add changesets (#3786) 2023-06-23 10:26:02 +02:00
.npmrc Upgrade node to 18 (#2533) 2022-11-15 15:41:46 +01:00
.nvmrc Upgrade node to 18 (#2533) 2022-11-15 15:41:46 +01:00
.prettierignore Add GraphiQL for defining subscription queries for webhooks (#2885) 2023-01-24 14:59:14 +01:00
.prettierrc Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
_redirects Enable Netlify redirects 2019-11-14 13:01:45 +01:00
apollo.config.js Update apollo config 2019-08-21 15:26:24 +02:00
app.json Update app.json (#2307) 2022-12-13 13:09:37 +01:00
babel.config.js Use esbuild-loader (#1983) 2022-05-05 09:54:28 +02:00
CHANGELOG.md Add changesets (#3786) 2023-06-23 10:26:02 +02:00
CODEOWNERS Add codeowners (#3265) 2023-03-03 09:27:26 +01:00
csstypes.d.ts Update React to 17 and related packages (#2370) 2022-10-24 11:49:11 +02:00
cypress.config.js Run tests on multiple browsers (#3635) 2023-05-18 11:42:12 +02:00
Dockerfile Allow docker to read introspection files (#3365) 2023-03-16 14:02:42 +01:00
eslint-local-rules.js Add local eslint rule to enforce naming styles 2019-12-03 16:09:57 +01:00
fetch-schema.yml Use schema-ast plugin to generate the graphql schema (#2538) 2023-03-14 08:48:33 +01:00
introspection.json Update Saleor schema to 3.14 (#3751) 2023-06-13 13:33:46 +02:00
LICENSE Update LICENSE 2021-06-28 15:57:24 +02:00
lighthouserc.json Add circleci config and enhance our linters (#519) 2020-05-14 11:30:32 +02:00
lws.config.js merge changes 2021-02-11 15:17:00 +01:00
package-lock.json 🏛️ Implement new column picker (#3514) 2023-06-26 11:36:01 +02:00
package.json 🏛️ Implement new column picker (#3514) 2023-06-26 11:36:01 +02:00
react-intl.d.ts Attach permission variables to all queries (#1000) 2021-03-09 09:44:09 +01:00
README.md Refresh README.md (#2768) 2022-12-06 15:23:04 +01:00
schema.graphql Update Saleor schema to 3.14 (#3751) 2023-06-13 13:33:46 +02:00
static.json Configure Heroku integration 2019-09-22 14:30:10 +02:00
sw.js Fix service worker (#2760) 2022-12-01 11:55:46 +01:00
tsconfig.json Strict mode plugin (#3778) 2023-06-21 11:28:00 +02:00
types.d.ts Remove legacy Marketplace code and env variables that it was using (#3342) 2023-03-14 12:17:19 +01:00
vite.config.js Setup chromatic and cleanup storybook (#3588) 2023-05-12 13:06:27 +02:00

Saleor Dashboard

Saleor Dashboard

A GraphQL-powered, single-page dashboard application for Saleor.

Prerequisites

  • Node.js v18+
  • A running instance of Saleor

Development

  1. Clone the repository:
git clone https://github.com/saleor/saleor-dashboard.git
  1. Enter the project directory:
cd saleor-dashboard
  1. Install the dependencies:
npm i
  1. Configure the env vars as described in docs/configuration.md.

  2. Start the development server with:

npm run dev

Note: If you see CORS errors, check CORS configuration of your Saleor instance or CORS settings in the Cloud Console.

Docs