Commit Graph

57 Commits

Author SHA1 Message Date
Kelly Dwan 62276fb361 Add visual component docs from markdown examples (https://github.com/woocommerce/woocommerce-admin/pull/470)
* Remove content from README, leaving only the example

* Rename edited READMEs

* Add a devdocs page rendering from markdown example files

* Add more components to devdocs

* Add the rest of the component examples

* Add navigation to single components, show generated readme on single component view

* Style devdocs like calypso

* Split devdocs into two columns at “desktop” sizes

* Update segmented selection example

* Update link

* Add header to avoid notices error
2018-09-24 11:36:35 -04:00
Albert Juhé Lluveras 31289e8c82 Transpose and update format of chart tooltip dates (https://github.com/woocommerce/woocommerce-admin/pull/467)
* Fix dates transposed in revenue chart

* Update date format in revenue chart tooltip labels

* Load point label date formats from lib/date

* Pass point label format as a prop to the chart component
2018-09-24 13:11:18 +02:00
Albert Juhé Lluveras ccde0effe2 Remove opacity property from chart tooltip title styles (https://github.com/woocommerce/woocommerce-admin/pull/466) 2018-09-21 17:03:06 +02:00
Albert Juhé Lluveras a18a9cd89a Update tooltip title and labels in standard graphs (https://github.com/woocommerce/woocommerce-admin/pull/458)
* Allow adding a label for each specific point in a chart

* Update test fixtures

* Update README with new data format

* Simplify getPreviousDate function code

* Update tooltip dates format

* Add new prop to charts 'tooltipTitle' to override the date tooltip title

* Fix totals not being calculated in charts legend

* Fix JS error when hiding lines in chart

* Fix a couple of issues with chart README

* Add quotes around prop names

* Remove unused variable

* Remove colon after tooltip label
2018-09-20 16:28:22 +02:00
Albert Juhé Lluveras 18be372cad Increase contrast of the tooltip title color (https://github.com/woocommerce/woocommerce-admin/pull/460) 2018-09-20 16:21:21 +02:00
Albert Juhé Lluveras a877f45471 Change default date format for chart tooltips (https://github.com/woocommerce/woocommerce-admin/pull/459) 2018-09-20 16:21:03 +02:00
Albert Juhé Lluveras 5e87febf04 Chart Legend: Update checkbox styles to outline when unchecked (https://github.com/woocommerce/woocommerce-admin/pull/426)
Chart Legend: Update checkbox styles to outline when unchecked and add focus state
2018-09-19 16:41:13 +02:00
Albert Juhé Lluveras d5657c879d Make buttons to switch between bar and line chart accessible (https://github.com/woocommerce/woocommerce-admin/pull/422)
* Make buttons to switch between bar and line chart accessible

* Use better ARIA roles for line/bar chart buttons
2018-09-18 16:53:55 +02:00
Albert Juhé Lluveras 9d5cd880dd Don't allow unselecting all items in chart legends (https://github.com/woocommerce/woocommerce-admin/pull/427)
* Don't allow unselecting all items in chart legends

* Add correct color to chart legend labels

* Add tests for chart legend enable/disable items logic
2018-09-18 16:53:30 +02:00
Robert Elliott e79a4b9025 remove he package and rename uniqueDates to ticks 2018-09-17 11:07:11 +02:00
Robert Elliott ddc2645bef check if second x axis tick required 2018-09-14 10:49:07 -07:00
Robert Elliott ac8952d7ec Component - Chart: factorial spacing of x-axis ticks (https://github.com/woocommerce/woocommerce-admin/pull/398)
* remove circles on more than 50 x points

* x-axis interval spacing

* factorial spacing of x-axis ticks

* limit pipes too

* catch recursion infinity issue and add layout
2018-09-14 10:43:53 -07:00
Timmy Crawford 8eb0906287 Chart: Add styling needed to not be wrapped by card. (https://github.com/woocommerce/woocommerce-admin/pull/408)
* Chart: Add styling needed to not be wrapped by card.

* Add negative top margin back

* Fix placeholder css.
2018-09-14 09:17:39 -07:00
Albert Juhé Lluveras 5669eb4b1a Make it possible to navigate charts with the keyboard (https://github.com/woocommerce/woocommerce-admin/pull/399)
* Hide tooltip when mouse leaves chart bars

* Allow focus on chart lines/bars and show tooltip

* Extract position calculation to a function

* Make columns focusable instead of individual points in line charts
2018-09-14 14:57:09 +02:00
Robert Elliott a08cb0dd70 remove d 2018-09-14 11:57:50 +02:00
Robert Elliott 45089c1602 2nd x-axis format 2018-09-14 11:53:54 +02:00
Robert Elliott abe27333ae remove uncommented style 2018-09-12 15:24:45 +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
Justin Shreve baf44d030f Add interval handling to the revenue report. 2018-09-12 12:28:25 +12:00
Robert Elliott 4d155cd015 line and bar icon buttons 2018-09-11 13:10:36 +02:00
Robert Elliott 4242a64f30 add smallcolorscale fractions for chromatic scaled colors 2018-09-10 15:59:14 +02: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
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
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 0f66375b88 updated from feedback 2018-09-06 17:58:24 +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 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
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 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
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 9d19bc66c0 Layout: Fix spacing on Card component (https://github.com/woocommerce/woocommerce-admin/pull/283) 2018-08-13 11:24:48 -04:00
Robert Elliott 662c36e5e7 use gap 2018-08-13 13:27:15 +02:00
Robert Elliott f08a724f48 add title 2018-08-13 13:09:44 +02:00
Robert Elliott 9b9dbde858 bg button for safari and right margin 2018-08-13 12:32:08 +02:00
Robert Elliott 3c9b5dd166 fix some testy black hole color scale oddities 2018-08-13 12:24:11 +02:00