Commit Graph

21 Commits

Author SHA1 Message Date
Darren Ethier 33c5b41e3f Align WooCommerce javascript code standards/linting/styles with WordPress core. (https://github.com/woocommerce/woocommerce-admin/pull/3674)
* align code styles with the same configuration as Woo-Blocks

* initial pass of reformat-files

* applies manual fixes to various new linting errors surfaced by the configuration change.

* Fix state mutation in image-upload

* remove unused pre-commit-hook.js

* requestAnimationFrame -> window.requestAnimationFrame

* wc-api eslint changes

* eslint fixes on client/lib and client/settings

* client/header eslint changes

* fixes for client/dashboard part 1

* fixes client/dashboard part 2 of 2

* client/analytics part 1

* client/analytics continued

* client/analytics, last batch

* rename __mock__ directory

* pass in useEffect, useState from React component or function

* remove '+' from sprintf string argument

* use ref instead of findDOMNode

* reformat and repaply package.json changes

* install deps before running linter in Travis

* useGetCountryStateAutofill

* counryStateAutofill

* countryStateAutofill

Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-02-14 15:23:21 +13:00
Jeff Stieler 0be875d898 Reduce size of bundled JS, and overall plugin file size. (https://github.com/woocommerce/woocommerce-admin/pull/2933)
* Remove embed-page-specific Webpack entry.

* Stop @woocommerce/components from being bundled with the app code.
2019-09-24 08:55:39 -07:00
Paul Sealock d98eceffc7 Revert "Revert "Update to new Snackbar component and notice store"" (https://github.com/woocommerce/woocommerce-admin/pull/2643)
* Revert "Revert "Update to new Snackbar component and notice store""

* Update uploader component to use createNotice

* Bump required WP version to 5.2

* Update required PHP and WP versions in plugin header
2019-07-23 11:26:46 +08:00
Timmy Crawford f4735658d7 Revert "Update to new Snackbar component and notice store (https://github.com/woocommerce/woocommerce-admin/pull/2596)"
This reverts commit 980ff6fa71.
2019-07-10 09:58:51 -07:00
Joshua T Flowers 980ff6fa71 Update to new Snackbar component and notice store (https://github.com/woocommerce/woocommerce-admin/pull/2596)
* Add new wordpress/components version and fix dependencies

* Add in snackbar styling and gutenberg variables

* Convert all existing notice actions to wordpress/notices

* Fix linting errors

* Add package.lock changes

* Update search list control snapshots with new attributes
2019-07-08 12:10:34 +08:00
Daniel Rey López 08417da553 Allow each page to specify their breadcrumbs without having to render the Header component (https://github.com/woocommerce/woocommerce-admin/pull/2491)
* Simplify Header rendering, remove the use of react-slot-fill

* Remove the useless "/analytics" route

* Move all the <Header> renders to the new, declarative way of specifying breadcrumbs

* Re-render the Layout when a report is added using the REPORTS_FILTER, since that affects the breadcrumbs output

* Fix the base breadcrumb link and breadcrumbs on embedded pages

* Expanded Layout.propTypes to specify the breadcrumbs' shape
2019-07-05 09:15:49 +01:00
Joshua T Flowers 847b59246d Add transient notices (https://github.com/woocommerce/woocommerce-admin/pull/1423)
* Add initial transient notices component

* Animate notices to slide in and out

* Add notices to wc-api

* Map notices from wc-api to transient notices

* Add success message on settings save

* Add save notices to Settings page

* Remove all margin and padding from notice box when empty

* Add role alert to transient notices

* Add prefers reduced motion media query for transient animation

* Remove initial test notice

* Remove notices from wc-api

* Add wc-admin store for transient notices

* Pull transient notices from newly implemented store

* Use speak instead of role alert for accessibility

* Only show success message after request is complete

* Destructure state in componentDidUpdate

* Add store notice tests and fixtures

* Add box shadow to transient notice

* Move transient notices to bottom left

* Fix indentation
2019-02-13 19:44:58 +08:00
Kevin Killingsworth 833345dfee Remove 'wc-admin' client/store implementation (https://github.com/woocommerce/woocommerce-admin/pull/1344)
This has been replaced by the `wc-api` store, under client/wc-api
2019-01-28 14:18:21 -05:00
Kevin Killingsworth 847131c6c9 Add wc-api and "Fresh Data" (https://github.com/woocommerce/woocommerce-admin/pull/833)
* data: Add @fresh-data/framework to package.json

* data: Add fresh-data and replace orders in table

This PR adds fresh-data with a WooCommerce API spec to fulfill order
information. It then replaces the existing selectors for the orders
table with the new selectors as a proof-of-concept.

* wc-api: Add temporary code for `withSelect`

This adds temporary code for a `withSelect` function outside of
`@wordpress/data` until the context PR is merged:

https://github.com/WordPress/gutenberg/pull/11460

* wc-api: Update fresh-data to 0.5.0
2018-11-29 09:57:49 -06:00
Kelly Dwan ed1b847067 Fix Gutenberg 3.7 compatibility: Remove APIProvider (https://github.com/woocommerce/woocommerce-admin/pull/390)
* Remove APIProvider

Unused in the project, and deprecated in gutenberg

* Remove wp-api dependency
2018-09-11 15:48:43 -04:00
Kelly Dwan dec97d178e Components: Export reusable components to a separate file + global (https://github.com/woocommerce/woocommerce-admin/pull/297)
* Importing all components from a root components file

* Update Ratings component to avoid circular dependencies, fix tests

* Export components on `wc.components`, use this for importing

* Move react-dates initialize to the components file

* Push query changes to history

Fixes an issues where native a links do not update the query in `history`

* Update test config for new @woocommerce/components path

* Update chart components import

* Merge simple/complex & alphabetize by first exported name

* Add a readme with info about how to call these components
2018-08-20 17:18:13 -04:00
Kelly Dwan ddeacb84e5 Move non-reset SCSS to new files, add folder structure (https://github.com/woocommerce/woocommerce-admin/pull/274)
* Move non-reset SCSS to a new file

* Split shared files and “meta” files into two folders

This also creates two new base scss files for the different app vs embedded CSS files

* Move notice & embed-specific css out of reset

* Update README with folder structure notes
2018-08-06 11:30:43 -04:00
Paul Sealock b34b2efbbc Use wp.data on Orders report
Update to Gutenberg 3.3
2018-07-30 11:17:28 +12:00
Paul Sealock be002e442a DatePicker: Hook up react-dates 2018-06-27 14:11:13 +12:00
Justin Shreve bf80e5c649 Global Header & Activity Panel on all WooCommerce Pages (https://github.com/woocommerce/woocommerce-admin/pull/110)
* Makes the header/sidebar component embeddable on other WooCommerce pages.

* Some mobile CSS fixes to make sure the header bar displays properly on smaller screensizes.

* Refactor notices and pull out success message from the panel

* Handle positioning of screen options, update message handling, css fixes and header height increase to match mockups, some code cleanup

* Only enable the header embed on normal/classic WooCommerce pages, and provide a method for plugins to opt-in.
This change also builds nicer breadcrumbs for pages.

* Code cleanup and consistent naming.

* Some spacing cleanup. Also updated the page title method to correctly set page titles in PHP for classic WC pages
2018-06-26 10:49:42 -04:00
Kelly Dwan a01861d886 Add README for `useFilters`, clean up example filter (https://github.com/woocommerce/woocommerce-admin/pull/100)
* Add README for useFilters

* Remove unused filter example
2018-06-01 10:34:54 -04:00
Kelly Dwan 8f23630269 Layout: Add structure components & CSS (https://github.com/woocommerce/woocommerce-admin/pull/45)
* Refactor dashboard layout into new Layout components

* Style the new layout

* Use Slot/Fill for the Header component

* Center cards, fixed size for sidebar

* Only set the box-sizing on things within our app

* Make app the full height of the wp-admin frame

* Add styles to show/hide sidebar

* Toggle the sidebar

* Wrap router around entire Layout, use page setting to show/hide sidebar on page

* Fix the styles on show/hide buttons, add title & close button to the sidebar

* Use a min-height on visible sidebars

* Add/update READMEs

* Update space between main content & sidebar
2018-05-18 13:31:08 -04:00
Justin Shreve f8f0464eba Fix CSS reset duplication (https://github.com/woocommerce/woocommerce-admin/pull/56) 2018-05-16 10:42:39 -04:00
Justin Shreve e5bb7e556b Add routing capabilities with basic analytics page (https://github.com/woocommerce/woocommerce-admin/pull/44)
* Add routing capabilities with basic analytics page

* Pass query string to child component
2018-05-15 11:06:15 -04:00
Justin Shreve d7df8ed76e Adds SCSS color variables and breakpoints (https://github.com/woocommerce/woocommerce-admin/pull/39)
* Adds SCSS color variables and breakpoint mixins

* Use webpack to pull in shared CSS

* Move notices reset rule to wpadmin-reset

* Prefix breakpoints, colors, and wpadmin reset
2018-05-14 09:41:30 -04:00
Justin Shreve d380fd7569 Rename js/src to client (https://github.com/woocommerce/woocommerce-admin/pull/38)
* Rename js/src to client/

* Update the prettier format to only look in client/
2018-05-11 12:13:57 -04:00