Commit Graph

44 Commits

Author SHA1 Message Date
Jeff Stieler 5fbc511f25 Don't directly import from React, use @wordpress/element. (https://github.com/woocommerce/woocommerce-admin/pull/4978) 2020-08-13 08:29:29 -04:00
Paul Sealock c145783e0a Fix dependency declarations (https://github.com/woocommerce/woocommerce-admin/pull/4972)
* renmove WC comment block

* client routes

* more fixes

* moar search

* getting there

* by hand now

* david beating goliath

* mission accomplished

* client filepath

* save

* got it

* remove script

* fixes

* deal with package internal dep

* remove webpack alias

* fix webpack relative paths

* remove commented rule

* remove extra line

* remove unused modules entry
2020-08-13 14:05:22 +12:00
Darren Ethier dc5304823b Add @woocommerce/eslint-plugin (https://github.com/woocommerce/woocommerce-admin/pull/4714)
* add new woocommerce/eslint-plugin

* implement eslint-plugin (switch scripts to use wp-scripts etc)

* various linting fixes

* more lint fixes

* improve fix script

* more eslint fixes

* more eslint fixes

* temporary convert rules to warnings until they are all handled

* linting fixes

* update package-lock.json

* remove duplicates

* remove unnecessary `@wordpress/dependency-group` rule config

* add docs and adjust rules

* prettier fix

* fix merge artifact

* convert more rules to warnings

* change order to reflect importance

* install babel-preset-default

* remove unnecessary configuration for babel

* fix dependency group rule and test

* fix test

* handle collapsible whitespace

* add react testing library eslint plugin

* linter errors

* Add back in prettierrc

* package-lock update

* js lint fix with --fix

* disable whitespace in translation

* package-lock update

* make eslint actual dependency, not peer dependency

* pin eslint to v7

* I don't know why, but its working

* fix lint js

Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-07-28 14:32:58 +12:00
Bec Scott 551dfe1f0c Pills and tooltips in product step of OBW (https://github.com/woocommerce/woocommerce-admin/pull/4707)
* Add monthly product prices to OBW

* Remove description for physical and download products

* Use pills in product selection step of OBW

* Add missing translation wrapper, also convert some spaces to tabs

* Add pill to changelog

* Change pills to medium gray text and border

* Make everything line up correctly on smaller viewports

* Get the styles closer to the design

* Breakpoint to set font size to 11px

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-21 14:27:32 +10:00
Sam Seay b448ff60b7 Update @wordpress/base-styles and replace deprecated variables (https://github.com/woocommerce/woocommerce-admin/pull/4759)
Fixes woocommerce/woocommerce-admin#4732

This updates `@wordpress/base-styles`, and because `@wordpress/components` depends on variables from it, that must be updated as well.

There are 3 major changes required as part of updating:

1. The $theme-color variable is no longer exposed by base-styles. Instead there are 3 css vars exposed. These are made available by use of a provided mixin. Situations where $theme-color was darkened using scss have been mapped as best as possible to the 2 other darkened shades of the css var that are available such as `--wp-admin-theme-color-darker-20` and `--wp-admin-theme-color-darker-10`. In some cases this means the colors are not exactly the same as before.

2. The post css `theme()` call is no longer available. All uses of this have been consolidated to use of the main theme css var `--wp-admin-theme-color`. This means that calls like `theme(secondary)` or `theme(outline)` etc have all been consolidated to the one color.

3. Many of the variables used for different shades of gray have been deprecated. These have been mapped across to the new gray variables. (Mapped according to the list described in woocommerce/woocommerce-admin#4732)
2020-07-17 12:11:42 +12:00
renovate[bot] d724d5fa68 Update dependency raw-loader to v4 (https://github.com/woocommerce/woocommerce-admin/pull/3735)
* Update dependency raw-loader to v4

* Fix markdown require to use default export.

Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
2020-02-20 11:38:28 -08:00
Darren Ethier 33c5b41e3f Align WooCommerce javascript code standards/linting/styles with WordPress core. (https://github.com/woocommerce/woocommerce-admin/pull/3674)
* align code styles with the same configuration as Woo-Blocks

* initial pass of reformat-files

* applies manual fixes to various new linting errors surfaced by the configuration change.

* Fix state mutation in image-upload

* remove unused pre-commit-hook.js

* requestAnimationFrame -> window.requestAnimationFrame

* wc-api eslint changes

* eslint fixes on client/lib and client/settings

* client/header eslint changes

* fixes for client/dashboard part 1

* fixes client/dashboard part 2 of 2

* client/analytics part 1

* client/analytics continued

* client/analytics, last batch

* rename __mock__ directory

* pass in useEffect, useState from React component or function

* remove '+' from sprintf string argument

* use ref instead of findDOMNode

* reformat and repaply package.json changes

* install deps before running linter in Travis

* useGetCountryStateAutofill

* counryStateAutofill

* countryStateAutofill

Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-02-14 15:23:21 +13:00
Justin Shreve 448e1f3e11 Remove Newspack Dependency (https://github.com/woocommerce/woocommerce-admin/pull/3302)
* Switch to @wordpress/component's Button

* Finish button conversion

* Move to @wp/component's CheckboxControl

* Add  ImageUpload component

* Remove Newspack package

* CSS Cleanup

* Handle PR feedback: Fix tests, add ImageUploader basic test, fix FireFox/Safari Display issues, and  currency input bug
2019-12-02 12:39:22 -05:00
Joshua T Flowers b92500b35f Onboarding: Replace TextControl component (https://github.com/woocommerce/woocommerce-admin/pull/3020)
* Add TextControl component

* Replace instances of newspack TextControl
2019-10-10 07:00:33 +08:00
Joshua T Flowers 1563971836 Replace select controls with new SelectControl (Autocomplete) component (https://github.com/woocommerce/woocommerce-admin/pull/2997)
* Rename Autocomplete component to SelectControl

* Add isSearchable prop to SelectControl

* Remove SimpleSelectControl component

* Refactor list expansion and key behavior

* Bump changelog and version
2019-10-08 06:42:32 +08:00
Jeff Stieler e1ab60179d Fix DevDocs example render. (https://github.com/woocommerce/woocommerce-admin/pull/2962)
Incorrect changes chosen in a merge conflict resolution.
2019-09-25 12:23:49 -07:00
Ron Rennick 17abde4b18 add DevDocs for ScrollTo component (https://github.com/woocommerce/woocommerce-admin/pull/2873)
* add DevDocs for ScrollTo component
2019-09-25 09:47:40 -03:00
Darren Ethier d728d38219 Refactor: Alternative approach to implementing extendable settings from the server (https://github.com/woocommerce/woocommerce-admin/pull/2917)
* integrate with new asset data registration (php side)

- includes back-compatibility.

* update js configuration and implement settings alias

- this aliases `@woocommerce/wc-admin-settings` to the settings api exposed via blocks (either the blocks plugin or core) and all the settings provided via the server.
- Adds fallback for back-compat if `wc.wcSettings` is not available in the environment (fallsback to `wcSettings`).

* initial pass to update all wcSettings direct usage to the new api

- this is just an initial pass, more can be done in separate pulls.

* missed one spot for adding new filter implementation

* fix incorrect jest config

* Avoid unnecessary assignment and directly return.

* Remove unnecessary defaults

* Fix inline comment text case.

Co-Authored-By: Albert Juhé Lluveras <contact@albertjuhe.com>

* Remove unnecessary inline comment.

* use @todo instead of TODO

Co-Authored-By: Albert Juhé Lluveras <contact@albertjuhe.com>

* fix incorrect reference in webpack config.

* add missing import and slightly delay dependency injection for scripts

* update get-setting and set-setting callbacks

* disable lint rule for console.error on dev doc builds
2019-09-23 17:47:08 -04:00
Jeff Stieler 499365d5ef Fix direct linking to single components in DevDocs. 2019-09-06 11:52:19 -07:00
Jeff Stieler a0efb6967f Fetch component usage documentation from local README.md.
Format documentation like Calypso, include usage section.
2019-09-06 11:52:18 -07:00
Jeff Stieler 134f472484 Tweak styling of single component view in DevDocs. 2019-09-06 11:37:18 -07:00
Jeff Stieler 3d03faa887 Convert markdown JSX code blocks to actual JS files for component documentation. 2019-09-06 11:37:18 -07:00
Justin Shreve e67b556ac9 Update to Color Studio v2.1.0 (https://github.com/woocommerce/woocommerce-admin/pull/2837)
* Update color-studio to v2.1.0

* Handle additional color updates after rebase.
2019-08-29 12:07:56 -04:00
Jeff Stieler 56e74213a9 Show separate documentation for filter components. 2019-08-27 10:20:38 -07:00
Ron Rennick 8f9f44bac5 add explicit type to Link tags 2019-08-22 13:55:01 -03:00
Ron Rennick df5ed96b5a use wc-admin urls in devdocs 2019-08-21 18:16:12 -03:00
Joshua T Flowers 7fbc4cc0df Add Autocomplete component (https://github.com/woocommerce/woocommerce-admin/pull/2808) 2019-08-21 14:41:42 +08:00
Joshua T Flowers 919ce11b57 Add form component for handling form state (https://github.com/woocommerce/woocommerce-admin/pull/2742)
* Add Form component to packages

* Add form example to devdocs

* Fix form validation check

* Update store details to use Form component

* Fix indentation issues
2019-08-05 09:41:47 +08:00
Joshua T Flowers d41ce76451 Onboarding: Add WebPreview component for theme previewing (https://github.com/woocommerce/woocommerce-admin/pull/2681)
* Add WebPreview component

* Add theme preview component

* Add WebPreview example for devdocs

* Update loading content prop name for WebPreview

* Add selected class state for device buttons

* Fix tabbing issue in stylesheet

* Fix loadingContent prop changes

* Add in translators note

* Fix theme details height issue

* Add theme demo track events (https://github.com/woocommerce/woocommerce-admin/pull/2715)

* Add theme demo track events

* Track theme chosen location

* Track theme slug on device switch

* Apply design feedback
2019-08-02 07:27:38 +08:00
Justin Shreve 4e478d9fbb Implement "Simple" Select Component (https://github.com/woocommerce/woocommerce-admin/pull/2598)
* Implement "Simple" Select Component

* Add value prop and disabled option.

* Expand click target of .woocommerce-simple-select-control__selector

* Fix select state.

* remove left position

Co-Authored-By: Joshua T Flowers <joshuatf@gmail.com>

* Update packages/components/src/simple-select-control/style.scss

Co-Authored-By: Joshua T Flowers <joshuatf@gmail.com>

* Update packages/components/src/simple-select-control/style.scss

Co-Authored-By: Joshua T Flowers <joshuatf@gmail.com>

* Update packages/components/src/simple-select-control/style.scss

Co-Authored-By: Joshua T Flowers <joshuatf@gmail.com>
2019-07-17 11:46:55 -07:00
Joshua T Flowers 3dfdcdee67 Add list component to packages. (https://github.com/woocommerce/woocommerce-admin/pull/2616)
* Add list component

* Add list example to devdocs

* Add component changelog entry
2019-07-10 10:25:25 +08:00
Ron Rennick 50c415eb80 restore devdocs URLs after hash removal 2019-07-05 16:09:43 -03:00
Daniel Rey López 08417da553 Allow each page to specify their breadcrumbs without having to render the Header component (https://github.com/woocommerce/woocommerce-admin/pull/2491)
* Simplify Header rendering, remove the use of react-slot-fill

* Remove the useless "/analytics" route

* Move all the <Header> renders to the new, declarative way of specifying breadcrumbs

* Re-render the Layout when a report is added using the REPORTS_FILTER, since that affects the breadcrumbs output

* Fix the base breadcrumb link and breadcrumbs on embedded pages

* Expanded Layout.propTypes to specify the breadcrumbs' shape
2019-07-05 09:15:49 +01:00
Justin Shreve c921593cfd Add Muriel Styled Spinner (https://github.com/woocommerce/woocommerce-admin/pull/2289)
* Add Muriel Styled Spinner

* Handle PR feedback: Fix ordering of example components, fix tabbing/spacing in stepper example file, and fix base muriel colors for the stepper and profile wizard.
2019-05-23 08:42:58 -04:00
Joshua T Flowers 633177bdea Update Card component to use Muriel design (https://github.com/woocommerce/woocommerce-admin/pull/2252)
* Use Muriel card styling and override card styles in reports

* Add card description prop

* Add isInactive prop and styling to card component
2019-05-22 16:38:25 +08:00
Joshua T Flowers 8f528ee824 Add Stepper component (https://github.com/woocommerce/woocommerce-admin/pull/2246)
* Add Stepper component

* Add Muriel colors as variables

* Add changelog entry for Stepper component
2019-05-17 16:01:40 +08:00
Kelly Dwan b98c05c331 Components: Add SearchListControl (https://github.com/woocommerce/woocommerce-admin/pull/1628)
* Add SearchListControl as exported component

* Add entry to changelog (and fix versioning)

* Fix repeating character mixin

* Update textdomain
2019-02-20 15:18:27 -05:00
Paul Sealock 64d52b0d2f Merge pull request woocommerce/woocommerce-admin#1233 from woocommerce/fix/devDocs-filePath
Fix/dev docs file path
2019-01-15 09:42:24 +13:00
Albert Juhé Lluveras f009506a45 Makes table dates accessible (https://github.com/woocommerce/woocommerce-admin/pull/1274)
* Create 'Date' component to render accessible dates

* Add tests
2019-01-14 10:54:44 +01:00
Paul Sealock be76392a0c devDocs: update path for prop docs 2019-01-14 15:07:28 +13:00
Jeff Stieler 26b6255ca3 Remove defunct `getSettings()` from devdocs example. 2018-12-18 15:46:47 -07:00
Jeff Stieler 4d37bdc67c @wordpress/date getSettings() is deprecated, use __experimentalGetSettings() instead. 2018-12-18 15:45:41 -07:00
Jeff Stieler 4bfe767ad7 Add TextControlWithAffixes to devdocs listing. 2018-12-12 13:51:25 -07:00
Kelly Dwan 2a9cb6509b Build: Move components to packages dir (https://github.com/woocommerce/woocommerce-admin/pull/804)
* Move components to packages folder

* Update documentation generator to handle packages/components and client/components

* Update component locations

* Update CSS build process

* Remove react-dates css, this is already included by gutenberg

* Fix CSS style - single quotes

* Fix incorrect imports

* Update package-lock with new dependencies

* Update component locations for devdocs

* Fix location of tests
2018-11-15 13:16:23 -05:00
Kelly Dwan c29043a3bc Switch to using `@wordpress/viewport` for responsive screen layouts (https://github.com/woocommerce/woocommerce-admin/pull/761)
* Switch to Gutenberg viewport package

* Switch CSS breakpoints to core-supported values

* Fix double-calendar logic
2018-11-02 15:20:11 -04:00
Jonathan Belcher 3e92954438 Fixes React Live by pinning buble version (https://github.com/woocommerce/woocommerce-admin/pull/608)
This (sort of) pins buble to the last good version, 0.19.4. react-live uses a ^ version, which picked up the broken release during the renovate update sweep.
2018-10-19 16:36:02 -04:00
Jonathan Belcher 9d5e0dceb6 Temporary fix for dev docs while react-live is fixed (https://github.com/woocommerce/woocommerce-admin/pull/606)
* Temporary fix for dev docs while react-live is fixed

* Return null instead of th element
2018-10-19 14:06:49 -04:00
Albert Juhé Lluveras 17e9f151be Create ViewMoreList component (https://github.com/woocommerce/woocommerce-admin/pull/503)
* Create ViewMoreList component

* Update Tag component with the new style and popover

* Display number of times an item was bought in the Orders table (2x, 1x, ...)

* Refactor ViewMoreList so the elements to display in the list and the popover are different props

* Cleanup

* Fix CSV values for products and coupons

* Minor fixes

* Rename ViewMoreList prop from 'popoverItems' to 'items'

* Cleanup props

* Add ViewMoreList to devdocs examples

* Order Tag props alphabetically

* Move withState to export line so it doesn't break docs generation

* Rename 'is-not-unique' class name to 'is-inline'

* Fix missing comma

* Remove margin from popover list

* Use pseudo-selector to replace 'is-inline' class in cell links
2018-10-12 23:29:25 +02:00
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