* Possibly use safe Text component
* Possibly use safe navigation components
* Add experimental package
* Update components to import from woocommerce/experimental
* Make experimental package private
* Reference experimental package relatively
* Update packages/experimental/README.md
Co-authored-by: Paul Sealock <psealock@gmail.com>
* Update packages/experimental/CHANGELOG.md
Co-authored-by: Paul Sealock <psealock@gmail.com>
* Update history state instead of mocking getQuery in tests
* Handle PR feedback
* Create excluded externals array and return early
Co-authored-by: Paul Sealock <psealock@gmail.com>
Fixeswoocommerce/woocommerce-admin#5294 and Automattic/woocommerce-paymentswoocommerce/woocommerce-admin#810 .
Changes:
* Update UsageModal UI to have two action buttons instead of 'Count me in' checkbox.
* Make UsageModal configurable with custom title, message and buttons text.
* Add customized modal to request site usage tracking after WC Payments KYC flow is completed.
* 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>
* 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>
* 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
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.
* 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>
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.
* 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
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.
* 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>
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)
* 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>
* 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.
* Tweak the embed page CSS so the top content sits better
* Tweak the CSS to take notices into consideration
* Further tweak header styles
Co-authored-by: Rebecca Scott <me@becdetat.com>
* Fix secondary button style in OBW.
* Center snackbar notices in OBW.
* Scope snackbar changes to just the OBW.
* Add busy treatment to Jetpack connect button when redirecting.
* Remove color override for form toggles in ellipsis menus.
* Fix styling of task list.
* Fix button styles in date range picker component.
* Use admin theme colors in calendar component selections.
* Fix datepicker styling on analytics settings page.
* Make it possible to add marketing submenu pages
* Always set the parent value for marketing pages
* phpcs
* Add ‘overview’ to breadcrumb and path
* Fix permission check conditional
* Add parent menu at priority of 9, before other items are usually added
* Revert to use `/marketing` as the page path
* Removed URLSearchParams method
This commit removes the method URLSearchParams to use something compatible with IE
* Revert "Removed URLSearchParams method"
This reverts commit c2b24b34c93d16264c62b3bf522f4fbc94354d58.
* Removed URLSearchParams method
This commit removes the method URLSearchParams to use something compatible with IE
* Created folder utils with global utils
This commit moves the method "getUrlParams" to a utils file. Also some unit test were added
Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
* Fix Filters' staticParams
* Don't update report table page when chart type is changed or filter menu has been opened.
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
* Document the `woocommerce_admin_is_loading` filter.
* Prevent dashboard from being visible during ProfileWizard chunk load.
* Delay removing loading class rather than adding full screen class prematurely.
* Use lazy loading to split up the size of the js downloaded
* Use lazy loading to split up the size of the js downloaded
* Add Moment Timezone plugin to reduce size of data file.
* Lazy load header panels and use Dashicons for faster loading
* Load assets from the correct publicPath
* Load assets from the correct publicPath
* PHP cs fixes
* Fix missing quotes on string literal.
* Fix PropType warning for lazy loaded component.
* Separate the task list and dashboard chunks.
* Lazy load dashboard sections.
* Restore original icons and reduce size by importing only the icons needed
* Lazy load alerts to save more Kb on initial load
* Minify built JS in production mode.
* Add preload tags for WC Admin assets. (https://github.com/woocommerce/woocommerce-admin/pull/4162)
* Fix linting errors.
* Add modified UnminifiedWebpackPlugin.
* Produce minified and unminified bundles for all builds.
* Remove unused variable from webpack config.
* Run unminify after sourcemap generation.
* Only hook after optimization if we're using a devtool.
* Add minification suffix in Loader::get_url().
* Lazy load OBW on new home screen.
* Move OBW style up a level to layout.
* Hydrate ProfileWizard independently of withSelect and withDispatch
* Fix order of composition and fallback function when using hydration.
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
Co-authored-by: Paul Sealock <psealock@gmail.com>
* Specify home screen in tracks event when enabled.
* Add Jetpack info to home page Tracks event.
* Use @wordpress/data's withSelect - no need for wc-api.
* Add plugins hydration to existing compose() call.
* Safer access of wcSettings object in plugins hydration.
* Remove redundant plugins hydration from TaskList and ProfileWizard.
* Add Marketing feature flag
* Add marketing page and menu item
* Register marketing page with layout controller
* Add initial marketing cards
* Add max-width to marketing overview page
* Add initial marketing WelcomeCard component
* Make marketing welcome card permanently dismiss
* Add a readme for the marketing page components
* Record tracks event when marketing welcome dismissed
* Match design width
* Add welcome image and initial styles
* Use gridicon for close button
* Fix whitespace
* Add PluginsHelper::get_plugin_data()
* Add initial Marketing\InstalledExtensions class
* Preload installed marketing extensions data
* Tweak extension statuses
* Add InstalledExtensionRow component
* Add initial extension data to InstalledExtensions card
* Refactor PluginsHelper::get_plugin_data method
Using the new get_plugin_path_from_slug method
* Ensure get_plugins() function is available for PluginsHelper
* Simplify using PluginsHelper method
* Add MailChimp configured status logic
* Add links to InstalledExtensionRow component
* Add key prop to extensions list
* Setup styles for InstalledExtensions card
* Display nothing if no installed extensions
* Add InstalledExtensions::get_allowed_plugins()
* Setup Marketing Overview API controller
* Add /activate-plugin marketing endpoint
* Add more extensions URL props
* Add Facebook extension configured status logic
* Update Facebook extension URL props
* Fix extenion data logic
* Move component into it’s own directory
* Setup /marketing/overview/recommended endpoint
* Initial marketing page card header styles
* Add basic extension data to RecommendedExtensions
* Use color as variable
* Tweak card header padding for design
* Add basic styling to RecommendedExtensions card
* settingsUrl is not available if the plugin is not active
* Add /marketing/overview/installed-plugins REST endpoint
* Add basic activation functionality to InstalledExtensions component
* Don’t throw error on success
* Add MVP data store for installed extensions card
* Add core dark blue color variable
* Add styles for installed extensions card
* Move knowledge-base component to its own directory
* Pull recommended marketing plugins from remote test site
* Hide description when configured
As per design
* Tweak colors based on design
* Finish off styling for RecommendedExtensions
* Limit recommended extensions to 6 items
* Add error handling to RecommendedExtensions card
* Rename ‘copy’ extension prop
* Add marketing button component to match design
* Create ProductIcon component for marketing
* Add InstalledExtension icons
* Fix icon image paths
* Add ProductIcon to InstallExtensionRow
* Final styling to installed extensions card row
* Knowledge base card placeholders
* Fix missing icons when plugin not activated
* Remove logging
* Tweak array structure to ensure we have an array in JS
and not an object
* Refactor KnowledgeBase marketing component
- We don’t need loop through every post when rendering, just pick the posts we need
- Remove unused classes
* Move padding from each slide to the container
* Improve slider animations by absolute positioning the slides
* Reduce the slider animation timeout and add a note
* Add in-app purchase flow url params for recommended extensions
* Fix slider animation
* Reset slider height on window resize
* Short slider animation, fix double margin on smaller screens
* Add initial marketing/knowledge-base endpoint
* Pull knowledge base posts from API
* Rename welcome card dismiss tracks event
* Record event on recommended product click
* Recond onclick events for installed extensions card
* Record event when carousel navigation clicked
* img elements must have an alt prop
* Remove import that is never used
* use camelCase
* Decode HTML entities from API call
* Remove unused container div
* Add card loading state
* Add images to knowledge base card
* Link knowledge base posts
* Use the Pagination component rather than duplicate it’s functionality
* Clean up and rename knowledge base slider
* Clean knowledge base CSS and update responsive styles for single post slide
* Add a README for button component
* Add README for product icon component
* Add initial readme for Slider component
* Add correct image sizes to knowledge base slider, finalize styles
* Fix extension link urls
* Resolve some code formatting issue
* Bind class click methods to this
* Wrap nodes in Fragment
* Fix wccom-back path
* Add placeholder author and gravatar
Default avatar url size returned from the API is currently set to 96 so I’ve done a simple replace with 16
* Fix style-lint expected new line
* Add docblock for get_knowledge_base_posts()
* Setup data store for marketing to handle installedExtensions card
* Fix function names
“Activating” not “installing”
* Move welcome card component to its own dir
* IconButton component is going to be deprecated
ref: https://github.com/WordPress/gutenberg/pull/19299
* Support multiple activating plugins in the data store
* Rename extension to plugin for consistency
* Add propTypes to component
* Rename data-store/ to data/
* Fix import paths
* Extract isActivatingPlugin logic into datastore
* Move data store selectors into own file
* POST requests are not cached
* Export apiFetch action
* Don’t wrap API response in object
* Implement data store for recommended extensions
* Implement data store for marketing knowledge base
* Tidy getRecommendedPlugins resolver
* Try a cross browser cover/crop image effect to fit proposed design
And help fit longer titles in
* Add caught errors to handler
* Adjust positioning so watermater is displayed
* InstalledExtensions phpcs fixes
* Marketing phpcs fixes
* Alignment fix
* MarketingOverview phpcs fixes
* Missing full stop
* Update breadcrumbs to use new approach
* Fix style lint issues
* Record `marketing_knowledge_article` track event on knowledge base post click
* Import apiFetch and controls from @wordpress/data-controls
* Hex color to lowercase
* Remove duplicate method after rebase
* Use new showPageArrowsLabel rather than hide with CSS
* Fix blurry avatars on hidpi displays
* Hide avatar if URL is falsy
* Replace test author data with live data
* Combine conditionals into ternary
* Combine conditionals into ternary
* Simplify class column logic
* Only preload option and component settings in the admin
* Fix isActivatingPlugin not updating
Component was not re-rendeding.
* Use querySelector over getElementsByClassName
* Hide Marketing Welcome Card immediately on click
* Use create-a-ticket url for supportUrl and make that the default
* Add getInstalledPlugins resolver with preloaded data
* Revert "Add getInstalledPlugins resolver with preloaded data"
This reverts commit b8b127ec6411bef15616576b3bb189dc31777c13.
* Load plugin data in a separate request after activation
* Update welcome image
* Don’t return plugin data in the activation request.
* A space is required before closing bracket
* Update Jest config to gracefully handle static assets
Ref: https://jestjs.io/docs/en/webpack#handling-static-assets
* Remove unused onExit property
* Remove placeholder README
* Use prop directly
* yield createNotice
* Add note to indicate which Category
* Increase transient time to 3 days
* Use $gap-small
* Add proptype
* Add debounce to slider height resize listener
* Clean up isLoading logic
* Dont show image elements if image data is empty
* Open knowledge base posts in a new window
* Add “noreferrer”
* Turn the tab on in all env
Co-authored-by: Daniel Bitzer <danielbitzer@gmail.com>
* Make WooCommerce breadcrumbs use WooCommerce branding if it is installed
* Undo everything
* Whoops, add missing reverted code
* Push 'WooCommerce' out to breadcrumbs from the server except for where it is built up on the client
* Pass translated 'WooCommerce' down from the server to the front end
* Fix comment
* Use `admin_url` to build up the URL
Co-Authored-By: Ron Rennick <ron@ronandandrea.com>
* Use admin_url()
Co-Authored-By: Ron Rennick <ron@ronandandrea.com>
* Show WooCommerce breadcrumb on analytics pages
* Stop double appending the admin URL to the root WooCommerce breadcrumb url
Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Ron Rennick <ron@ronandandrea.com>
* Script that hides or shows menu items
* Hook up buttons to task list, hook up options to onboarding-experience to set up the menu
* Fix some little code style issues
* Remove LinkButton in favour of the existing Button in @wordpress/components
* Remove reference to removed style file
* Move menu experience script to /client/wp-admin-scripts to match current style
* Only load the onboarding menu experience script if onboarding is enabled
* Localise some strings
* Separate the "Setup" link from the existing items to avoid conflicts with extensions that modify the menu
* Use the item key instead of title to report back completed tasks
* Change from skip_option to reason to make this easier to grok
* Use existing woocommerce_task_list_hidden option instead of creating a new one
* Tweak options to get menu experience working again
* Simplify skip actions logic
* Preload woocommerce_task_list_do_this_later option
* Nicer event key names
* Clean up the styling
* Remove wcSettings.onboarding check from the task items list in `customizable`
* Remove spinner from customizable
* Fix translated string for WooCommerce menu setup anchor
* Use predef color instead of a hard-coded hex code
* Remove superfluous ={ true } from markup
Co-authored-by: Rebecca Scott <me@becdetat.com>
* Try: Moving Customers to main Woo Menu (https://github.com/woocommerce/woocommerce-admin/pull/3632)
* Only add onboarding settings on wc-admin pages when task list should be shown. (https://github.com/woocommerce/woocommerce-admin/pull/3722)
* Use cron for unsnoozing admin notes (https://github.com/woocommerce/woocommerce-admin/pull/3662)
* Use wp-cron for admin note snoozing.
* Remove "unsnooze" scheduled action.
* Use correct version.
* Avoid using deprecated method for unscheduling actions.
* Onboarding: Fix toggle tracking events (https://github.com/woocommerce/woocommerce-admin/pull/3645)
* Fix errant wcadmin prefix on event name
* Track the onboarding toggle on the option in case enable_onboarding isn't used
* Move toggle actions to separate function
* Move onboarding actions
* Move onboarding filters
* Move help tab updates to add_toggle_actions
* Only run onboarding actions when enabled
* Onboarding: Add tracks events when profiler steps are completed (https://github.com/woocommerce/woocommerce-admin/pull/3726)
* Add tracks for store profiler step completion
* Record event when profiler is completed
* Ensure continue setup loads the onboarding profiler (https://github.com/woocommerce/woocommerce-admin/pull/3646)
* 'All that include' option removed when input field is empty (https://github.com/woocommerce/woocommerce-admin/pull/3700)
* 'All that include' option removed when input field is empty
Added a control to check that when the input field 'Search by customer name' is empty, the 'All that include' option is not appearing.
* Const name improved
The constant name hasValues was changed to optionsHaveValues (more descriptive)
* Fix select text alignment (https://github.com/woocommerce/woocommerce-admin/pull/3723)
Co-authored-by: Timmy Crawford <timmyc@users.noreply.github.com>
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
Co-authored-by: Fernando <ultimoround@gmail.com>
Co-authored-by: edmundcwm <edmundcwm@gmail.com>
* 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>
* Style Search component for 5.3.
* Reset native select control styles.
* Fix styling of selected radio options.
* Fix bottom margin on select inputs in filters and pagination.
* Update DropdownButton styles for WP 5.3.
* Style DropdownButton arrow as a chevron.
* Fix tooltip arrow styling.
* Style TextControlWithAffixes for WP 5.3.
* Flatten pagination button style.
* Use SelectControl for StoreAlert snooze action.
* Remove 3D look and use chevron on SplitButton.
* Add changelog entry.
* Fix stylelint issues.
* Update test snapshots.
* Add TextControlWithAffixes disabled prop to documentation and proptypes.
* Use WP checkboxes in ReportTable columns.
* Fix TableCard header background colors.
* Add padding to EllipsisMenu toggle controls.
* Remove version-specific styles.
We require WP 5.3 as a minimum now.
* Revert "Revert "Update to new Snackbar component and notice store""
* Update uploader component to use createNotice
* Bump required WP version to 5.2
* Update required PHP and WP versions in plugin header
* Add new wordpress/components version and fix dependencies
* Add in snackbar styling and gutenberg variables
* Convert all existing notice actions to wordpress/notices
* Fix linting errors
* Add package.lock changes
* Update search list control snapshots with new attributes
* 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
* Add profiler body class on initial load, and respect skipped/complete status.
* Handle PR feedback: Remove unnecessary global, add some todos, added a filter around the next step slug, generalized the is-loading class a bit.