woocommerce/plugins/woocommerce-admin/client/layout
Ismael Martín Alabarce 9a49ff72da
Update WCPay welcome page incentives (#38689)
* Initial refactor of components

Move out from index every UI component to make it easier to maintain.

* Initial implementation of new design

Some minor adjustments are missing, and I've added a few TODOs to complete later.

* Add changelog entry

* Finish design update

* Compress menu icon

* Add user's first name to heading copy

* Fetch and cache eligible incentive from WCPay API

Sharing its properties under `window.WcSettings.admin`

* Filter `allowed_promo_notes`

To be able to add those form WCPay API request

* Update JS side to use the new shared incentive details

* Ensure we cache requests even if there are no eligible incentives

* Fix a typo in WCPayBanner

* Move incentive preloaded data from wcSettings

to a new window variable which will be only loaded on WCPay welcome page.

* Simplify `has_wcpay` check

* Render sanitized HTML from incentive description

* Update get incentive logic to also cache non success responses

* Add incentive ID to page view track

* Add changelog entry for the onboarding package

* Update used options names

and add them to `get_default_option_permissions

* Differentiate every dismissed incentive

Reuse WCPay welcome page logic for notes display conditions

* Use tos_url instead of tos_link to match response

* Fix incentives endpoint request payload

* Back to preload incentive on admin shared settings

* Move promo notes filter to where it's used

to avoid any possible race conditions.

* Replace every occurrence of `WooCommerce Payments` with `WooPayments`

* Prevent modal large padding-bottom

* Prevent another global style override on modal

* Fix TS error coming from trunk merge

* Fix wrong style property

* Further restrict WCPay incentives to plugin not active and countries supported

* Adjust the meaning of has_wcpay

* Wait for dismiss option update before redirect

to prevent the side menu entry to be visible after redirecting back to WC admin.

* Enforce TOS asterix at the end of incentive description

* Remove underscore from priavate instance var.

* Fix ESLint error

* Fix SCSS linting issues

* Refine `has_wcpay` and `has_orders`

* Enforce consistent WooPayments branding

* Enforce stricter i18n calls with escape

* Update page title to match new branding

* docs: Enforce branding in code docs also

* Remove method that is unreliable to be used outside of onboarding

* Remove unused constant

* Missing new line

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

---------

Co-authored-by: Vlad Olaru <vlad@pixelgrade.com>
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-06-16 16:32:58 +02:00
..
footer Fix transient notices overlapping product editor footer (take 2) (#38698) 2023-06-14 16:32:28 -04:00
hooks Fix double scrollbars on product editor page (#38281) 2023-05-18 05:25:36 -03:00
store-alerts Await triggerNoteAction before navigating when action is clicked (#38047) 2023-05-02 11:17:50 -03:00
test Fix save settings error within Analytics (#38542) 2023-05-31 09:35:54 -03:00
transient-notices Fix transient notices overlapping product editor footer (take 2) (#38698) 2023-06-14 16:32:28 -04:00
NoMatch.tsx Codemod to change i18n text domain from 'woocommerce-admin' to 'woocommerce' in WCA Client 2022-04-01 11:41:32 +08:00
controller.js Update WCPay welcome page incentives (#38689) 2023-06-16 16:32:58 +02:00
index.js Fix transient notices overlapping product editor footer (take 2) (#38698) 2023-06-14 16:32:28 -04:00
navigation.js Create @woocommerce/admin-layout package (#37094) 2023-03-10 09:58:02 -05:00
notices.js Align WooCommerce javascript code standards/linting/styles with WordPress core. (https://github.com/woocommerce/woocommerce-admin/pull/3674) 2020-02-14 15:23:21 +13:00
style.scss Add a bottom padding to the whole form (#35721) 2022-11-29 15:11:57 -03:00