Commit graph

344 commits

Author SHA1 Message Date
Patryk Andrzejewski
aaf646399e
Feature previews (#4079)
* Feature preview

* Feature preview

* Feature preview

* Feature preview

* Feature preview

* Add visible flag

* Typo

* Typo

* Fix re-login

* Fix re-login

* Fix enable

* Fix enable

* content

* Fix types, overflow content

* Fix user menu
2023-08-17 12:36:11 +02:00
Patryk Andrzejewski
7d2790e51b
Fix regex for lint staged (#4068) 2023-08-08 11:29:08 +02:00
dependabot[bot]
378726c27a
Bump validator and cypress-mochawesome-reporter (#3991)
Bumps [validator](https://github.com/validatorjs/validator.js) to 13.7.0 and updates ancestor dependency [cypress-mochawesome-reporter](https://github.com/LironEr/cypress-mochawesome-reporter). These dependencies need to be updated together.


Updates `validator` from 10.11.0 to 13.7.0
- [Release notes](https://github.com/validatorjs/validator.js/releases)
- [Changelog](https://github.com/validatorjs/validator.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/validatorjs/validator.js/compare/10.11.0...13.7.0)

Updates `cypress-mochawesome-reporter` from 2.4.0 to 3.5.1
- [Release notes](https://github.com/LironEr/cypress-mochawesome-reporter/releases)
- [Commits](https://github.com/LironEr/cypress-mochawesome-reporter/compare/v2.4.0...v3.5.1)

---
updated-dependencies:
- dependency-name: validator
  dependency-type: indirect
- dependency-name: cypress-mochawesome-reporter
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-04 10:06:48 +02:00
Krzysztof Żuraw
ae813a406e
Experimental filters: add unit tests and bump UI library (#4045) 2023-08-02 10:21:18 +02:00
wojteknowacki
5087dec2d5
removed percy and demo tests code - not useful anymore (#4029)
* removed percy and demo tests code - not usefull anymore

* removed percy from dev dependecies
2023-07-28 11:48:19 +02:00
Krzysztof Żuraw
be6adb28d5
Experimental filters: small bugfixes (#4019) 2023-07-27 10:34:59 +02:00
Krzysztof Żuraw
d9c600452c
Experimental filters: adjusts UI and fix types errors (#3996) 2023-07-26 11:39:24 +02:00
Lukasz Ostrowski
fa6e469792
App permissions request flow (#3962)
* WIP - app permissions request flow

* Add copy to permissions view

* Add better ui

* Handle scenario when app already has permissions

* refactor urls

* tests

* Extract translations

* fix strict ts

* extract mesages

* Fix linter

* CR Fixes + handle case when user cant update app

* Extract messages
2023-07-25 10:45:34 +02:00
Krzysztof Żuraw
d2074f4824
Experimental filters: add clear button and bumps UI to support ranges (#3975) 2023-07-24 14:45:52 +02:00
Krzysztof Żuraw
5a6c255004
Experimental filters: add support for constrains on UI (#3969) 2023-07-21 11:26:48 +02:00
Krzysztof Żuraw
dd50f95b55
Experimental filters: add empty state and adjust popover ui (#3950) 2023-07-19 11:29:03 +02:00
Krzysztof Żuraw
5e6794fa99
Experimental filters: new popover ui (#3944) 2023-07-18 12:40:50 +02:00
Krzysztof Żuraw
03d9e92c97
Add prettier command and run it inside src folder (#3892) 2023-07-11 08:34:08 +02:00
Krzysztof Żuraw
cc0e0e58f3
Experimental filters: refactor API hooks (#3882) 2023-07-10 08:17:30 +02:00
Krzysztof Żuraw
f8c9317ede
Experimental filters: Type initial API calls (#3864) 2023-07-05 15:05:43 +02:00
Lukasz Ostrowski
1cb6e8b5fc
Manual app permissions setting by the user (#3829)
* Remove react-markdown, render app about section as string

* Add modal with permissions - WIP

* Extract components

* add permissions diff

* add mutation

* add notification

* fix dialog scrolling

* Extract messages in permissions dialog

* test for useGetAvailableAppPermissions.ts

* add test to state

* fix enums

* add changeset and extract root messages

* Update wicked-berries-watch.md

* fix linter

* fix ts

* cr fixes
2023-07-03 14:50:53 +02:00
Michał Droń
3123f04c69
Upgrade to ESLint 8 (#3781)
* Upgrade ESLint

* Add eslint-nibble

* Move typescript to dev deps

* Update ESLint config

* Turn off semi, comma-dangle & quotes rules

* Enable simple sort

* Fix errors in ESLint (#3788)

* Disable rules requiring heavy changes

* Autofix new ESLint rules

* Autofix more-rules

* Fix jsx/generics ambiguity

* Add warnings for broken rules requiring manual fixes

* Remove redundant expected-error

* Add simple-sort

* Add prettier config

* Lint config

* Fix sort plugin

* Fix simple sort plugin

* Fix sort order

* Update src/orders/components/OrderTransaction/components/TransactionEvents/components/PspReferenceLink.tsx

Co-authored-by: Paweł Chyła <chyla1988@gmail.com>

* Remove redundant comment

* Remove chai friendly

* Update package.json

Co-authored-by: Krzysztof Żuraw <9116238+krzysztofzuraw@users.noreply.github.com>

* Remove to-be-checked comment

* Update formatjs plugin

* Lint staged only in src

* Add changeset

* Add tracking issue for new rules

* Resolve auto-fixable warning after merge

* Change sorts to warnings

* Run lint on new files

* Fix errors

---------

Co-authored-by: Paweł Chyła <chyla1988@gmail.com>
Co-authored-by: Krzysztof Żuraw <9116238+krzysztofzuraw@users.noreply.github.com>
2023-06-30 10:07:13 +02:00
Patryk Andrzejewski
198341cb41
New filters for the product listing page (prototype) (#3811)
* Expression filters

* Filters

* Tokenizing

* Tokenizing

* feat: fetch inital state from API

* fix: integrate with code

* Loading

* feat: add attribute name & label

* feat: move input type

* Loading

* feat: update left operator + condition

* feat: fetch inital options on focus

* feat: fetch right options on autocomplete

* Flags

* Refactor

* fix: add loading state

* fix: after changes

* fix: remove debugger

* fix: proper selected setting

* Refactor

* Display properly

* Display properly

* Display properly

* feat: fetch left options

* Persist

* feat: add loading state

* feat: refactor getAPIOptions

* feat: add additional checks to filter element

* feat: use debounce

* FilterArray

* FilterArray

* Modeling

* fix: filters in popover

* feat: use new macaw ui version

* Types

* Feature flag

* fix: type errors

* Alignment

* Fix api

* feat: add slug

* feat: add slug

* feat: add slug for the last time

* fix: return slug from left options

* Fix combobox

* Force slug

* Changeset

* fix: serialize value

---------

Co-authored-by: Krzysztof Żuraw <9116238+krzysztofzuraw@users.noreply.github.com>
2023-06-29 14:10:19 +02:00
Lukasz Ostrowski
6640294078
Update app-sdk and pass saleor versions to handshake event for apps (#3789)
* Update app-sdk (early build) and pass saleor versions to handshake event for apps

* Add changeset

* Fix sdk version

* Fix broken external app context

* cr fixes
2023-06-28 15:06:08 +02:00
Patryk Andrzejewski
3118741db8
Feature flags strategies (#3800)
* Feature flags

* Feature flags

* Feature flags

* Feature flags

* Feature flags

* Feature flags

* Types

* use @swc/jest

* Avoid calling constructors inside

* Types

* Types

* remove flagsmith

* Change to payload

* Change to payload

* Update tests

* Split resolver
2023-06-27 13:30:20 +02:00
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
Krzysztof Żuraw
79779f2d3d
Add changesets (#3786) 2023-06-23 10:26:02 +02:00
Patryk Andrzejewski
1d2eeb7592
Strict mode plugin (#3778)
* Stric mode plugin

* Update command
2023-06-21 11:28:00 +02:00
Paweł Chyła
2db64cd135
Allow to copy and go to product details on order details datagrid (#3744) 2023-06-20 10:29:28 +02:00
Krzysztof Żuraw
8e8faa4bbe
Adjust pkg json with new dashboard version after release (#3750) 2023-06-13 11:51:12 +02:00
Krzysztof Żuraw
67b55edca7
Migrate from legacy to new MacawUI spacing (#3697) 2023-05-30 08:47:21 +02:00
Lukasz Ostrowski
a86e0e6b13
Add hook that sends updated app token to the App (#3683)
* Add hook that sends updated app token to the App

* Install latest app-sdk@0.39.1
2023-05-25 15:35:17 +02:00
Krzysztof Żuraw
76cde7c7b1
Migrate MacawUI to new spacing scale (#3674) 2023-05-24 12:12:07 +02:00
Krzysztof Żuraw
ea5b6a80a5
set 6GB as max node memory usage while building dashboard (#3666) 2023-05-19 13:53:08 +02:00
Krzysztof Żuraw
8a86a32c08
Logout user that do not have permissions (#3559) 2023-05-18 10:54:30 +02:00
Krzysztof Żuraw
50c8e93534
Setup chromatic and cleanup storybook (#3588) 2023-05-12 13:06:27 +02:00
Paweł Chyła
5eb0be2dc3
Product list bulk delete (#3562)
* Datagrid column checkboxes with delete action

* Handle product bulk delete

* Fix border line between columns

* Clear selection after product delete mutation

* Handle row selection

* Improve handleRowDelete, use clearRowSelection

* Fix restart row selection

* Cleanup

* Fix for delete modal

* Fix showing delete modal

* Add delete button next to switcher

* Extract messages

* Fix checking rows in product list datagrid

* Check console

* Check on row click

* Fix fire click when selection checkbox

* Simplifie vertiacal border condition

* Clear selected product when pagination

* Fix issue with columns and row selections

* Fix hiding tooltip when modal close

* Update storybook props fix accordion use

* Fix row selection

* Fix clear selection after pagination change

* Apply cr changes
2023-05-10 14:09:52 +02:00
Krzysztof Żuraw
180e3c56e6
Migrate product create page to new MacawUI (#3372)
Co-authored-by: Michał Droń <droniu@droniu.dev>
Co-authored-by: timur <timuric@gmail.com>
Co-authored-by: wojteknowacki <wojciech.nowacki@saleor.io>
2023-05-04 10:57:18 +02:00
Michał Miszczyszyn
7c933f0d9b
Fix grid scrolling issue (#3583)
* Fix grid scrolling issue

* Remove outline

* Strict null checks

* Strict null checks

* Strict null checks
2023-05-02 12:10:40 +02:00
Krzysztof Żuraw
cb3f7d971c
Remove semver logic from navigator & autohide banner (#3584) 2023-04-28 13:37:24 +02:00
Michał Droń
71de66f9cc
Add SWC to optional deps (#3530)
* Add swc to optional deps

* Push lock

* Revert "Push lock"

This reverts commit 6f90b95205b57e898cdfa63a9d1fe7820a5dfac7.

---------

Co-authored-by: Paweł Chyła <pawel.chyla@saleor.io>
2023-04-25 11:57:32 +02:00
Paweł Chyła
8adadfb2ab
Static datagrid in order view (#3276)
* Init datagrid

* Product type and channels on datagrid

* Move get cell content to utils

* Add channels to storybook

* Add product description to datagrid

* Thubnail cell with avatar

* Translations

* Allow add new empty  product in datagrid

* Search product types

* useProductForm wth save  bar and exit modal

* Add description to product fixture

* Add loading placeholder

* Remove old column picker

* Sorting

* Remove old ProductList

* Update filter props

* Add header icons

* Add sort icons to datagrid column

* Show available channels

* Add price  and updatedAt columns

* Fix sorting, only sort on selected columns

* Sort by channel

* Allow delete name and product type

* Fix show not product found

* Extract mssages

* Product datagrid custom column picker

* Column picker in data grid in dirty hack for bug

* fix storybook props

* Restore Datagrid defalt column picker with custom render

* Add sort by attributes

* Use datagrid loading cells

* Fix product searching

* Show attributes before last updated

* Readonly all fields in datagrid

* Fix creating new datagrid row

* Remove add new procut button from datagrid

* Show only active sorted column

* Temp fix for column filter

* Fix column mismatch

* Add comments and spred props to ColumnPicker

* Cleanup

* Update avatar size and styles

* On row click with hover on row styles

* Use new theme

* Change placeholder image

* Draw rounded image with border

* Readonly product datagrid

* Use new theme colors in datagrid

* Add vertical borders control to datagrid

* Add empty column to add padding

* Add coursor to datagrid

* Restore vertical borders, fix cursor pointer

* Add custom freezed column

* Initial tooltip for column

* Move tooltip to datagrid

* Adjust datagrid colors style, add possibility to select column

* Change datagrid selected cells colors

* Fix typo and extract messages

* Base order  datagrid

* Cleanup Datagrid component

* Cleanup and code refactor

* Remove cursor pointer props from readonlyCell

* Use money cell for total column

* Add custom cell renderers and fix types

* Simple tags implemenrtion for status and payment col

* Add colors from theme

* Make tagCell more dynamic

* Refactor Datagrid file structure

* Add loading indicators

* Selecting column without cells in readonly

* Add sort icons to orders list

* Refactor after CR. fix typos

* Change color of selected colum cell on hover

* Improve selected header text contrast

* Move useColumnPickerColumns to hooks dir with tests

* Add less padding to column picker button

* Remove double border top

* Fix cursor pointer for tagCell and moneyCell

* useGetCellContent hook

* On loading show only one row

* Add missing darkmod color for warning tag

* Refactor columns in datagrid

* Add new macaw theme provider to storybook

* Fix  passing props in datagrid

* Trigger deployment

* Fix column picker in products

* useDatagridColumns

* Fix one more time

* Add column picker with default columns

* Change color for selected header change to textBrandDefault

* Remove unused code, move attributes colums as last

* Cleanup useDatagridColumns

* Improve DatagridProps

* Static datagrid for products (#3144)

* Migrate top nav of product list page to new MacawUI (#3290)

* feat: migrate top nav of product page

* feat: add proper deprecation links

---------

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

* Remove datagrid card paddding (#3310)

* Implement card view for product list (#3292)

* Add temporary view switcher

* Add basic product tile view

* Bump macaw-ui

* Add ellipsis

* Bump macaw-ui

* Add status dot & fix non-rectangular thumbnails

* Bump macaw-ui

* Add variable size placeholder icon

* Improve loader

* Fix top nav menu key error

* Add pagination

* Add unit tests

* Extract messages

* Extract status color to function

* CR Refactor

* Hold product view state in local storage (#3315)

* Remember view state for product list

* Use util status function for status dots

* Fix for empty column and hover in datagrid for product (#3324)

* Remove datagrid card paddding (#3310)

* Fix for empty column and hover in datagrid for product (#3324)

* Use themeValues from macaw (#3326)

* Upgrade macaw

* Use themeValues

* Use themeValues from macaw (#3326)

* Upgrade macaw

* Use themeValues

* Add empty column from datagrid, improve theme types

* Use theme type from typeof

* Filter empty column from default

* New product header (#3346)

* Extraxt messages

* Remve title left padding

* Fix switching view

* Add margin right to nav button

* Improve view switch

* Update switch view icons

* Add spacing to switch

* Add more space

* Add new filterbar to order list

* Code refactor and tests

* Extract messages

* Write unit tests

* Improve switch component

* Overwrite Pill styles

* Common method to get status color for pills

* Local Pill component POC

* Add ThemeProvider to test wrapper

* Extract messages

* Refactor Pill

* Fix Pill path

* Fix tests mocks

* Remove scrollbar and border bottom

* Add custom border to to datagrid

* Fix borders

* Fix border bottom

* Refactor and cleanup

* Remove not needed selectionActions code

* Move logic code t misc

* Fix scrollbar and zindex datagrid borders

* Fix product tiles condition

* Fix empty column when save column change

* Fix bottom line in layout overlap

* Keep first column in datagrid not removable

* Fix for not existing column

* Add loader over datagrid, fix problem with border top when empty text in variants

* Fix error color and change color in datagrid

* Filter presets select

* Fix delete tab name in modal, change order preset key

* Extract messages and apply cr fixes

* Keep active tab when filter and search change

* Apply filter in useColumnDefault

---------

Co-authored-by: Michał Droń <dron.official@yahoo.com>
Co-authored-by: Krzysztof Żuraw <9116238+krzysztofzuraw@users.noreply.github.com>
Co-authored-by: Michał Droń <droniu@droniu.dev>
2023-04-20 09:52:44 +02:00
Krzysztof Żuraw
82b0684c0e
Pin macaw-ui version (#3522) 2023-04-19 11:13:56 +02:00
Krzysztof Żuraw
1d8cbd86a9
Allow refreshing proper token based on token owner (#3516) 2023-04-18 14:35:16 +02:00
Lukasz Ostrowski
799ba9bbfc
Update @saleor/app-sdk to 0.37.3 (#3502) 2023-04-18 08:44:42 +02:00
Paweł Chyła
5da48b07af
Replace all old tooltips with new one from macaw (#3485) 2023-04-12 15:55:42 +02:00
Paweł Chyła
548c10676e
Use new tooltip from macaw in filter presets (#3467) 2023-04-12 10:07:16 +02:00
Paweł Chyła
63b98a08bf
Select filter presets (#3412) 2023-04-12 09:11:11 +02:00
Jakub Neander
42584cdfc2
Close all the bump PRs (#3474) 2023-04-11 17:35:49 +02:00
Patryk Andrzejewski
5f6228d42e
Dependency testing (#3284)
* Depdendency testing

* Update gitignore
2023-04-06 12:29:24 +02:00
wojteknowacki
fc1c367eaf
dashboard demo tests (#3431)
* dashboard demo tests
2023-04-05 09:09:53 +02:00
Krzysztof Żuraw
97c7a32455
Revert author field on app details page (#3453) 2023-04-04 10:55:12 +02:00
Krzysztof Żuraw
2a9b512178
Migrate to refresh token (#3426) 2023-03-31 10:17:48 +02:00
Krzysztof Żuraw
fc43969114
Logout user on failure when login via external source (#3405) 2023-03-30 11:14:53 +02:00
wojteknowacki
262caea8e6
working visual tests - percy 1st attempt (#3400)
* working visual tests - percy 1st attempt

---------

Co-authored-by: Karolina Rakoczy <rakoczy.karolina@gmail.com>
2023-03-28 12:59:33 +02:00