Commit Graph

225 Commits

Author SHA1 Message Date
Kelly Dwan 2bea232494 Import compose from `wordpress/compose` (https://github.com/woocommerce/woocommerce-admin/pull/278)
As of Gutenberg 3.3, compose is in its own package - element.compose is deprecated
2018-08-06 17:33:55 -04:00
Kelly Dwan 4c2797d6cf Table: Add "required"/"sortable" meta to headers/columns (https://github.com/woocommerce/woocommerce-admin/pull/275)
* Switch headers to an object, use `header.label` to display title

* Change sort function to update a query param

* Clean up README

* Get the currently sorted column from the query

* Don’t allow toggling of required columns

* Add in direction-sorting (ascending/descending)

* Switch to aria-describedby so that the actual column name is read aloud

* Fix chevron orientation

* Handle hiding a sorted column

* Fall back to sorting by first item if no defaultSort col is set

* Fix arrow orientation again

* Update order_by to orderby to match wp_query param name
2018-08-06 13:01:41 -04:00
Kelly Dwan 8141a9f66d Update/table component (https://github.com/woocommerce/woocommerce-admin/pull/251)
* Update mock data to reflect latest API format

* Update Table component to create a TableCard, TableSummary, and plain Table

Use the TableCard container to display mocked revenue data

* Add horizontal scroll only on the table itself

* Remove `sortable` prop, base column sortability on whether the `value` is true/false

Checking against a strict false should prevent any real 0 or ‘’ values from triggering unsortability

* Add a checkbox to the demo table

* Update accepted props

* Update README for TableCard, Table, and TableSummary

* Update README

* Fix confused defaults
2018-08-01 12:00:45 -04:00
Paul Sealock 735dfcd272 Merge pull request woocommerce/woocommerce-admin#239 from woocommerce/fix/calendar-component
Datepicker: Refactor Calendar to fully controlled component
2018-07-31 11:10:20 +12:00
Kelly Dwan 727654ff3b SummaryNumber Component: Update to latest hifi design (https://github.com/woocommerce/woocommerce-admin/pull/237)
* Add first pass + demo of updated SummaryNumber

* Add new larger screen breakpoint

* Remove the max-width from the content wrapper

* Update previous label text

* Fix the border colors/sizing

* Create a mixin to generate the grid template pattern

* Add green/red colors based on trend, with prop to reverse

In some cases, a downward trend is good (ex, refunds), so we want to be able to color those green

* Move selected number containers up to avoid the double-border

* Document className logic, and apply 10-item layout to all cases of 10+ items

* Remove layout notes

* Update component docs, clean up optional displays

* Update style of SummaryNumbers inside cards

* Filter out any `false` or otherwise unrenderable children

* Fix card borders

* Update dashboard component to use new props

* Check that prevValue is defined

a prevValue of 0 was incorrectly outputting `0` for both label and value

* Update no-change datapoint style

* Update default data values

Rather than hiding the prevValue/label or delta section if these are not passed through, use default N/A placeholders

* Change SummaryList & SummaryNumber to a list of links

Add active, hover, and focus styles

* Add a short help text for screen reader users

* Add href to README

* Add the href prop to the readme example

* Fix border colors

The `nth-of-type` rules need to be on the `li` containers

* Fix font-weights on value & delta

* Wrap the previous label/value when the percentage wraps
2018-07-30 11:14:09 -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 0df86cb6f6 Datepicker: Refactor Calendar to fully controlled component 2018-07-30 11:11:52 +12:00
Paul Sealock 31c055fd57 Component: Filter Picker 2018-07-17 12:25:00 +12:00
Kelly Dwan 96925f77fa Component: Fix rows prop in Table (https://github.com/woocommerce/woocommerce-admin/pull/193)
* Move component lifecycle method to top of component

* Update rows if the rows passed in via props have changed

This lets us bring in API changes, but will wipe out any sorting (revisit in a later PR, perhaps)

* Pass rows through to Table even if we don’t have rows loaded yet

Adds todo comment to remind that we should come back to add a placeholder/loading state
2018-07-13 15:36:41 -04:00
Justin Shreve 71c12e6795 Update woo-dash naming to new wc-admin name (https://github.com/woocommerce/woocommerce-admin/pull/183) 2018-07-10 08:48:06 -04:00
Paul Sealock a4305347ce Datepicker: Add styles 2018-07-03 11:41:38 +12:00
Justin Shreve d604f3625c Rename sidebar to activity-panel, and refactor code and behavior. 2018-06-28 09:52:45 -04:00
Timmy Crawford 88e1764720 Use swagger data in table. 2018-06-26 15:17:05 -07:00
Timmy Crawford 474f3ac5d0 use formatCurrency and update the utility to default to the WC settings currency 2018-06-26 14:39:29 -07:00
Timmy Crawford e20ccf1fe1 Use swagger mock endpoints to fetch data. 2018-06-26 14:25:42 -07:00
Justin Shreve ba68ada59d Add Pagination Component (https://github.com/woocommerce/woocommerce-admin/pull/117)
* Add pagination component

* Refactor query string/route updating so it can be done using a nav-utils helper function

* Fix typo and adjust accessibility attributes for error handling and current page

* Update styles
2018-06-26 10:59:35 -04:00
Kelly Dwan b1c2b3fdc4 Add Table component (https://github.com/woocommerce/woocommerce-admin/pull/118)
* Update package-lock

* Add data table component

* Add fake data & display revenue on the analytics test report

* Update styling

* Display table inside a card

* Update mock data to be easier to scan for testing ascending/descending

* Fix sorting function to correctly sort all columns

* Check column content before determining “sortability” — objects (links) are not sortable

* Update README

* Add translation to scroll helper text
2018-06-20 11:09:37 -04:00
Timmy Crawford 652fdd8be1 Add support for different report components, and create revenue report component. 2018-06-14 13:15:11 -07:00
Kelly Dwan bc084b7302 Add Summary Number/Performance Tile component (https://github.com/woocommerce/woocommerce-admin/pull/109)
* Add SummaryList and SummaryNumber components

* Add a demo of SummaryList/SummaryNumbers

* Pages without the sidebar displayed can use a larger max-width

* Adjust layout styles for smaller screens
2018-06-14 11:16:57 -04:00
Paul Sealock b25fdc3f31 DatePicker: Add url support and container 2018-06-05 10:20:25 +12:00
Justin Shreve e110283997 Set document title (https://github.com/woocommerce/woocommerce-admin/pull/79)
* Set the document title based on header sections

* Set dashboard default title via PHP to avoid a title switch
2018-05-24 12:03:03 -04:00
Paul Sealock ee5e314668 Merge pull request woocommerce/woocommerce-admin#63 from woocommerce/add/segmented-selection
Component: add segmented selection
2018-05-24 11:19:21 +12:00
Paul Sealock 631ce420a4 Component: add segmented selection 2018-05-24 11:14:19 +12:00
Justin Shreve d4ade607d8 Add agenda widget base and related components (https://github.com/woocommerce/woocommerce-admin/pull/57)
* Add agenda widget with accordion

* Add AgendaItem, README, and do some cleanup

* Handle PR Feedback: Rename AgendaAccordion to AgendaGroup, accept an href prop for a non-accordion state. Accept onClick or href for AgendaItem, a11y fixes, fix some typos, update examples & README.

* Address PR Feedback: Rename AgendaGroup to AgenaHeader, use a direct link for href mode, use IconButton instead of Button & Dashicon, pull out link rendering to its own method. Use <Link /> for app links.

* Combine box-shadow focus/hover rule and add transparent background

* Make `count` optional
2018-05-22 11:19:56 -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