Commit graph

241 commits

Author SHA1 Message Date
Krzysztof Żuraw
ab268dec0b
Use MacawUI that supports node 18 (#2684) 2022-11-25 11:08:24 +01:00
Patryk Andrzejewski
9ef4d4c6ee
Revert "Introduce vite (#2580)" (#2676)
This reverts commit 9de945d61a.
2022-11-24 16:24:04 +01:00
Patryk Andrzejewski
9de945d61a
Introduce vite (#2580)
* Vite, remove webpack

* Clean deps

* Fix apollo types

* Fix types

* CI

* Fix types

* Fix types

* Keep required deps for storybook

* Rename build dir

* Sentry config, fix react-virtualized issue

* Set NODE_OPTIONS

* Fast-refresh rule for eslint

* Update deps

* Update deps

* Update deps

* Remove webpack

* Add sw

* Update dockerfile

* Update dockerfile

* Update readme, dev port
2022-11-24 15:24:08 +01:00
Wojciech Mista
9574e6a92c
Macaw UI update (#2512)
Co-authored-by: andrzejewsky <vox3r69@gmail.com>
Co-authored-by: timur <timuric@gmail.com>
Co-authored-by: Krzysztof Żuraw <9116238+krzysztofzuraw@users.noreply.github.com>
2022-11-24 13:16:51 +01:00
Lukasz Ostrowski
1fa9213871
Add support for synchronizing App's routing with Dashboard path (#2551)
* Add draft redirection fix

* Update SDK
2022-11-22 10:29:29 +01:00
Krzysztof Żuraw
3247131570
Use cross-env to pass env vars (#2610) 2022-11-21 11:52:35 +01:00
Krzysztof Żuraw
5bd79d9692
Upgrade node to 18 (#2533)
Co-authored-by: Karolina Rakoczy <karolina.rakoczy@saleor.io>
2022-11-15 15:41:46 +01:00
Michał Droń
dc5a6ac76b
Update Typescript (#2494)
* Update TypeScript

* Fix recursive typing in navigation

* Fix linter issue

* Update lockfile
2022-11-03 11:43:44 +01:00
Patryk Andrzejewski
802524744b
Set different version of macaw (#2501)
* Set different version of macaw

* Spanshots
2022-10-28 11:29:07 +02:00
Michał Droń
513b39ae5f
Bump version to 3.9.0-dev (#2491)
* Bump package.json version to 3.9.0-dev

* Update lockfile
2022-10-28 09:48:43 +02:00
Patryk Andrzejewski
992aa64937
Update Macaw-UI (#2495)
* Update Macaw-UI

* Update snapshots
2022-10-27 17:52:13 +02:00
Patryk Andrzejewski
c009f07581
DataGrid full-screen mode (#2453)
* full screen mode

* add product title, review

* update snapshots

* Update messages
2022-10-27 17:26:09 +02:00
Michał Droń
96650bb237
Update macaw to 0.6.6 (#2459)
* Update macaw-ui

* Update snapshots

* Change caret to tilde
2022-10-27 14:02:51 +02:00
Dawid
d66083d38a
Update @testing-library/react (#2390) 2022-10-25 14:05:06 +02:00
Dawid
158188002a
Update React to 17 and related packages (#2370)
* Update React to 17

* Update types for React 17

* Update references in useEffect cleanup functions

* Update react-error-boundary

* Update react-inlinesvg

* Update Apollo Client and Upload Link

* Update apollo-upload-client types

* Fix comment about csstypes

* Downgrade apollo-client version due to log-in bug

* Add missing apollo link

* Update package-lock version

* Fix button type

* Fix datagrid test after react update

* Fix polish language letter bug
2022-10-24 11:49:11 +02:00
Dominik Żegleń
6f10c32176
Bump version to 3.8.0-dev (#2308) 2022-10-19 10:40:07 +02:00
Dominik Żegleń
31e0c11fea
New datagrid view for product variant management (#2162)
* New datagrid view for product variant management (#2040)

* Split simple and product with variants updates

* Simplify code

* Change selectedVariantsIds to availableVariants

selectedVariantsIds suggested that these variants *were just* selected

* Add datagrid component

Add datagrid component

Add actions column

Add column picker

Add ts-ignore comment

Remove unused import

Fix after rebase

Add story

Fix column picking

Fix column dragging

Add column resizing

Extract components to own files

Apply styles from class

Improve data storage

Extract state to hook

Expose handlers

Fix styles

Fix header overflow

Add select all option

Add cell types

Fix types

Add number type cell

Add min to stocks

Fix types

Generate columns from shop data

Add number type editor

Fix tests

Update src/components/Datagrid/Datagrid.tsx

Co-authored-by: Jonatan Witoszek <jonatanwitoszek@gmail.com>

Reconstruct data after column toggling

Minor fixes

Add missing id

Remove unused import

Fix container width

Keep changes in state

Drop onChange usage

Use glide datagrid

* Add column picker

* Memoize callbacks

* Add right toolbar

* Make toolbar as prop

* Clean up code

* Fix styling

* Lint files

* Save variant data in datagrid (#2161)

* Allow rows to be deleted

* Add row adding

* Clean up code

* Improve mutations

* Add stock saving

* Add sku and attribute saving

* Display notification after all mutations

* Fix types

* Save channels in datagrid (#2197)

* wip

* Merge simple and variantable handlers

* Move channel setting to form

* Link availability card to form

* Extract listing management to hook

* Update only touched channels

* Improve channel listing managemend

* Display channel data in datagrid

* Save variant channels

* Save changes in channel listings

* Group columns

* Fix types

* Display touched fields

* Return errors from hook

* Display errors in cells

* Improve naming

* Improve naming

* Use reliable called/loading state

* Update src/components/Datagrid/cells.ts

Co-authored-by: Michał Droń <dron.official@yahoo.com>

* Apply fixes from review

Co-authored-by: Michał Droń <dron.official@yahoo.com>

* Fix type error

* Trigger CI

* Trigger CI

* Save added and deleted variants (#2237)

* Save new variants

* Update channel data

* Remove bulk variant delete dialog

* Do not fetch products from api after save

* Extract types

* Reset errors after api response

* Display error when creating variants

* Fix variant reordering

* Remove commented code

* Fix imports

* Edit attributes in datagrid (#2305)

* Add basic dropdown cell

* Fix clickaway

* Add choice customization

* Add callback to fetch choices

* Add attriute value search

* wip

* Pass getSuggestions cb using props

* Fix row adding

* Fix choice creation

* Add styles to datagrid (#2315)

* Improve cell styling

* Prevent navigation when scrolling horizontally

* Fix text editor styles

* Remove unused variable

* Update whole row after editing cell

* Translate column names

* Improve empty message

* Highlight newly created rows

* Add name editing

* Add disabled context menu to added rows

* Add column groups

* Translate column groups names

* Save edited name

* Fix missing column id error

* Add card to datagrid

* Improve shadow on scroll

* Improve fonts

* Fix toolbar placement

* Update api type definitions

* Fix copypasting from excel

* Fix editor font weight

* Improve dark theme

* Improve cell coloring

* Drop styling from story

* Add docs to datagrid (#2339)

* Add docs

* Add summary

* Datagrid fix bugs (#2341)

* Pass refetch to form to avoid double calls

* Add missing prop

* Remove paddings (#2352)

* remove paddings

* remove paddings

* remove paddings

* remove vertical scroll

* update tests

* styles, currency

* Fix variants tests in datagrid (#2365)

* refactor variant test after adding datagrid

* adding assertion to check if datagrid table is visible

* adding check for datagrid

* fix flaky tests in variants

* fix flaky tests in variants

* small changes

* amedments

* update styles

* refactoring, handle prices

* update snapshots

* messages

* snap

* scrolling handle, css for safari

* snap, random mock

* update overflow

* history back hook

* fix cross-price changing, scroll optimization

* trigger ci

* channel checking when adding new variant

Co-authored-by: Michał Droń <dron.official@yahoo.com>
Co-authored-by: Patryk Andrzejewski <vox3r69@gmail.com>
Co-authored-by: Ewa Czerniak <ewa.czerniak@saleor.io>
2022-10-18 11:10:15 +02:00
Dawid
2c49ea1af0
Revert "Update React to 17 and update related packages (#2344)" (#2367)
This reverts commit 3ba3dac2a7.
2022-10-11 12:01:17 +02:00
Dawid
3ba3dac2a7
Update React to 17 and update related packages (#2344)
* Update React to 17

* Update types for React 17

* Update references in useEffect cleanup functions

* Update react-error-boundary

* Update react-inlinesvg

* Update Apollo Client and Upload Link

* Update apollo-upload-client types

* Trigger CI

* Fix comment about csstypes
2022-10-07 12:50:02 +02:00
Lukasz Ostrowski
a4804e2f3d
Inform App iframe about current and changed locale (#2304)
* Inform App iframe about current and changed locale

* Install production app-sdk@0.11.0
2022-09-15 08:18:43 +02:00
Lukasz Ostrowski
84e179604d
Migrate @saleor/app-bridge to @saleor/app-sdk (#2266)
* Migrate @saleor/app-bridge to @saleor/app-sdk

app-bridge is deprecated and was merged into app-sdk.
This commit fixes imports and points to new package

* Downgrade package-lock version

* Update app-sdk to 0.9.1

* Change sdk version to production

* Refresh app-sdk install
2022-09-06 13:11:06 +02:00
Dominik Żegleń
6c79170d9f
Bump version to 3.7.0-dev (#2231) 2022-08-25 10:34:36 +02:00
Wojciech Mista
c6e8537174
Update app actions for new action type (#2200) 2022-08-10 15:26:09 +02:00
Jonatan Witoszek
5fb28b0dc1
Update version in package.json (#2168) 2022-07-14 12:25:34 +02:00
Timur Carpeev
b9a53a6fde
Add rules of hooks (#2131)
* Fix conditional hooks

* Add rules of hooks lint

* Install dependencies with node 14
2022-07-13 11:13:58 +02:00
Wojciech Mista
e7f68f4c07
Periodical refresh of app token (#2091)
* Install jwt-decode

* Add token refetch hook

* Fix types

* Remove app settings

* Regenerate lock

* Fix jwt test issues

* CR fixes

* Bump node and npm

* Reinstall jwt-decode
2022-07-12 12:30:53 +02:00
Michał Droń
dc327f1f76
Bump MacawUI (#2126)
* Bump macaw

* Bump macawUI to 0.6.3
2022-07-07 10:28:10 +02:00
Dawid
1f179f8fbd
Fix app deep url redirects (#2116)
* Fix app deep url redirects

* Update app-bridge

* Refactor useAppActions helper function

* Trigger CI
2022-07-05 10:39:58 +02:00
Karolina Rakoczy
fd7813692a
Change way of tagging tests, add stable tag (#2102)
* change tags in tests

* change tags in tests

* add finde-names

* correct critical tag

* fix navigation

* remove comments

* fix config

* fix baseUrl port
2022-06-27 11:30:51 +02:00
Karolina Rakoczy
056b3501eb
Update Cypress Version (#2080)
* Update Cypress Version

* sparete specs with coma

* change workflows to use latest cypress verion
2022-06-08 12:33:11 +04:00
Karolina Rakoczy
8d361293c5
Add tags to tests runs (#2079)
* Add tags to tests runs

* remove unused workflow

* add tags in command

* add tags in command

* add tags in command

* add tags in command
2022-06-03 10:25:16 +02:00
Jonatan Witoszek
1a19289e43
Enhancements to pagination navigation (#2063)
* Update macaw to include Paginator changes

* Add link support to TablePagination component

* Rewrite usePaginator to use context and links instead of onClick

* Refactor ProductList to use new usePaginator hook

* Add decorator for PaginatorContext in ProductList stories

* Refactor AppList to use new usePaginator hook

* Refactor AttributeList to use new usePaginator hook

* Add missing pagination props for local pagination to AttributeValues

* Refactor CategoryList to use new usePaginator hook

* Refactor CategoryDetails to use useLocalPaginator and context

* Refactor CollectionList to use new usePaginator hook

* Refactor CollectionProducts to use new usePaginator hook

* Refactor CustomerList to use new usePaginator hook

* Refactor VoucherDetailsPage to use PaginationContext

* Refactor SaleDetails to use PaginatorContext

* Refactor SaleList to use new usePaginator hook

* Refactor VoucherList to use new usePaginator hook

* Fix type error in paginatorContextValues fixture

* Refactor GitfCardList to use new usePaginator hook

* Remove unused imports

* Refactor MenuList to use new usePaginator hook

* Refactor OrderDraftList to use new usePaginator hook

* Refactor OrderListPage to use new usePaginator hook

* Refactor PageList to use new usePaginator hook

* Refactor PageTypeList to use new usePaginator hook

* Refactor PermissionGroupList to use new usePaginator hook

* Refactor PluginsList to use new usePaginator hook

* Refactor ProductTypeList to use new usePaginator hook

* Refactor ShippingMethodProducts to use PaginationContext

* Refactor ShippingZonesList to use new usePaginator hook

* Refactor StaffList to use new usePaginator hook

* Fix TS errors

* Update TranslationEntities and TranslationFields to use new usePaginator

* Refactor WarehouseList to use new usePaginator hook

* Fix errors in stories that didn't use PaginationContextDecorator

* Mention changes in changelog

* Update to latest macaw version, update snapshots
2022-05-31 14:53:16 +02:00
Jonatan Witoszek
993a99ff07
Fix EditorJS inputs (#2052)
* Bump Editor.js version

* Refactor RichTextEditor to use react-editor-js wrapper

* fixup! Bump Editor.js version

* Rewrite RichTextEditor to use uncontrolled input

* Fix RichTextEditorContent not rendering any content due to missing id

* Fix RichTextEditorContent not working on initial render

* Remove editorjs-undo

* Refactor usage of RichTextEditor to get its data only during submit

* Add useMultipleRichText hook for managing rich text attributes

* fixup! Refactor usage of RichTextEditor to get its data only during submit

* Rewrite Attributes usage to use EditorJS .save() on submit

* Refactor RichTextContext into separate file

* Rewrite tests for useRichText

* Add PR changes to the changelog

* Update snaphosts

* Fix failing tests for components that use RichTextEditor

* Remove duplicated getSubmitData function
2022-05-26 10:06:46 +02:00
Dominik Żegleń
03506aedc4
Bump version to 3.4-dev (#2027) 2022-05-25 10:11:48 +02:00
Karolina Rakoczy
ad7e6458b5
Add critical input in cypress workflow (#2043) 2022-05-13 12:01:49 +02:00
Dominik Żegleń
a95a3021e4
Autocomplete in channel selection (#2020)
* Add autocomplete to channel picker

* Update macaw

* Update macaw

* Use filter from fuzzaldrin
2022-05-05 10:36:32 +02:00
Dominik Żegleń
7d9441a7ec
Use esbuild-loader (#1983)
* Minor fixes for intl messages

* Add esbuild-loader
* switch from babel to esbuild-loader
* use formatjs enforce-id linter

* Generate ids for intl messages

* id format defined by idInterpolationPattern

* Modify intl messages extraction

* remove react-intl-translations-manager
* remove transpile-tx.js
* use formatjs cli

* Modify defaultMessages.json

* modify ids in defaultMessages.json with defined idInterpolationPattern

* Fix errors

* Fix page crash

* Use babel to transpile tests

* Fix useStateFromProps

* Improve render count

* Add test to useStateFromProps

* Fix reloading state buh

* Do not check if form with channels is dirty

* Stop blocking save if form has not changed

* Remove debug code

* Fix form disabling

* Fix variant selection checkbox onClick

* Update translations

* Update messages

* Use esbuild to build storybook

Co-authored-by: Bartłomiej Wiaduch <tukan2can@gmail.com>
Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>
2022-05-05 09:54:28 +02:00
Karolina Rakoczy
6d5b894dd9
fix shipping method (#2014)
* fix shipping method

* shippings fixed

* fix jest
2022-04-28 10:56:56 +02:00
Dominik Żegleń
8fc48eb5f2
Allow all attributes to appear in grid in PLP (#1933)
* Remove unnecessary attribute filtering

* Enable all attribute types to be displayed in plp

* Improve attribute rendering in plp

* Remove obsolete filters

* Add story

* Rmove dashboard settings section

* Update snapshots

* Remove unused import

* Add column search

* Fix type

* Update messages

* Allow popper to appear on top of select

* Update snapshots

* Update label

* Use autocomplete from macaw

* Fix stories

* Remove unused imports

* Update macaw

* Update message

* Update messages and snapshots
2022-04-28 10:43:05 +02:00
Wojciech Mista
522569f536
Pass appId to iframe src (#1990)
* Pass appId to iframe src

* Bump app-bridge version
2022-04-25 18:06:45 +02:00
Karolina Rakoczy
c00d34434c
Create workflow for nightly tests (#2007)
* Create workflow for nightly tests

* fix step without run

* fix if

* add missing quotes

* fix if

* checkout before install

* add needs

* check npm version

* set up node version

* fix access token

* add staging env variable

* add quote

* add caching

* check if run when revert skipped

* check if run correctly

* remove execute on pull
2022-04-25 11:22:50 +02:00
Jonatan Witoszek
c6d0ec8dbd
Update macaw-ui to 0.4.0 (#2004)
* Update macaw-ui to 0.4.0
* Update snapshots after macaw update
2022-04-20 17:52:26 +02:00
Karolina Rakoczy
207ce6d031
Fix Critical (#1991)
* change api url

* fix critical
2022-04-15 13:17:52 +02:00
Klaudia
dd85c4c6c8
removing hardcoded keys and adding CYPRESS_RECORD_KEY variable (#1979)
* removing hardcoded keys and adding  CYPRESS_RECORD_KEY  variable

* removing redundant scripts

* removed A
2022-04-12 13:06:03 +02:00
M.Graczyk
05c2efde6c
Cypress configuration (#1973)
* Update projectID

* Add record argument to critical-tests workflow with key configuration

Co-authored-by: Michalina Graczyk <michalinagraczyk@Michalinas-MacBook-Pro.local>
2022-04-05 11:11:05 +02:00
Michał Droń
560ed2cd6e
Add build-schema tool (#1947)
* Add build-schema tool

* Include build-schema in fetch schema
2022-03-29 10:39:33 +02:00
Karolina Rakoczy
74848922dc
Run critical tests in ever PR (#1945)
* run critical tests after test env deployment

* add cache

* add all branches

* change workflow name

* add run on pull request for testing

* change type

* add run on deployment

* run on copleted

* test critical

* add quote

* change baseUrl

* fix base url

* fix base url

* upload reports

* run in parallel

* save build folder

* remove build from gitignore

* remove build

* update nide version

* last try with parallel

* save build

* save build

* Run critical

* change cypress API url

* run critical in parallel

* check which workflow has lower duration time

* save all reports with container in name

* add reports on failure

* remove reporters

* fix jobs

* merge

* add group name

* run critical

* Refactor critical tests (#1906)

* refactored tag added to purchaseWithProductsTypes, navigation, stocksInCheckout

* homePageAnalitics - refactor

* refactor home page

* refactor creating variants

* refactor adding product without sku to order

* add script to run critical locally

* change tests cases names

* fix names, remove comments, add script to run refactored tests

* remove workflow for parallel

* remove key

* run critical in deploy workflow

* remove workflow

* remove workflow
2022-03-23 11:36:30 +02:00
Wojciech Mista
7576afed4e
Don't fetch user details on login (#1909)
* Install sdk from commit

* Don't include user details on login

* Update recordings

* Update saleor-sdk version

* Update sdk version
2022-03-23 08:15:05 +01:00
Karolina Rakoczy
f85786f203
Run critical tests after test env deployment (#1902)
* run critical tests after test env deployment

* add cache

* add all branches

* change workflow name

* add run on pull request for testing

* change type

* add run on deployment

* run on copleted

* test critical

* add quote

* change baseUrl

* fix base url

* fix base url

* upload reports

* run in parallel

* save build folder

* remove build from gitignore

* remove build

* update nide version

* last try with parallel

* save build

* save build

* Run critical

* change cypress API url

* run critical in parallel

* check which workflow has lower duration time

* save all reports with container in name

* add reports on failure

* remove reporters

* fix jobs

* merge

* add group name

* run critical

* Refactor critical tests (#1906)

* refactored tag added to purchaseWithProductsTypes, navigation, stocksInCheckout

* homePageAnalitics - refactor

* refactor home page

* refactor creating variants

* refactor adding product without sku to order

* add script to run critical locally

* change tests cases names

* fix names, remove comments, add script to run refactored tests

* remove workflow for parallel

* remove key
2022-03-21 13:17:37 +01:00
Jakub Majorek
f5d79c3135
Set a dev version for main development (#1759) 2022-03-16 14:29:13 +01:00