* Fixed orders panel flickering
This commit fixes the orders panel flickering when Gutenberg is activated
* Fixed badge flickering
* Removed unnecessary line
* Fixed items selector
This commit fixes the items selector. The method 'getItemsTotalCount' was returning the 'defaultValue' instead of the 'totalCount' when its value was 0
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Fixed Link component prop
This commit fixes a Link component prop name
* Fixed Link prop
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Restore composer install on WooCommerce plugin
Previously removed in c26db640d6
* Remove direct require of wc-install.php
In some contexts, this causes phpunit to halt because of the early exit call in wc-install.php:
defined( 'ABSPATH' ) || exit;
* Add temporary composer 1 downgrade before installing WooCommerce
* Add support for an explicit dismiss button to snackbar, as well as an onDismiss callback
* Fix effect dependencies
* Fix disabling auto-dismiss when explicit dismissing is on, fix cursor styles
* fix noops and dismiss on action
* refactor action click handler
* rename dismiss button class
* increase CES modal placeholder z index
* white. space.
Co-authored-by: Rebecca Scott <me@becdetat.com>
* Allows tabs component to render custom tab components, removing the need for showDisplayOptions
* Add display options logic to getTabs function
* Update const name from PR review suggestion
* Add an icon to the snackbar displayed for CES
* Change icon from SVG to a unicode emoji pencil
* formatting changes to satisfy CI
* bump ci
* Fix prop types and jsdocs for the customer effort score component
* whitespace >:-(
Co-authored-by: Rebecca Scott <me@becdetat.com>
* Update Woo tested and min versions.
* Update Woo tested and min versions.
* Load the installer class in bootstrap.
Co-authored-by: Sam Seay <samueljseay@gmail.com>
* Match settings to mode of provided keys
* Add validation error for mismatched mode edge case
* Tweak key validation error message for conciseness
* Add test mode case to method's isConfigured check
* Refactor stripe method isConfigured logic for clarity
* Fix small error message typo
* Change rendering of homescreen layout so store links are last.
* Render in left column in 2 column mode.
* Revert accidental log changes.
* Make homescreen layout component width-aware.
Potentially toggle the two column styling when viewport width changes.
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
* Trigger CES on the settings page when settgins get updated
* Added base test case for the CES class
* Update comments for the test
* Fix failing test -- moved down setup code after parent::setUp() so that the parent setUp runs first
* Fix coding standard
* Rename add_actions to enable_survey_enqueing_if_tracking_is_enabled and include admin_init action call in the method
* Show help tab always on homescreen, update help icon, and fix tests
* Add items to help menu for homescreen, when taskName is blank
* Add test for homescreen items when taskName is blank
* Add or case for showing help for performingSetupTask, incase setup happens on annother route
* Removed tabindex logic to allow for keyboard navigation when multiples tabs are available
* Update activity panel height and top when new navigation experience is enabled
* Moved style back into scss wrapper and used parent selector - &
* Adding ability for new navigation to scroll when list of links exceeds the viewport height
* Resetting scroll to the top of element when transitioning menus on navigation
* Migrate homescreen specific backend code to its own class.
* Default to single column homescreen.
Create an option to handle the default homescreen layout value.
* Potentially reset sticky column when layout is changed.
* Move homescreen components to their new locations.
* Clean up defunct CSS.
* Default to the two-column layout on existing stores.
* Remove header from inbox notes.
* Add "your store today" header on two column homescreens.
* Set default homescreen layout to two columns when task list is complete or hidden.
* Remove unused variables.
* Add sticky scrolling behavior to both homepage columns.
* Added support for custom actionable statuses
This commit adds support for custom actionable statuses
* Fixed styles
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Create separate methods for registering plugin items
* Fix add plugin category
* Allow scrolling of nav menu
* Use group title
* Add example plugin items
* Make menu item and category methods private
* Add analytics pages to navigation
* Register home item if dashboard feature is enabled
* Allow navigation registration from all wca items
* Update example plugin item registration
* Update order of menu groups
* Update plugins group name to extensions
* Remove temporary scroll fixes
* Spike out customer effort score
* Refactor CustomerEffortScore as Package (https://github.com/woocommerce/woocommerce-admin/pull/5342)
* Use an interstitial snackbar to trigger the CES modal
* Moved notice (snackbar) into @woocommerce/customer-effort-score
* Tidy up _webpack.config.js
* Fix linter issues
* refactor setting up CES tracking, add try..catch around loading from localStorage
* Add CES feature toggle (https://github.com/woocommerce/woocommerce-admin/pull/5387)
* Add feature toggle to only enable the customer effort score in development
* Move check into Loader
* fix logic 🙄
Co-authored-by: Rebecca Scott <me@becdetat.com>
* Add client-side check of the feature flag
* fix tabs in config
* Fix comment
* Use product lifecycle and options
* Add product count to tracks props
* Use Loader::load_features instead of DIY
* drop initiallyVisible from container
Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
* Spike out customer effort score
* Refactor CustomerEffortScore as Package (https://github.com/woocommerce/woocommerce-admin/pull/5342)
* Tidy up _webpack.config.js
* Fix linter issues
* refactor setting up CES tracking, add try..catch around loading from localStorage
* Add CES feature toggle (https://github.com/woocommerce/woocommerce-admin/pull/5387)
* Add feature toggle to only enable the customer effort score in development
* Move check into Loader
* fix logic 🙄
Co-authored-by: Rebecca Scott <me@becdetat.com>
* Add client-side check of the feature flag
* fix tabs in config
* Fix comment
* Use product lifecycle and options
* Add product count to tracks props
* Display CES modal once per event per store
* Remove TODO
* appease the formatting gods
* Use Loader::load_features instead of DIY
* Drop CustomerEffortScoreTracks singleton
* Fix tracks event name
* Only add the CES JS if tracking is allowed
* Only display the CES modal if tracking is allowed
* bump ci
* Pull package-lock.json from main
* Refactor to remove some duplication
* Revert to keep toggleVisible etc
Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
* Spike out customer effort score
* Refactor CustomerEffortScore as Package (https://github.com/woocommerce/woocommerce-admin/pull/5342)
* Tidy up _webpack.config.js
* Fix linter issues
* refactor setting up CES tracking, add try..catch around loading from localStorage
* Add CES feature toggle (https://github.com/woocommerce/woocommerce-admin/pull/5387)
* Add feature toggle to only enable the customer effort score in development
* Move check into Loader
* fix logic 🙄
Co-authored-by: Rebecca Scott <me@becdetat.com>
* Add client-side check of the feature flag
* fix tabs in config
* Fix comment
* Use product lifecycle and options
* Add product count to tracks props
* Display CES modal once per event per store
* Remove TODO
* appease the formatting gods
* Use Loader::load_features instead of DIY
* Drop CustomerEffortScoreTracks singleton
* Fix tracks event name
* bump ci
* Pull package-lock.json from main
* Refactor to remove some duplication
Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
* Adding base styles for collapsed nav menu.
* Handling varying behaviour on mobile-sized screens, with the menu overlaying content instead of shrinking the content area.
* Folding the menu by default on screen sizes less than 960px, and if that condition is met after an orientation change
* Refactoring logic from Header/index.js to flag if user has scrolled to apply shadow to folded navigation as well.
* Refactoring styles in navigation feature to allow them to be loaded properly with webpack (with imports/etc).
* Spike out customer effort score
* Refactor CustomerEffortScore as Package (https://github.com/woocommerce/woocommerce-admin/pull/5342)
* Tidy up _webpack.config.js
* Fix linter issues
* refactor setting up CES tracking, add try..catch around loading from localStorage
* Add CES feature toggle (https://github.com/woocommerce/woocommerce-admin/pull/5387)
* Add feature toggle to only enable the customer effort score in development
* Move check into Loader
* fix logic 🙄
Co-authored-by: Rebecca Scott <me@becdetat.com>
* Add client-side check of the feature flag
* fix tabs in config
* Fix comment
* Use product lifecycle and options
* Add product count to tracks props
* Use Loader::load_features instead of DIY
* Only show the CES survey in the correct screen
Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
* Spike out customer effort score
* Refactor CustomerEffortScore as Package (https://github.com/woocommerce/woocommerce-admin/pull/5342)
* Tidy up _webpack.config.js
* Fix linter issues
* refactor setting up CES tracking, add try..catch around loading from localStorage
* Add CES feature toggle (https://github.com/woocommerce/woocommerce-admin/pull/5387)
* Add feature toggle to only enable the customer effort score in development
* Move check into Loader
* fix logic 🙄
Co-authored-by: Rebecca Scott <me@becdetat.com>
* Add client-side check of the feature flag
* fix tabs in config
* Fix comment
* Use product lifecycle and options
* Add product count to tracks props
* Use Loader::load_features instead of DIY
* Only display the CES modal if tracking is allowed
* Move MONTH constant into @woocommerce/data
* Remove unused const
Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
Composer 2 utilizes stricter conventions, so this fix involved repairing the namespace for the Navigation class, and adding a mechanism to load features that are contained within subdirectories.
* Spike out customer effort score
* Refactor CustomerEffortScore as Package (https://github.com/woocommerce/woocommerce-admin/pull/5342)
* Tidy up _webpack.config.js
* Fix linter issues
* refactor setting up CES tracking, add try..catch around loading from localStorage
* Add CES feature toggle (https://github.com/woocommerce/woocommerce-admin/pull/5387)
* Add feature toggle to only enable the customer effort score in development
* Move check into Loader
* fix logic 🙄
Co-authored-by: Rebecca Scott <me@becdetat.com>
* Add client-side check of the feature flag
* fix tabs in config
* Fix comment
* Use product lifecycle and options
* Add product count to tracks props
* Use Loader::load_features instead of DIY
Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
* Added Accordion component
This commit adds an Accordion component to our available components
* Refactored Accordion component
* Added new Accordion component to index
* Fixed a few Accordion details
* Accordion fixed
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Update dependencies in prep for Composer 2.x.
* Rollback jetpack autoloader update.
* Restore range versions for composer dependencies, regenerate lock with Composer 1.x.
* Fix PSR-4 Classes (https://github.com/woocommerce/woocommerce-admin/pull/5473)
* PSR-4 class names need to match their filename.
Remove underscores in classnames.
* Fix reported class name in deprecation notice.
* Fix comments.
* We don't need composer dependencies in core WC test setup.
* Update composer lockfile using version 2.x.
* Temporarily turn off error display.
Function deprecation notices are breaking tests.
* Change WooCommerce Card to WordPress Card in the WelcomeCard component.
Use isElevated and margin-bottom to make the Card look close to previous UI.
* Use WordPress Card in KnowledgeBase.
For the description in Card header, it will be rendered as a p element instead of h2, which should be more semantically correct. Test is updated to reflect this.
* Add Card component wrapper that supports title and description props.
* Use WordPress Card component wrapper in recommended extensions.
* Code refactor to use WordPress Card wrapper.
* Use WordPress Card wrapper in installed extension.
* Use margin-bottom for children layout at the parent CSS level.
* Add test for Card.
* Fix no margin between cards in Coupons page, and remove previous css for WooCommerce Card.
* Remove old WooCommerce Card css.
* Don't use isElevated in Card, to match the style in WooCommerce Home screen.
* Make item border color consistent with WordPress Card in Installed Extension card.
Use WordPress Card without CardBody here because we don't want the padding from CardBody.
* Make the card description look similar to previous WooCommerce Card description.
* Fix spelling in CSS class names.
* Fix WooCommerce spelling in comment.
* Change the Marketing Card style to match with WooCommerce Home style.
Also change the text gray color to use CSS variable instead of hardcoded gray value.
Also remove the usage of h2 in the Card header to follow WooCommerce Home style.
* Use $gray-200 as light borders between items in card.
* Remove unneeded CSS code based on TODO in comment.
* Display a "read blog" message when there is an error in getting blog posts or there is no blog posts.
* Simplify ReadBlogMessage with interpolateComponents and Link.
* Adding 'has_navigation' flag to tracks pageView events to indicate if new navigation is enabled (https://github.com/woocommerce/woocommerce-admin/pull/5332)
* Testing if navigation is active using window.wcNavigation instead of window.wcAdminFeatures to handle the edge case of a single page opting out
* Remove inbox-specific class, widen single column.
* Create user preference for homescreen column layout.
* Add display options "tab" to homescreen.
* Style display options.
* Tweak homepage layout option values.
* Add tracks events for homepage layout.
* Add test coverage for homescreen display options.
* No need to use Fragment component.
* Use named exports.
* Fix display options styling on mobile/narrow viewports.
Don't show the options at all if we're forcing single column.
* Fix linting error.
Switches the WCPay inbox note from no URL to an action param admin URL. This allows redirecting to the next setup step after allowing installation & activation to complete (instead of stalling on busy state). Adding a ToS message enables navigating directly into the WCPay onboarding flow.
Co-authored-by: James Rodger <james.rodger@automattic.com>
Co-authored-by: Vasily Belolapotkov <belolapotkov.v@gmail.com>
* Move data store to package and hydrate navigation
* Use wc settings to get site URL and title
* Use wc settings admin link
* Update nav util tests to work with installs in subdirectory
* Code refactor with reducer and new action type SET_ERROR.
* Add default state for errors and code for SET_ERROR for blogPosts.
* Don't use handleFetchError, instead save the error and blogPosts category into redux store.
* Display message for error and empty content.
* Fix grammar; fix relevant test.
* Code refactor: put action type strings in one place.
* Add tests for error UI.
* Remove illustration for empty content with no blog posts.
This commit adds an array casting after getting "woocommerce_onboarding_profile" option.
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
TODO comments are an established practice in this repo, with ~100 occurrences. This removes the warning in our PHP linter about it. This warning was blocking some Git commits being made due to the linting in the pre-commit hook.
* Add URLs to categories to assist migrating items
* Migrate items when URL matches callback
* Check if nav is enabled before adding extra marketing menu
* Unset URLs on categories after migration
* Migrate leaderboard tests to RTL.
* Remove test of default prop value.
* Migrate ReportSummary tests to RTL.
* Migrate ActivityCard tests to RTL.
* Migrate ActivityCardPlaceholder tests to RTL.
* Migrate remaining ProductType tests to RTL.
* Migrate Card tests to RTL.
* Update RTL and user event packages.
* Migrate Date tests to RTL.
* Migrate D3Legend tests to RTL.
* Migrate D3Base tests to RTL.
* Migrate Gravatar tests to RTL.
* Migrate ImageUpload tests to RTL.
* Migrate ProductImage tests to RTL.
* Migrate Rating tests to RTL.
* Migrate Search tests to RTL.
* Migrate Plugins tests to RTL.
* Migrate SelectControl tests to RTL.
* Migrate Timeline tests to RTL.
Remove tests that inspect DOM since there are snapshots.
* Migrate DismissModal tests to RTL.
* Migrate SetupNotice tests to RTL.
* Migrate WelcomeCard tests to RTL.
* Fix setup error reason retrieval in ShippingBanner.
* Migrate ShippingBanner tests to RTL.
* Migrate RecommendedExtensions tests to RTL.
* Migrate KnowledgeBase tests to RTL.
* Rename enzyme setup file, modify to setup RTL.
* No need to import jest-dom in test files.
* Remove enzyme dependency.
* Use snapshot for testing Leaderboard markup.
* Switch from "not to be empty" to "be in the document".
* No need to waitFor() recordEvent mock.
* Be specific about clicking the "hide" button.
* Use toBeVisible() instead of checking style property.
The theme selection page e2e test is intermittently failing and it
is not clear why. It could be that there is a failure going from
the last setup step to this one because the selectors for this
step are ambiguous and could refer to anything.
This specifically waits for an element that is unique to the
theme selection screen in the hope of removing ambiguity.
* Preventing the legacy coupons page from being readded when the navigation plugin is active (woocommerce/navigation woocommerce/woocommerce-admin#122)
I've also added a check to prevent the "coupons page has moved" note from being displayed, since it's no longer applicable in the new nav.
* Addressing linting issues with PHP files
* Updating conditions to work correctly with navigation as feature instead of external plugin
* Updating comment text
* Rename admin notes classes and file names to fit conventions
* Use a facade class that adds deprecation warnings to each function call
* Add "Manage orders on the go" admin note
* Remove a rebase zombie 🙀
Co-authored-by: Rebecca Scott <me@becdetat.com>
* is_feature_enabled
* feature class
* copy/paste
* hooked up
* its alive
* add wc-admin items
* clean up entry point
* Analytics remove url
* rebase error
* add back in check is_feature_enabled
* specificity CSS
* Require Jetpack connected and WCS active to mark the shipping task as complete
* Require country _not_ be in AU, NZ, or UK to mark shipping methods as complete
* Bump CI
Co-authored-by: Rebecca Scott <me@becdetat.com>
This commit invalidates the cache for "getTasksStatus" to force a rerequest of the value.
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Add note to confirm automated tax settings
* add back automated_tax_is_supported function
* Trigger CI
Co-authored-by: Rebecca Scott <me@becdetat.com>
This updates the Stable tag line in readme.txt to use a CRLF style line ending. This makes it consistent with the rest of the file and fixes “mixed line ending” type error messages when opening.
Removing breadcrumbs from wc-admin header, replacing with simple title (https://github.com/woocommerce/woocommerce-admin/pull/3963)
This is an interim step towards the integration of wc-navigation, where a back button will be provided to restore the critical functionality of the breadcrumbs. Note that the `breadcrumbs` data was preserved since it's still being utilized do construct the document title (in semi-breadcrumb-fashion) on both the backend and front-end.
* Don't auto generate chunk names.
This should make SVN diffs much easier to navigate for WP.org deploys.
* Include script version parameter in async chunk requests.
* Add version parameter to CSS chunks.
* Declare the note constants on the deprecated class.
This avoids triggering PHP errors when third party code references the old class constants.
* Remove deprecation notices and return the call result
* Restore deprecated notices.
* Avoid magic strings.
* Pass WC_Admin_Note constructor argument to migrated class.
* Allow subclasses to access the facade class instance.
Co-authored-by: Rebecca Scott <me@becdetat.com>
Updating Stripe key field validation to support test keys (https://github.com/woocommerce/woocommerce-admin/pull/4391)
Currently the form to configure Stripe keys accessed via the task list presents an error when test keys are used. I've updated the validation in order to support the format for test keys as well.
* Added filter to selected industries list
This commit adds a filter to the selected industries list
* Fixed lint error
* Fixed lint issues
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Fixed small text in OBW
This commit makes some OBW texts larger
* Fixed list items size
This commit makes the list items in the 2nd step of the OBW larger
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Rename admin notes classes and file names to fit conventions
* Use a facade class that adds deprecation warnings to each function call
* Tidy up after rebase
Co-authored-by: Rebecca Scott <me@becdetat.com>
* Add initial Variations Report to analytics feature.
* Restrict query to variations when not specifying any product IDs.
* Add route to get variations without specifying a parent.
* Move variations table component to variations report directory.
* Add missing LIMIT clause to variations report query.
* Remove broken features from Variations table.
* Add Variations report controller to CSV emailer.
* Add initial Variation Stats endpoint, based on Product Stats.
* Hook Variations Report components up to new stats endpoint.
* Hook attribute filter up to variations report queries.
* Remove variation title filter usage.
See: https://github.com/woocommerce/woocommerce-admin/pull/5100
* Use filtered separator in variation name formatting.
* Add "single variation" to variations report, fix autocompleter API request.
* Fix segmentation by variation.
* Add comparison to variations report.
* Always include manually specified variations in report results.
* Fix variations report table comparison mode.
The ReportTable component expects the `filter` query param.
* Fixing styling of compare button without table search component.
* Add variation filter to Orders report.
* Link orders count to orders report filtered by variation.
* Orders report: include variation attributes in product names.
* Further style tweaks for variations report download button.
* Add variations filter to order stats query.
* Clean up "category includes" login in REST controllers.
Prep for "category excludes" in the Variations report.
* Support category exclusion in report filters.
* Fix filter param used by the variation report table component.
* Add category filter to variations report.
* Fix initial selected ReportTable rows when using non-default compareParam.
* Add a new autocompleter for variable products.
* Add products filter to variations report.
* Fix tests.
* Handle variation IDs that are no longer found.
* Add documentation.
* Use getSetting() instead of directly accessing window properties in client code.
* Fix ordering Variations by SKU.
This commit changes the "Skip setup wizard" button text to "Skip setup store details"
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Fixeswoocommerce/woocommerce-admin#4443
Some investigation found that woocommerce/woocommerce-admin#4443 is no longer a reproducible issue. Why this issue no longer exists is not clear, but it makes sense now to disable the store registration checks as they are only called once. This PR just removes the checks but does not change any other behaviour.
* Reduced list padding
This commit reduces the industries list "padding" and its "min-height"
* Removed item from industries list
This commit removes the item "Art, Music & Photography" from the industries list
* Fixed e2e tests
This commit fixes the e2e tests
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
The marketplace suggestions opt-out is now used to determine if remote inbox notifications should be fetched. This corresponds to the
`woocommerce_show_marketplace_suggestions` WP option.
Additionally, a new protected method is added to the class. This provide a series of checks for whether remote notifications are enabled on the site.
* One-shot to enable the homescreen for everybody
* Make the home page the default (only) experience
* remove option check in activity panel tabs, get tests working, fix lint issues
* Remove is-homescreen CSS class
* Remove extra home page route registration
Co-authored-by: Rebecca Scott <me@becdetat.com>
* Add option to not set up sales tax
* Correct JS lint errors
* Add abort option to plugin step
* Inline redirect to home page
* Use testing-library/react for the new test
* Also set woocommerce_calc_taxes to 'no'
Co-authored-by: Rebecca Scott <me@becdetat.com>
This commit modifies the connection check for the note 'wc-admin-wc-helper-connection'
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Remove the chevron icons from the “Finish setup” task list
* Add a data-testid attribute to the TaskDashboard dismiss button for testing
* Add test for dismiss button in TaskDashboard component
* Remove use of `woocommerce_product_variation_title_include_attributes` filter.
* Use attribute values in product variation titles.
* Include attribute values in product variation name during segmentation.
* Include attribute values in product variations autocompleter query.
* Add product attribute filter to Orders report config.
* Add attribute args to Orders report controller.
* Include attribute filters in orders report query.
* Add attribute args to Orders Stats report controller.
* Include attribute filters in orders report stats query.
* Add test for product attribute filter in orders report.
* Add tests for invalid parameter values.
* Add tests for product attribute filter in order stats endpoint.
* Fix tests for PHP 5.6 and WC 3.8.x.
* Refactor filter input row into component.
* Support multiple filter value in "add filter" list.
* Refactor out one-off updateFilter() callback.
* Use array index to remove filters.
Also create unique keys for multiple value filters.
* Use numeric index instead of filter "key" for change callbacks.
* Maintain unique keys for multiple filter components.
This avoids rerenders when filters are removed.
* Calculate instance numbers in constructor.
* Support advanced filter instances in navigation helper methods.
* Add allowMultiple to advanced filters README.
* Fix tests.
* Add test cases for multiple filter instances.
* Handle missing attribute names and terms in screen reader text.
* Fix perpetual loading indicator when there are no attribute terms.
* Handle new boolean case when generating screen reader text.
* Handle multiple filter instances when creating report queries.
* Remove unused variables.
* Update Shipping Banner to use installPlugins since installPlugin has been removed.
* Fix shipping banner compatibility with WCS 1.24.
* Update metabox content to match WC 4.5 metaboxes.
* Add monthly pricing toggle
* Move product type label to its own folder
* Add popover to product type label
* Add card help text
* Add product type component tests
* Add tests for product types step
* Refactor validation in product types
* Export ProductTypes component for testing
* Simplify variation name logic.
* Remove errant commas from variation autocomplete options.
* Add single variation filter to products report.
* Include more variations in search results.
Also trim the response fields down.
* Add initial AttributeFilter component.
Only selected of attribute names for now.
* Add attribute term selection control.
* Position attribute filter inputs side by side.
* Add loading indicator to attribute term control.
* Clear term when attribute value changes, and handle backspaces.
* Generate screen reader text.
* Translate filter labels, add field separator.
* Improve grammar in screen reader text.
* Fix lint errors.
* Add error logging to remote inbox notifications data source poller
* Change DataSourcePoller to use WC_Logger
* Remove test feed
* Tidy up log messages
Co-authored-by: Rebecca Scott <me@becdetat.com>
Fixeswoocommerce/woocommerce-admin#4464
`wcadmin_tasklist_shipping_label_printing` events were being filtered into rejected events because the data being passed was in camel case instead of snake case. This fixes that issue.
* Remove store page creation during new onboarding experience
* Remove onboarding feature flag
* Add back in onboarding feature flag to enable feature loading
* Add onboarding task status API endpoint.
* Add task status to onboarding data store.
* Update appearance task to use onboarding store for status info.
* Update main task list component to use onboarding data store for status info.
* Clear onboarding status info "cache" when setting shipping rates in the task list.
* Clear onboarding status info "cache" when enabling payment methods from the task list.
* Fix onboarding data store reducer tests.
* Clean up redundant code, nest task status settings under new key for hydration.
* Include tasks status in onboarding data hydration.
* Update tax task to use onboarding data store for status info.
* Avoid continually rehydrating onboarding data.
* Refactor payment task method retrieval to use onboarding data store.
* Fix bug with disappearing appearance tax steps.
* Update appearance completion faster by using hydrated onboarding value.
* Avoid PHP warnings when onboarding isn't enabled.
* Remove unused imports.
Working towards woocommerce/woocommerce-admin#4654 this refactors the `<Header>` component to be functional so that it can use hooks. The plan is to use the `useUserPreferences` hook there to determine if the mobile banner should be rendered or not.
This uses a generator action and hooks to reimplement the CTA as a more
simple and logicless component, with most of the logic now in the
HOC component.
* Add export ID to success response and fix typos in endpoint schema.
* Initial export data store.
Allows for starting export, but not checking progress.
* Use new export data store in analytics report tables.
* Remove defunct report export wc-api files.
* Apply review feedback from another wp.data PR.
* Use getResourceName() util for more DRYness.
* Fix linter error.
* Add response status code to fetchWithHeaders control.
* Use HTTP status rather than response body to determine success.
* Fix tests.
* Remove unused import from actions.
* Move controls to data package root
* Add reports data store in wp data
* Move report utils to data package
* Update error state and actions to match existing methods
* Update references to reports data store
* Add error setters
* Fix control registration path
* Add reports reducer tests
* Remove remaining report wc-api references
* Handle PR feedback
* reference packgage, not lib/date
Co-authored-by: Paul Sealock <psealock@gmail.com>
* Delete customer lookup rows when their corresponding user is deleted.
* Asynchronously delete users from customer lookup table.
* Add user deletion test case.
* Fix user deletion test.
* Add initial notes data store using wp data
* Cache individual note queries
* Update notes undo endpoint to batch update endpoint
* Allow batch updates of notes
* Add requesting state
* Update components to use new note store
* Remove old notes store from wc-api
* Get note IDs from json and validate data in REST API
* Add an updating state to each note
* Throw errors in actions so they can be caught by client
* Add store reducer tests
* Handle PR feedback
* Fix failing tests
* Don't set inbox panel visibility while batch updating
* Move woocommerce block to external dependencies
Recently there have been significant slowdowns
of the test suite in Jest. I frequently had the test suite
taking 130-150 seconds to run.
After some exploration and trial/error I found that
https://github.com/facebook/jest/issues/9457 is likely the cause.
This was confirmed after the downgrade where I saw test runs drop
to an average of about 35 seconds per run.
* Fix industry args type in REST API
* Only allow object for industry param
* Fix onboarding industry object shape in test case.
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
* Don't require package tag or file comment inside src
* Removed package tag from files inside src
* Fixed tests directory in phpcs.xml.dist
* Fixed usage of package tag
* Fixed new classes
* Fixed coding standards
* Fixed coding standards in tests
* Remove task list payment actions
* Check that the payments task has been marked complete in checkout note
* Track payments completion via enabled gateways
* Allow toggling to unfinish task when no payments enabled
* Set up profile completed action
* Stub out the steps
* Only run if Jetpack is installed and connected
* Return if WCS isn't active
* Return unless physical is selected as a product type
* Return if there are existing shipping zones
* Shipping labels are enabled when WCS is installed
* Set up free local shipping
* Comment for the profiler complete action
* By default there is no international/catch-all shipping method set up
* Add review shipping settings note
* Record tracks event
* Fix logic
* Add unit test around setting up free local shipping
* Rename some functions
* Use countries service to get all countries
* Drop duplicated possibly_add_note()
* Check the old value when determining if the profiler has completed
* Fall back to country code if country name doesn't exist
* Use admin_url fn to build up URL
Co-authored-by: Rebecca Scott <me@becdetat.com>
* scaffold out reviews store
* hook up dataStore
* get controls working
* getReviews working
* get count working
* get errors working
* indicators working
* reducer tests
* reviews
* Remove wc-api
* cleanup
* better way to fetch with headers
* add comment with issue
* better resolver
Fixeswoocommerce/woocommerce-admin#4592
This adds the functionality to support a store setup tab displayed in ActivityPanel. The tab currently just redirects to the home page, rather than implementing the nice-to-haves of displaying the task list in the panel. The reason for this, is that I found it would require significant refactoring of the task list to support this currently.
As part of this I have also refactored rendering of tabs inside into 2 new functional components: <Tabs> and <Tab>. The reason for this is to decompose large untestable components, test them and by virtue of being decomposed they will also be more reusable in future. Ideally would have been refactored to a functional component as well, but it would have been too large a task.
Fixeswoocommerce/woocommerce-admin#4590
This implements a paged modal via the Gutenberg Guide component. Some styling adjustment was needed to match the designs exactly.
This also introduces 3 SVG based illustrations for display in the modal. According to this comment there is a need to color them based on the theme at some point, but based on a current lack of requirements for that, I felt that could be done at a separate time (that was suggested in the comment as well).
* Require the correct autoloader file.
* Include composer file when updating version numbers.
* Add notice for development builds not using JETPACK_AUTOLOAD_DEV.
* Only bump version numbers when preparing a release.
* Added personalization to purchase extension task
This commit adds personalization to purchase extension task
* Removed unnecessary naming fix
This commit removes an unnecessary naming fix
* Corrected param description
* Solved translation problem
* Naming corrected
The method 'getGroupedOnboardingProducts' was given a more accurate name.
* Modified string substitution
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* 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>
* Lint detail solved
This commit resolves a small lint warning in the file Loader.php
* Removed "profiler" from menu
This commit removes the item "profiler" from the menu.
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Added Test Checkout note
This commit adds a note to test the checkout process
# Conflicts:
# src/Events.php
# src/FeaturePlugin.php
* Replaced method "site_url" with "wc_get_page_permalink"
* Removed products with state draft verifcation from "check_task_completion"
This commit modifies the code to not set the products task list item as done when they have state draft.
* Added published date control
This commit adds a product published date control to the note
* Half-hour calculation changed
* Typo error corrected
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Use sanitize_text_field instead of sanitize_title_with_dashes to clean up the theme name during theme activation and installation. Remove another sanitize_title because it also need to allow non-lowercase slug as well. Use the sanitized theme name as slug for:
- Checking whether current theme is allowed to activate
- Checking whether current theme is one of installed theme
- Slug of theme on Onboarding::get_theme_data() method.
* 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>
* Handle admin note data read exceptions.
* Add test for notes datastore encountering an exception in read().
* Fix WC_Admin_notes::get_note() helper.
* Throw exception from WC_Admin_Note class instead.
Mimicking WC_Order, etc.
* Use helper method to retrieve existing notes.
* Use self for static calls.
* Check for valid note before updating in WCPay note class.
* Don't specify columns when fetching notes from the database.
* Fix deprecated function call.
Avoid calling deprecated set_icon() when passing data to WC_Admin_Note constructor.
Fixeswoocommerce/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)
* Removed task item `connect`
This commit removes the task item `Connect your store to WooCommerce.com`
# Conflicts:
# client/task-list/tasks.js
* Reordered home screen tasks
This commit reorders the task list visible on the home screen.
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
This commit adds event recording to home/dashboard task list
# Conflicts:
# client/task-list/tasks.js
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Added skip profiler functionality
This commit adds the skip profiler functionality, leaving the Home screen `Store details` as incomplete.
# Conflicts:
# client/task-list/tasks.js
* Unit tests repaiared
* Added OBW page
This commit makes the necessary changes to add an OBW page
# Conflicts:
# client/profile-wizard/index.js
* Event name changed
This commit renames the event name we were recording since it was wrong.
* Redirection modified
This commit modifies the way we do redirection
# Conflicts:
# client/profile-wizard/index.js
* Removed `profiler` feature flag
* Removed `profiler` feature flag
This commit removes the `profiler` feature flag
* Added error handling for `updateProfileItems`
This commit adds error handling for the method `updateProfileItems`
* Update client/profile-wizard/index.js
Co-authored-by: Matt Sherman <matt.sherman@automattic.com>
* Removed "throw" from "then"
* Update client/dashboard/index.js
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
* Update client/profile-wizard/index.js
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
* Modified redirection URL
This commit modifies the redirection URL.
# Conflicts:
# client/task-list/tasks.js
# Conflicts:
# client/profile-wizard/index.js
* Removed the variable "lastStep" and the related logic.
* Removed change of state for variable "skipped"
* Added error trowing to onboarding actions
This commit adds error trowing to onboarding actions
* Removed response handling for `updateProfileItems`
* Added default value for "profileItems" in Homescreen and Dashboard
* Removed `step` from OnboardingProfile and test
This commit removes the `step` from OnboardingProfile.php and from tests
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Matt Sherman <matt.sherman@automattic.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
* Fix incorrect woocommere-admin spelling
* Update styles
* Add icons
* Add hover effect for coupon icons
* Remove variable comment
* Update color case
* Style lint fixes
* Use $theme-color
* Update icons, use wordpress/icons where possible
* Adjustment for using smaller default icons and no fills in the svgs
* Use var(--wp-admin-theme-color) instead of $theme-color
* Reorg coupons stylesheet
* Update PropTypes for ProductIcon
* Adjust icon export
* Rever to using $theme-color
* Add versions of link, people and currency-dollar
* Overide coupons icon background color
* Add background transition to icon wrapper
* Allow Jetpack plugin to be manipulated via API from the home screen.
Fixes issue where Jetpack's installation status wasn't visible if the OBW was skipped.
* Remove incorrect arguments from add_filter() call.
* Move Jetpack connection from benefits to profiler completion
* Handle profiler completion and connection URL async
* Update cached components on each profiler step
* Show bundle install UI based on segment
* Create notice on error catch
* Refactor redirect after promise completion
* Fix up accessiblity issues in bundle popover UI
* Add "create an account" option to PayPal setup.
Requires a connected Jetpack and WCS.
* Incorporate account creation into multiple flows.
Consolidate form code as well.
* Empty emails aren't valid.
* Remove defunct manual form render.
* Only validate API credentials if needed.
* Update PayPal settings for account creation flow.
* Add first basic test for PayPal setup task.
* Add more test coverage.
* Add some padding to the create account form.
* Only show "create account" if WCS TOS has been accepted.
* Add WooCommerce Admin Facebook Marketing Expert Note Provider.
* Fix number of orders and move cheaper check to be first
* Update title
* Update note title and copy
* Adjust orders_last_month check
* Return ids to speed up query
* Use PluginsHelper
* Removed "woocommerce_task_list_payments" from note.
This commit removes the use of "woocommerce_task_list_payments" from the note "Set up payments"
* Removed task list check
This commit removes an out of date check we were doing to show the note
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Add initial (rough) help panel.
Only includes "products" task items.
* Add help links for other tasks.
* Add header to help tab content.
* Toggle activity panel tabs when performing a setup task.
* Move query string parsing up a level.
* Pass query string as prop to ActivityPanel.
Fixes rerendering issue when entering a task.
* Pass current task to Help panel.
* Filter payments task help items by available payment methods.
* Filter shipping and tax help items based on WCS install.
* Add generic docs link to all help panels.
* Track help panel open.
* Track help panel link clicks.
* Show WCS help items when prompted to install.
* Tasks are only performed on the main route.
E.g. no value for "path".
* Small tweaks to make AcivityPanel more easily testable.
* Add initial tests for ActivityPanel tab logic.
* Modify HelpPanel component for easier testing.
* Add tests for conditional help panel links.
* Fix tracking keyboard "clicks" on help links.
* Fix query prop on embedded pages.
* Allow filtering of help tab items.
* Add dismiss button as task list item option
* Add option to undo task dismissal
* Record modal dismissal event
* Add transition animation to list items
* Use key for list items instead of index
* Remove dismissed tasks on recompleting profiler steps
* Add wcpay setup task and hide normal payment task if the wcpay plugin is installed
* Record an event when selecting the wcpay task
Co-authored-by: Rebecca Scott <me@becdetat.com>