Commit Graph

345 Commits

Author SHA1 Message Date
Paul Sealock 361b6de834 Advanced Filters: Filter button improvements 2018-09-13 11:07:53 +12:00
Robert Elliott abe27333ae remove uncommented style 2018-09-12 15:24:45 +02:00
Albert Juhé Lluveras ac044b8720 Add empty state message to Top Selling Products card (https://github.com/woocommerce/woocommerce-admin/pull/365) 2018-09-12 14:09:53 +02:00
Robert Elliott b276750955 html encoder for currency symbols 2018-09-12 13:16:44 +02:00
Robert Elliott a7ed5f0c85 html encoder for currency symbols 2018-09-12 13:16:36 +02:00
Robert Elliott 29113cffe8 align date formats for the chart 2018-09-12 09:22:08 +02:00
Paul Sealock 925140fc78 Merge pull request woocommerce/woocommerce-admin#349 from woocommerce/add/advanced-filters-url-support
Advanced Filters: Add url support
2018-09-12 14:31:13 +12:00
Justin Shreve baf44d030f Add interval handling to the revenue report. 2018-09-12 12:28:25 +12: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
Robert Elliott 32285df636 package-lock bump 2018-09-11 13:16:14 +02:00
Timmy Crawford b184aa2324 Update gridicons to v3.1.1 2018-09-11 13:10:44 +02:00
Robert Elliott 4d155cd015 line and bar icon buttons 2018-09-11 13:10:36 +02:00
Albert Juhé Lluveras ae8739d63f Add required polyfills so react-dates works in Internet Explorer 11 (https://github.com/woocommerce/woocommerce-admin/pull/356)
react-dates developers recommend using airbnb-browser-shims, but doing some
testing I found loading the required polyfills individually instead of the
entire Airbnb Browser Shims package produces smaller builds.
2018-09-11 09:28:50 +02:00
Albert Juhé Lluveras 8932f99038 Add fallback gutter for browsers that don't support CSS Custom properties (https://github.com/woocommerce/woocommerce-admin/pull/372) 2018-09-11 09:27:13 +02:00
Paul Sealock 3e7bed27cc Search: move selected from state to props 2018-09-11 16:18:10 +12:00
Robert Elliott e38284eb96 Merge pull request woocommerce/woocommerce-admin#381 from woocommerce/add/chart-legend-order
Chart Component: remove chart legend ordering for layout=standard and color scales
2018-09-10 16:04:36 +02:00
Robert Elliott 65f9b7540b Merge pull request woocommerce/woocommerce-admin#380 from woocommerce/add/chart-legend-layout
Chart Component: standard vs comparison legend layout
2018-09-10 16:03:01 +02:00
Robert Elliott 4242a64f30 add smallcolorscale fractions for chromatic scaled colors 2018-09-10 15:59:14 +02:00
Kelly Dwan eee638b12b Component – Filters: Add "comparison" card (https://github.com/woocommerce/woocommerce-admin/pull/368)
* Add a new component with product search for the compare card

* Get product names from API when passed through URL

* Abstract out the products-related code into filter settings

* Update filters to provide multiple comparisons

Alternative to the “Compare [dropdown]” approach

* Update documentation

* Wipe selected items when the compare-type is updated

* Update labels & order of items in filter dropdown

* Add getLabels prop & description
2018-09-10 09:59:14 -04:00
Robert Elliott 3fdd9164c8 only sort on totals for layout=comparison & add dateParser prop for date formatting 2018-09-10 14:57:36 +02:00
Robert Elliott bf6a647c79 standard vs comparison legend layout 2018-09-10 13:32:13 +02:00
Kelly Dwan cbce093df1 Add “product category” autocompleter (https://github.com/woocommerce/woocommerce-admin/pull/367) 2018-09-07 15:39:04 -04:00
Albert Juhé Lluveras 069fcb7fe6 IE11: fix Card layout broken because it was using CSS grid (https://github.com/woocommerce/woocommerce-admin/pull/370) 2018-09-07 17:52:51 +02:00
Timmy Crawford 2ad6129830 Add w.js when wc_tracker is enabled. (https://github.com/woocommerce/woocommerce-admin/pull/369) 2018-09-07 07:36:20 -07:00
Robert Elliott 74514a2b48 Merge pull request woocommerce/woocommerce-admin#350 from woocommerce/fix/chart-design-feedback
Merging this.

@LevinMedia please continue to post additional issues or comments on the master thread woocommerce/woocommerce-admin#164
2018-09-07 14:54:58 +02:00
Robert Elliott 91a8a9eec3 improve jsdoc and remove Math.round() 2018-09-07 14:48:07 +02:00
Robert Elliott 1ed72ede25 colour -> color 2018-09-07 14:45:29 +02:00
Robert Elliott 8829498466 set d3 local and update number format 2018-09-07 14:39:35 +02:00
Robert Elliott 9e4062c51f set d3 local and update number format 2018-09-07 14:39:31 +02:00
Robert Elliott 90cb4ba6c8 fix vertical line on hover 2018-09-07 12:41:40 +02:00
Robert Elliott a8449b08c0 left align y-axis text 2018-09-07 12:28:02 +02:00
Albert Juhé Lluveras f12f431a2b Fix Date filters grid not displaying correctly in IE11 (https://github.com/woocommerce/woocommerce-admin/pull/366) 2018-09-07 11:43:52 +02:00
Robert Elliott 233c7755f7 hover confusion 2018-09-07 11:21:52 +02:00
Robert Elliott 58efdd90c0 massaging y ticks and updating tests 2018-09-06 18:21:33 +02:00
Robert Elliott 709e5a2896 header legend hover styling 2018-09-06 18:21:33 +02:00
Robert Elliott 7dd2883f56 tooltip formatting 2018-09-06 18:21:31 +02:00
Robert Elliott 93aae38b8a pipes, months, formatting 2018-09-06 18:15:08 +02:00
Robert Elliott c11da940e2 if legend item unchecked no hover status
modified:   client/components/chart/legend.js
	modified:   client/components/chart/style.scss
	modified:   package-lock.json
2018-09-06 18:15:08 +02:00
Robert Elliott 2df9b05b5f Merge pull request woocommerce/woocommerce-admin#360 from woocommerce/add/chart-intervals
Chart Component: Add/chart intervals
2018-09-06 18:10:37 +02:00
Robert Elliott 0f66375b88 updated from feedback 2018-09-06 17:58:24 +02:00
Albert Juhé Lluveras 090ecf3a8a IE11: fix CSS grid in Summary (https://github.com/woocommerce/woocommerce-admin/pull/353)
* Fix Summary values not visible with IE11

* Fix Summary grid for IE11

* Move grid position mixin to _mixins file, so it can be used for other elements

* Remove set-grid-positions mixin and improve code understandability
2018-09-06 17:11:34 +02:00
Robert Elliott fddeb2502c exmple-hour update 2018-09-06 11:40:29 +02:00
Robert Elliott 0ad4b9a312 updated tests with latest date format 2018-09-06 11:12:03 +02:00
Robert Elliott b73f2ba47d updated README 2018-09-05 23:22:34 +02:00
Robert Elliott 964a43b674 x, y and tooltip formatting 2018-09-05 23:02:13 +02:00
Justin Shreve 251d9804ef Remove test code/examples and disable the inbox activity panel. (https://github.com/woocommerce/woocommerce-admin/pull/355)
* Remove test code/examples and disable the inbox activity panel.

* Remove search example
2018-09-05 14:52:48 -04:00
Justin Shreve 898a82ca1d Fix wp-admin navigation active state (https://github.com/woocommerce/woocommerce-admin/pull/352) 2018-09-05 14:37:26 -04:00
Justin Shreve f5479e1c18 Add loading indicators, error state, and EmptyContent to the revenue report. (#347, woocommerce/woocommerce-admin#348)
* Add loading indiciators for the revenue report.

* Improve accessibility, and fix up some documentation comments.

* Fix top border on mobile

* Add EmptyContent Component and revenue error/empty states. (https://github.com/woocommerce/woocommerce-admin/pull/348)

* Add EmptyContent Component and revenue error/empty states.

* Move relative image handling to ImageAsset, combine secondary and primary action rendering, add some missing isRequired proptypes, add empty error handling.

* Handle PR Feedback: Clean up button css, set a default for illustration, fix deprecation typo, some code cleanup.
2018-09-05 12:45:49 -04:00
Albert Juhé Lluveras 9183756a70 Fix TopSellingProducts table not correctly loading data (https://github.com/woocommerce/woocommerce-admin/pull/351)
Update TopSellingProducts table API connection to correctly work
with the new selectors response format introduced in woocommerce/woocommerce-admin#316.
2018-09-04 16:10:07 +02:00
Paul Sealock ab97ed02c7 Search: move selected from state to props 2018-09-04 12:02:40 +12:00
Justin Shreve 4e2661f3f1 Connect the revenue report to the api (https://github.com/woocommerce/woocommerce-admin/pull/316) 2018-09-03 11:25:38 -04:00
Albert Juhé Lluveras e94ae40d4d Use native Array.isArray() instead of lodash function (https://github.com/woocommerce/woocommerce-admin/pull/346) 2018-09-03 17:09:09 +02:00
Albert Juhé Lluveras 71171ec80b IE11: fix Acitvity Panel tab icons missing and wrong alignment (https://github.com/woocommerce/woocommerce-admin/pull/345) 2018-09-03 17:08:19 +02:00
Albert Juhé Lluveras da2317f154 Add CSV download to Revenue table (https://github.com/woocommerce/woocommerce-admin/pull/326)
* Add CSV download to Revenue table

* Set revelant file name for revenue CSV file download

* Add package-lock.json

* Move CSV download logic inside /lib/

* Remove 'totals' from table CSV

* Check parameters are arrays in generateCSVDataFromTable

* Add @TODO comment about downloading large sets of data
2018-09-03 09:54:45 +02:00
Kelly Dwan 2ab7618447 Docs Project: Add markdown files, docsify to render site (https://github.com/woocommerce/woocommerce-admin/pull/337)
* Add generated docs to repo, add command to regenerate docs

* Add docsify to render markdown files & search from GitHub.io

* Add prop type description if it exists

This property is only filled in on descendent proptypes (items in a shape, for example)

* Vaguely woo-themed

* Tweak spacing in markdown file, add final newline to each file
2018-08-31 16:13:20 -04:00
Kelly Dwan d36511479e Docs Project: Add documentation parser + inline documentation (https://github.com/woocommerce/woocommerce-admin/pull/336)
* Switch all components to default exports

This ensures we can read all components for documentation generation (plus, standardizing is good)

* Add documentation to component file

* Fix table exports

* Move readme docs into inline docs

Includes updating new props, adding prop shapes

* Add doc-generation scripts to pull exported component docs into folder

* Remove key propType, causing react special-keys warning

* Fix proptype

* Update incorrect comment

* Remove template import, we can just use string concat

* Fix typo, update docs
2018-08-31 13:27:21 -04:00
Kelly Dwan 7711da472a Docs Project: Component cleanup (https://github.com/woocommerce/woocommerce-admin/pull/334)
* Validate component with helper function

Fixes compat issue with react-docgen

* Switch all components to default exports

This ensures we can read all components for documentation generation (plus, standardizing is good)

* inValidDays -> invalidDays

Invalid is a single word, so by capitalization rules the V should be lowercase

* Export child-components of Chart

* Fix table exports
2018-08-31 13:19:13 -04:00
David Levin 4ee6becb6d Merge pull request woocommerce/woocommerce-admin#335 from woocommerce/update/mobile-card-styles
Update Card Component Styles on Mobile
2018-08-31 07:55:35 -07:00
Albert Juhé Lluveras 3dcb1339b3 Create TablePlaceholder component to be used when table contents are loading (https://github.com/woocommerce/woocommerce-admin/pull/338) 2018-08-31 16:43:25 +02:00
David Levin 808c49fd4e Merge pull request woocommerce/woocommerce-admin#332 from woocommerce/update/319-datepicker-design-details
updating datepicker styles
2018-08-30 16:33:07 -07:00
David Levin ea672cdedb update mobile card styles 2018-08-30 16:02:12 -07:00
Paul Sealock 89f5057d58 Hide react-dates container 1px 2018-08-31 09:53:25 +12:00
Paul Sealock dea96a02c5 Merge pull request woocommerce/woocommerce-admin#325 from woocommerce/fix/popover-in-popover
DatePicker: Fix Error message positioning on non-mobile widths
2018-08-31 09:30:40 +12:00
Paul Sealock 4580fc453e Merge pull request woocommerce/woocommerce-admin#324 from woocommerce/fix/invalid-date-error-msg
DaptePicker: fix erorr message popover
2018-08-31 09:29:23 +12:00
Paul Sealock 431caff91f Datepicker: change Reset btn to default style 2018-08-30 11:07:34 +12:00
Paul Sealock f48fdd2dea Segmented-selection: remove focus outline in favor of inset box-shadow 2018-08-30 08:21:59 +12:00
David Levin a44d94c7d5 updating datepicker styles 2018-08-29 09:11:35 -07:00
Albert Juhé Lluveras 52a0a9690c Connect TopSellingProducts with the API (https://github.com/woocommerce/woocommerce-admin/pull/323)
* Connect Top Selling Products table to the API

* Add tests to TopSellingProducts

* Prepare TopSellingProducts component to render loading/error messages
2018-08-29 17:55:56 +02:00
Paul Sealock f6ca6ad366 uncomment code 2018-08-29 16:05:01 +12:00
Paul Sealock 349f8e9d91 Datepicker: use negative margin on popover to avoid creating a new position context 2018-08-29 16:02:16 +12:00
Paul Sealock cddb65813b uncomment needed code 2018-08-29 15:03:55 +12:00
Paul Sealock aae27050b4 set width expl 2018-08-29 15:03:20 +12:00
Paul Sealock e137f7af60 DaptePicker: fix erorr message popover 2018-08-29 14:50:34 +12:00
Kelly Dwan e19aff2169 Components: Add a search component based on Autocomplete (https://github.com/woocommerce/woocommerce-admin/pull/322)
* Add `Search` & `Tag` components

* Fork the Autocomplete component to support a single completer & input field

* Add results inline, not as popover

* Highlight search term in results list

* Check if the item is already selected

* Update docs

* Remove unused properties

* Remove temporary max-width

Once merged, we can tweak real styles

* Use stringifyQuery
2018-08-28 15:15:24 -04:00
Kelly Dwan 4e995590db Store: Add product API + state handlers (https://github.com/woocommerce/woocommerce-admin/pull/321)
* Add product state

* Add products store tests
2018-08-28 14:43:26 -04:00
David Levin c06c3b0cef Merge pull request woocommerce/woocommerce-admin#318 from woocommerce/update/datepicker-styles-updates
Updates to presets / custom toggle and segmented selection
2018-08-23 12:15:59 -07:00
David Levin c39e6f1edb style updates per review 2018-08-23 11:21:04 -07:00
Kelly Dwan d007105ec1 Animation mixin + add `prefers-reduced-motion` support to existing animations (https://github.com/woocommerce/woocommerce-admin/pull/317)
* Add mixin to control transform animation

* Add `prefers-reduced-motion` support to animations

* Fix duration variable
2018-08-23 13:47:27 -04:00
David Levin c835432c88 Updates to segmented selection and presets / custom toggle 2018-08-22 19:07:19 -07:00
Kelly Dwan 4b30e78ae6 Filters: Remove `filterpaths` props (https://github.com/woocommerce/woocommerce-admin/pull/315)
* Filters: Remove filterPaths, add path as property to filters object

* Set a default path, so we only need to configure it for changed paths

* Fix nav & filter fetching for nested lists

* Add “go back” functionality to all subfilter lists, not only ones with components set

* Make label optional on component options

* Update documentation to remove mention of filterpaths

* Add documentation on the filters structure
2018-08-22 16:20:19 -04:00
Kelly Dwan 14e4aa11dd Fix the summaryNumber display when in toggle-button state (https://github.com/woocommerce/woocommerce-admin/pull/313)
* Fix the summaryNumber display when in toggle-button state

* Fix right border
2018-08-22 14:08:48 -04:00
Timmy Crawford af928f6773 Store: Add generic reports stats support. (https://github.com/woocommerce/woocommerce-admin/pull/307)
* Store: Add generic reports stats support.

* Updates per feedback.

* Change format and export reducer
2018-08-22 10:54:48 -07:00
David Levin f9eea91eed Add transition to chevron 2018-08-22 07:50:10 -07:00
David Levin ad5e661f8a Updated dropdown button styles 2018-08-21 21:44:01 -07:00
Kelly Dwan f36d89cfaf Add path & query back to filter props (https://github.com/woocommerce/woocommerce-admin/pull/308) 2018-08-21 15:03:20 -04:00
Kelly Dwan 39ca2cc627 Remove apiRequest in favor of apiFetch (https://github.com/woocommerce/woocommerce-admin/pull/309) 2018-08-21 15:02:49 -04:00
Timmy Crawford f4814ee46f Merge pull request woocommerce/woocommerce-admin#306 from woocommerce/update/revenue-chart
Revenue Report: Use href on SummaryNumber components.
2018-08-21 08:44:29 -07:00
Kelly Dwan 6ce012a2e7 Extensions: Add filter to allow third-party registration of reports (https://github.com/woocommerce/woocommerce-admin/pull/298)
* Create page helper function

* Enable filtering of report content for extensions to inject new reports

* Add error boundary

* Add documentation for the reports filter
2018-08-20 17:24:17 -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
Timmy Crawford f555fed33a Revenue Report: Use href on SummaryNumber components. 2018-08-20 13:40:17 -07:00
Timmy Crawford 11524e19e1 Merge pull request woocommerce/woocommerce-admin#304 from woocommerce/add/revenue-chart
Analytics: Add Chart to Revenue Report
2018-08-20 09:30:04 -07:00
Timmy Crawford 9033d88b84 Remove trailing slash. 2018-08-20 09:23:33 -07:00
Timmy Crawford 1355f4a813 no package lock plz 2018-08-17 15:49:23 -07:00
Timmy Crawford 85e428c2d4 Analytics: Add Chart to Revenue Report. 2018-08-17 15:47:54 -07:00
Timmy Crawford 8a90563690 Dashboard: Use isNumeric in Top Selling Products. 2018-08-16 16:42:32 -07:00
Kelly Dwan 0286bd9109 Apply scope only to the row headers (https://github.com/woocommerce/woocommerce-admin/pull/300) 2018-08-16 10:37:10 -04:00
Justin Shreve 4397ce8271 Add Revenue Report API/data-layer (https://github.com/woocommerce/woocommerce-admin/pull/293)
* Adds data layer functions for fetching the revenue report API

* Handle PR feedback: jsDoc updates, create query string util function, api namespace constat.

* Serialize query args in a consistent order
2018-08-15 09:44:49 -04:00
Robert Elliott 410104a5cd Merge pull request woocommerce/woocommerce-admin#291 from woocommerce/add/chart-title
D3 Chart Component: add title
2018-08-15 09:24:30 +02:00
Kelly Dwan c16be4d061 Add ReportFilters Component
Add new function to merge query params into a given path

Add a new ReportFilter component, which extracts the date picker & filter picker

Add basic framework for product search

Add new AdvancedFilter to filter options

Remove duplicate CSS

Use library function for merging new query+path

Move filters folder out of reports

Use filter constant

Add README

Add path & query helper functions

Move filters into component folder

Switch to getPath/getQuery helpers

Update classes & merge styles

Remove query/path from READMEs

Add a readme to nav-utils
2018-08-15 11:15:30 +12:00
Justin Shreve d4751e2c73 Fix Column Toggle Error (https://github.com/woocommerce/woocommerce-admin/pull/296)
* Fix column toggle error

* Use rows prop from props, preventing unnecessary re-rendering
2018-08-14 12:43:35 -04:00