Commit Graph

6 Commits

Author SHA1 Message Date
Kelly Dwan 2a00a897d5 Components: Move SearchListControl to woocommerce/components (https://github.com/woocommerce/woocommerce-blocks/pull/442)
* Switch to using the SearchListControl from woocommerce/components

* Remove unused mixin
2019-02-21 13:07:08 -05:00
Kelly Dwan ba8ce223cf Use em-dashes to indent child categories/attributes instead of padding (https://github.com/woocommerce/woocommerce-blocks/pull/265) 2018-12-19 17:34:28 -05:00
Kelly Dwan b8bdc2bf27 Category Selection: Add hierarchy support for nested categories (https://github.com/woocommerce/woocommerce-blocks/pull/179)
* Add buildTermsTree to handle hierarchical list input

* Append items if their parent is not in the given list

* Add `breadcrumbs` property to hierarchical list

* Display the “breadcrumbs” parent categories when searching

* Use display properties

we’re providing alternative text for screen reader users, so we can just toggle display values for the prefix

* Add all parent categories to name provided for screen readers

* Display parent category when parent is a currently selected item

* Add the depth class to items in defaultRenderItem

* Add a test for a hierarchical item list

* Clean up hierarchy docblock & commented-out code

* Update proptype

* Update depth CSS so we still indent very nested categories
2018-11-30 16:37:58 -05:00
Kelly Dwan 4ac52b3cf3 Create a reusable search + list control for category selection (https://github.com/woocommerce/woocommerce-blocks/pull/166)
* Add new components for ProductCategoryControl, using a reusable SearchListControl

* Add sass variables from wc-admin

* Finish styling

* Save selected categories as selected for the block

* Style sidebar version of control

* Filter the categories list, highlight search term in result

* Filter out selected items in the filter list function

* Add spacing in the placeholder, remove unnecessary stylesheet

* Add a more descriptive label for screen readers

* Remove category references from list item options

* Switch to a configurable object of messages, so SearchListControl can be more customizable

* Add screen-reader message for toggling “done” and moving into preview

* Remove call to getProductCategoryControl

The component is simple enough to just drop in now :)

* Add documentation for all props

* Add padding to placeholder

* Rename fallbackrenderItem to defaultRenderItem

* Add a variable to save the selected count

* Add `isDestructive` to make link red

* Update item style

* Add a hover/focus background color
2018-11-29 13:10:08 -05:00
Kelly Dwan 6a50ebde8b Adds continuous integration testing with travis (https://github.com/woocommerce/woocommerce-blocks/pull/156)
* Add travis to run JS & CSS linting, JS tests, and PHPUnit tests

* Move API initiation out of the gutenberg/files check

So that php tests run without having to build the JS files

* Add very basic product endpoint tests

* Fix stylelint issues in CSS

* Remove e2e setup, replace with dependency setup

* Add missing install step

* Remove cache for now

* Add specific `har-validator` dependency because v 5.1.2 has disappeared

* Only run npm install for the JS test job

* Check for installed plugins

* Update install location

* Fix typo in plugin name

* Check the BRANCH variable, rather than TRAVIS_PULL_REQUEST_BRANCH, which is only set on PR runs

* Remove debug command

* A change to trigger CI

* Set the expected node & npm versions

* Remove copy-pasted command, does not apply
2018-11-27 12:12:48 -05:00
Kelly Dwan c98e607a6f Add the "edit mode" toggle to the product category block (https://github.com/woocommerce/woocommerce-blocks/pull/144)
* Add sass mixins and variables

* Add an edit mode toggle, with the ability to choose categories

* Only add align classes when align is defined
2018-11-21 11:33:21 -05:00