Commit graph

264 commits

Author SHA1 Message Date
Patryk Andrzejewski
9bd69248d4
Fix service worker (#2760) 2022-12-01 11:55:46 +01:00
Lukasz Ostrowski
e06d3bdf0d
Improve dashboard and marketplace connection (#2666)
* Change env variables related to marketplace, add navigation item

* Change apps order

* Add button to browse marketplace

* Add redirect to Saleor Apps Marketplace on button click

* Move apps tabs state to URL

* Pass theme for initial marketplace iframe load

* Improve marketplace mount

* fix types

* fix cr

* Update env variables to disable marketplace on envs other than master staging

* Extract locales

* update snapshots
2022-11-30 17:20:20 +01:00
Patryk Andrzejewski
aa10a1d08e
Introduce vite (#2677)
Co-authored-by: Krzysztof Żuraw <9116238+krzysztofzuraw@users.noreply.github.com>
2022-11-28 14:56:46 +01:00
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
Jonatan Witoszek
11a990d197
Remove hover from non-interactive table rows (#2358)
* Disable hover effect when TableRow is not clickable

* Replace TableRow with TableRowLink

* Update snapshots
2022-10-27 12:58:17 +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ń
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
Lukasz Ostrowski
44eb27fed3
Hide app privacy URL if not provided (#2357) 2022-10-10 13:22:16 +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
Jonatan Witoszek
aceae75ce7
Add rel=noopener to links that take users to external sites (#1980)
* Add rel=noopener to links that take users to external sites

* Update Storyshots for Link changes

* Fix invalid isExternalURL function usage

* Update snapshots
2022-10-04 14:28:26 +02:00
Dawid
4c62ebe45d
Fix invalid values of channel picker (#2313)
Co-authored-by: Patryk Andrzejewski <vox3r69@gmail.com>
2022-09-23 13:21:30 +02:00
Patryk Andrzejewski
ae9b7b31dc
Add UI to enable channel listing in variants view (#2303)
* syncg

* manage channels modal, price editing

* fix typings

* fix typings, splitting components

* fix typings, splitting components

* update snapshot

* update types

* update messages

* use toggle

* update e2e tests

* update messages

* add manage button to edit page

* add manage button to edit page

* re-organize components

* update modals

* fix toggle all

* cover scenario when we have no channels
2022-09-22 12:00:13 +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
Dominik Żegleń
fedf276e68
Do not confirm after removing fulfillment (#2296) 2022-09-09 14:09:31 +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
Dawid
df55dba571
Update product and page default availability settings (#2165)
* Update product and page default settings

* Update product and page test snapshots

* Update product create errors handling

* Fix preselected publication info of product with variant without any channel listing

* Update package lock file

* Fix page publication state and its date on page view

* Update page tests
2022-08-22 14:53:17 +01:00
Dominik Żegleń
8e2a3e0c75
Minor fixes to gift card list (#2218)
* Fix paginator interface

* Fix link to product

* Fix dropdown in gift card tags

* Do not pass trash to components
2022-08-18 12:50:09 +02:00
Wojciech Mista
c6e8537174
Update app actions for new action type (#2200) 2022-08-10 15:26:09 +02:00
Dawid
f01966f0d4
Handle errors on finalizing draft order (#2191)
* Add warning alert before finilizing draft order

* Add line error indicators in draft order view

* Handle unfilled fields errors before draft order finalize

* Handle draft order line errors

* Differentiate line alert severity

* Fix order line alert margin

* Remove unnecessairy comment

* Refactor order draft alert components

* Update order draft test snapshots

* Refaactor order details code

* Hide add products button when no products available on order draft page

* Hide no shipping methods warning if they cannot be determined

* Update product assignment dialog messaages

* Update order channel error messages

* Fix missing order lines in error crash
2022-08-10 10:11:32 +01:00
Karolina Rakoczy
fc15227b4c
Automatically merge dashboard release PRs after tests (#2226)
* Automatically merge release PRs after cypress tests

* Fix token

* add package.json to workflows directory

* revert package json to the state from main

* Merge only with auto release flag

* Add if to merge release job
2022-08-10 10:46:00 +02:00
Mika
d0f20ddb0c
Revert "Automatically merge release PRs after cypress tests (#2211)" (#2225)
This reverts commit 8defc63a45.
2022-08-08 18:34:54 +02:00
Karolina Rakoczy
8defc63a45
Automatically merge release PRs after cypress tests (#2211)
* Automatically merge release PRs after cypress tests

* Fix token

* add package.json to workflows directory

* revert package json to the state from main
2022-08-08 15:58:39 +02:00
Dawid
1a974e380c
Make sortable chips accessible (#2175) 2022-07-29 18:47:09 +02:00
Karolina Rakoczy
6cd42b0ae8
Run cypress tests on correct branch (#2196) 2022-07-28 15:05:38 +02:00
Dawid
62c9f10f64
Add plain text attribute (#2121) 2022-07-19 16:16:43 +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
Dominik Żegleń
0c3148893b
Update schema (#2159) 2022-07-12 10:38:49 +02:00
Michał Droń
dc327f1f76
Bump MacawUI (#2126)
* Bump macaw

* Bump macawUI to 0.6.3
2022-07-07 10:28:10 +02:00
Karolina Rakoczy
8a5db9ca26
Run only critical tests (#2143)
* run critical tests

* run stable tests
2022-07-06 18:27:09 +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
Dawid
079c25f16d
Fix app iframe resolution (#2111)
* Fix app frame sizes

* Update app frame height

* App page functions refactor

* Move useLocationState hook to apps

* Update apps test snapshots
2022-06-30 11:05:09 +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
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
47ec01dd7c
Handle case when attribute value is empty on initial render (#2068)
* Handle case when attribute value is empty on initial render

* Fix useRichText when initial data is undefined

* Update snapshots

* Handle loading state in useRichText

* Add placeholder RichTextEditor when data is loading

* Update snapshots
2022-05-31 14:52:59 +02:00