* Update Table components to align texts and numeric a bit smarter
Text fields are left-aligned and numeric values should be right-aligned.
* Update a snapshot test
npm run test:client -- --updateSnapshot client/analytics/components/leaderboard/test/index.js
* Add tests for property isLeftAligned
* Do not retain values when switching between rules in the DateFilter component
* Add changelog entry
* Remove unnecessary use of the ternary operator
* Fix the changelog entry
* Add tests
* Add changelog entry
Co-authored-by: Chris <chris.aprea@automattic.comchris.aprea@automattic.comchris.aprea@automattic.com>
* Add `hidden` legendPosition to `Chart`.
Sometimes, for example, when there is a single data set, there is no need for rendering the legend. It may even introduce more confusion than value. It seems interactive, but there is nothing you can do with it.
Fixes: https://github.com/woocommerce/google-listings-and-ads/issues/618
* Add `@storybook/addon-knobs` to devDependencies.
It was used but not explicitely stated.
* Add a changelog entry.
* Add tests for legendPosition in Chart component
Co-authored-by: Lourens Schep <lourensschep@gmail.com>
The deprecated (but not removed) `onChangeCallback` and `onSubmitCallback` props were not being called because of an error in the logic that checked for presence of the new callbacks (it was always truthy due to it having a fallback to an empty function).
This reverses the logic so that if the deprecated props are provided they will be called, if the new props (only) are provided they will be called instead.
This also pushes the removal of these back to 9.0.0, because in the past these deprecated version numbers had little thought behind them, but this gives a more realistic time frame for removal and an understanding that a *major* version will break compatibility, not a patch version as the old version number suggested.
* Add TableSummaryPlaceholder
* Expose TableSummaryPlaceholder to package @woocommerce/components
* Add test instructions and changelog entries to MD files
* Add tests for TableSummaryPlaceholder
* Add storybook for TableSummaryPlaceholder
* on Filter update, keep all queries
* changelog
* package changelog
* instead of keeping everything else, remove advancedFilters when main filter is set to 'all'
* remove all queries associated with filter in question
* dedupe params
* add tests
* Use order item data to match attributes.
Fixes matching on products with "any x" attributes.
* Fix attribute query on variations report.
* Fix variations report item count.
* Add test coverage.
* Add changelog entry.
* Fix non-string query prop warning in SelectControl component.
* Move custom attribute retrieval to a reusable Trait.
* Ensure all custom attribute terms are included in the API response.
* Combine all terms from custom attributes.
When they're split across multiple products.
* Updated mobile banner icon with cross-small gridicon
* Update analytics dashboard icons, removing use of dashicon
* Remove use of dash icon in tag component
* Remove dash icon from ellipsis menu
* Remove use of dashicon in calendar
* Update icon imports and remove use of Dashicon in collapsible list
* Remove Dashicon usage from store alerts as it is depreciated
* Remove dashicon usage in shipping label
* Fix up old css for icons
* Removed dashicon usage in favorite button
* Update the wordpress/icons package
* Add changelogs
* Fix broken test
- Forward `autocompleter` prop from `CompareFilter` to `Search`.
Allow, to use the `custom` type of search,
previously it was complaining about lack of `autocompleter`,
even though it was provided.
- Move `path` in Storybooks example to a parameter, to allow setting it in unit tests.
- Add few tests for FilterPicker.
- it renders the basic storybook example without throwing an error
- it forwards `autocompleter` & `type` props
Fixes: woocommerce/woocommerce-admin#6890
* Fix select-control component to preserve currently selected item on focus and de-focus
* No longer auto select option on initial render, pressing tab would only select if selection exists
* Fix to reflect the proper suggested changes
* Attempt to fix unnecessary search reset on pressing tab
* Fix for keyboard interactions and added accompanying tests
* Prototype the basic functionality of the list collapse component.
* Further work on the component.
* Add icons and some basic styling. Fix exports to include 'Experimental'
* Add CSSTransition to collapsible list item
* Add tests for collapsible component
* Add changelog
* Add collapse/expand callbacks
* Add tests for callbacks
* Replaced collapsible list item with a collapsible list instead
* Updated to use calculated height versus absolute height
* Removed fallback and removed animation from collapse footer
Co-authored-by: Lourens Schep <lourensschep@gmail.com>
* Add a Basic test for FilterPicker.
Test that it renders the basic storybook example without throwing an error.
Move `path` in Storybooks example to a parameter, to allow setting it in unit tests.
* Forward `autocompleter` prop from `FilterPicker` to `Search`.
Allow, to use the `custom` type of search, previously it was complaining about lack of `autocompleter`, even though it was provided.
Fixes: https://github.com/woocommerce/woocommerce-admin/issues/6062.
* Add changelog entry.
* Move `FilterPicker` config creation closer to tests that use it.
* Remove unused type prop from `FilterPicker` tests.
Addresses https://github.com/woocommerce/woocommerce-admin/pull/6880/files#r620285400.
* Add changelog note also to `CHANGELOG.md`.
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
* Create the new experimental list, default to rendering it when items are not supplied.
* Remove typings from the List, ListItem.
* Add react-transition-group as dependency.
* Fix warnings by wrapping with CSS transition, pass down props from List.
* Remove type annotations left in list-item.
* Duplicate some styles in the higher level woocommerce-list-item element, to make them work in the new list.
* Fix accessibility issues, adjust the role logic
* Add more testing of the roles logic.
* Mark the old list stories as deprecated, add a basic story for the new style.
* Expose ListItem without Experimental in the name.
* Remove some redundant code changes.
* Fix linting issues
* Add types package.
* Cast the type of children to TransitionGroup.
* Adjust the list to assume a purpose of being a list of links.
* Adjust the tests for the new behaviour.
* Fix css mangled by prettier.
* Fix types that are optional.
* Rework the list item.
* Export new list as experimental, fix accessibility styles and deprecation notice.
* Make the basic transition opt-in.
* Update classnames to get types.
* Add tests, adjust behaviour for css disable.
* Fix css lint, remove types/classnames, update tetsing-library/user-event.
* Fix the basic story for ExperimentalList.
* Conditionally add keyDown and role based on onClick handler. Adjust tests to new behaviour.
* tabIndex only on hasAction
* Update the package-lock
* Add changelog
* Fix transition styling
Co-authored-by: Paul Sealock <psealock@gmail.com>
Co-authored-by: Lourens Schep <lourensschep@gmail.com>
* Making experimental package public, and updating the dependency versions
* add experimental to webpack and make explat public
* bump DEWP package version
* use filepath for inter package dependencies
* load experimental script
* remove check for experimental
Co-authored-by: Sam Seay <samueljseay@gmail.com>
Co-authored-by: Paul Sealock <psealock@gmail.com>
* Add dompurify and md5 to @woocommerce/components dependencies list
* Add changelog entry
* Add @woocommerce/experimental to @woocommerce/components dependencies list
* Update changelog entry
* WIP add details prop to summary number component. New optional prop to add additional information at the bottom.
* Update component readme and stories to include new prop
* Revert commits to use children instead of a new prop
* Render optional summary number component children
* Typo fix, doc improvement and add entry to changelog
* Add readme.txt entry
* Update select control logic so value type stays consistent
* Added test cases for updated changes
* Add changelog
* Removed the use of lodash 'findIndex' using the native one instead
* Added onChange update to readme
* Update old versions of lodash in packages
* Add changelog entries
* Move lodash to peerDependencies in components package
* Fix broken JSON
* Fix lodash defined twice in components package
* Move lodash to peer dependency in date package
* Move lodash to peer dependency in navigation package
* Move lodash to peer dependency in notices package
* Relax lodash version constraint in components package
* Update package changelogs
* Change from MenuGroup to label
* Remove icon
* Remove icon folder
* Update input style
* Remove list message
* Run test snapshots
* Add single knob
* Add changelog
* Change to wrap list with ul
* Run snapshots test
* Add styling on li
* Move renderList outside of li to prevent nesting
* snapshots test
* Add isCompact prop to SearchListControl
* Add left and right borders to search list
* Remove box-shadow when search list items are focused/active
* Add Changelog notice
* Update snapshots
* Add product attributes autocomplete for Search control.
* Support single selection in Search component.
* Fix SelectControl input after selection in single mode.
* Remove label from Search component's inner SelectControl.
Placeholder is the behavior we want to avoid label and selection collision.
* Match Search component selected prop to SelectControl.
It's passed through anyhow.
* Rework attribute filter to use new endpoints for custom terms.
* Hook up custom attribute filter to report queries.
* Fix errant space in filter name.
* Fix SelectControl active status when control is disabled.
* Fix SelectControl "has tags" logic for non-multiple use cases.
* Fix attribute filter screen reader text.
* Update changelogs.
* Move custom attribute test to it's own function.
* Remove SelectControl input disabling.
This was supposed to improve keyboard behavior for non-multiple controls, but it was questionable.
* Fix backspace in attribute term field.