* 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>