Commit Graph

14 Commits

Author SHA1 Message Date
Joshua T Flowers 0f5ab33ffe Update sorted column background color (https://github.com/woocommerce/woocommerce-admin/pull/571) 2018-10-18 14:45:06 -04:00
Joshua T Flowers 698d48a7b6 Update checkbox column styling (https://github.com/woocommerce/woocommerce-admin/pull/572)
* Add cellClassName option so we can pass class names to cells

* Add styling for checkbox columns
2018-10-18 14:24:31 -04:00
Joshua T Flowers d611817fc7 Change componentDidUnmount to componentWillUnmount (https://github.com/woocommerce/woocommerce-admin/pull/563) 2018-10-17 19:12:04 -04:00
Joshua T Flowers 5deecbb6ba Add table shadow element to tables (https://github.com/woocommerce/woocommerce-admin/pull/546)
* Add table shadow element to tables

* Update table shadow bg color

* Remove redundant styles

* Remove unused ref

* Update shadow relative to container table body

Use the container body so we don't have to update the transform on scroll for the table shadow.  Prevents jankiness on low-end devices

* Move table shadow to pseudo element
2018-10-17 17:56:09 -04:00
Albert Juhé Lluveras 9623898acd Add Orders table (https://github.com/woocommerce/woocommerce-admin/pull/493)
* Create Orders table

* Remove getOrderIds selector

* Create an OrdersReportTable component

* Alphabetically order extracted props

* Fix JS error for missing coupon properties

* Add TODO comment for missing customer type

* Add calculation for net revenue

* Align all table cells but identifier to the right

* Remove temporary text

* Improve cell link inline CSS

* Count several purchases of the same product as items sold

* Add TODO message to coupon link

* Add Download to Orders table

* Don't use camelCase for table column keys

* Cleanup

* Make products and coupons columns non-sortable

* Create renderList method to simplify products/coupons list creation

* Display correct currency for each order

* RTL table fixes

* Fix: products and coupons columns showing 'false' in CSV download

* Minor fixes

* Rename 'isIdentifier' with 'isLeftAligned' in table columns

* Remove toggleStatus method
2018-10-11 10:30:51 +02:00
Kelly Dwan f5dd2559db Documentation: Move topic READMEs into docs for discoverability (https://github.com/woocommerce/woocommerce-admin/pull/469)
* Move header/row documentation into the component, so it can be rendered in the external docs

* Move project READMEs into docs folder for exposure in docs site

* Regenerate docs, generate component folder sidebar with component list

* Update format of CSS docs
2018-09-24 11:22:14 -04:00
Kelly Dwan f2e0165d5f Component – Table: Add compare checkboxes (https://github.com/woocommerce/woocommerce-admin/pull/389)
* Switch to withInstanceId higher order component

* Add checkboxes to the rows in a TableCard, if a compareBy prop is set

* Add Compare button to update query param

* Populate the selected rows from the query parameter

* Update compare filter display & selected table rows when the query changes

* Skip displaying tags if the label is null/undefined

* Style table header with compare button, search placeholder

* Prevent setting just an ID list as the state, as this will wipe out already-fetched tag labels

* Update docs

* Shortcut out of fetching tag labels if the query is empty
2018-09-18 10:12:13 -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
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
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 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
Kelly Dwan ff8217165d Table: Update style to match design (https://github.com/woocommerce/woocommerce-admin/pull/289)
* Table: Add a hover state for rows

* Expand target area for table links to take over entire cell

* Add a purple link style for default links

* Increase contrast for links-on-hover-color

* Add “isNumeric” column identifier & right-align these cols
2018-08-13 11:25:32 -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