* Remove use of wc-admin-settings from packages
* Move getSetting to getAdminSetting and remove wc-admin-settings package
* Add changelog
* Update package.json and remove last use of wc-admin-settings
* Initial set up for the WCAdminSettingsRegistry
* Make use of filter for admin settings
* Add wc/settings package and remove depreciated dropzone wrapper
* Make use of the getSetting function instead of accessing window directly
* Add comments
* Add changelog
* Remove un needed changes
* Update dropzone provider logic and fix styling
* Remove old css
* Add initial payment recommendations code for the payments settings
* Added request data for the recommended payments
* Some styling updates and make sure it does not show when marketplace suggestions is disabled
* Update url
* Update comment in php class
* Add tests
* Fix lint errors
* Remove unnecessary type
* Fix lint error
* Fix broken test
* Convert plugin package to typescript
* Fix lint errors
* Add changelog
* Add support for locale-data
* Fix track name
* Fix up the tests
* Fix lint errors
* Address PR feedback
* Add tests for option hydration
* Make types more robust in plugins reducer
* Made use of SlotFill component instead of page registry and router
* Removed console log, and fixed types
* Add newer version of i18n to data package, for newer types
* Make the request to WooCommerce.com more restrictive
* Fix path of import
* Update PHP with suggested changes
* Remove SlotFill with applyFilters
* Update copy and PR feedback
* Update package lock
* Updated package lock
* Fix the package lock
* Added dot, and some minor styling changes
* Add test instructions
* Move navigation to WC header
* Remove wp toolbar class
* Set body margin on header change
* Fix up layout margins
* Remove excess padding on mobile
* Fix navigation preload styles and embed
* Fix preloading space due to adminbar missing
* Remove embed padding on wrap
* Fix body display for wpadmin menu
* Fix up wpadminbar reset padding
* Remove body padding on full screen layouts
* Fix mobile admin bar height on full screen
* Clean up body margin on unmount
* Center the activity panel (https://github.com/woocommerce/woocommerce-admin/pull/6289)
* Center the activity panel
* Handle PR feedback
* Fix up secondary nav group style changes
* Remove screen reader style changes
* Debounce resize event
* Make responsive button selector more specific
Co-authored-by: Hsing-Yu Flowers <hsingyuc.7@gmail.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
Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.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
* 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>
* Initial user preferences custom hook (wc meta).
* Organize dependencies.
* Specify dependencies in useSelect() call.
* Remove specifying preference keys.
There's currently no performance benefit to be had.
* Add HoC for hydrating current user data.
* Add user prefs update method.
* Export user prefs hook and HoC in data package.
* Handle error condition when updating user preferences.
* Use closure to get user ID for prefs update.
* Refactor analytics dashboard to use new user hook.
* Refactor ReportTable component to use new user hook.
* Move prop access to top of function component.
* Add todo for potential manual resolution logic.
* Refactor DashboardCharts component to use new user preferences hook.
* Move code out of functional component where possible.
* Fix chart interval query property.
* Refactor Leaderboards component to use new user preferences hook.
* Move code out of functional component where possible.
* Refactor Inbox panel to use user prefs hook.
@todo - updating last read isn't working.
* Use user prefs hook in StatsOverview component.
* Export user preferences store name.
* Use new store for unread inbox indicator.
* Hydrate current user data higher up in the app.
* Update "last read" timestamp in inbox panel.
* Fix StatsOverview test.
* Remove unused dispatch method from StorePerformance component.
* Remove now defunct user methods from wc-api spec.
* Add tests for isRequesting.
* JSON decode WC meta on updated user object.
* Test user prefs retrieval and save.
* Remove todo comment.
* Use user prefs hook in Jetpack install CTA on homepage.
* 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>
* Add base nav component
* Check if current screen is WC registered page
* Add core menu items
* Add param for menu items to migrate and hide old menu items
* Add body classes for wc navigation
* Check capability before adding menu items
* Add submenu items to frontend component
* Hide wc nav behind option
Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
add data store for settings using wp.data
add use-select-with-refresh example
replace fresh-data usage with new settings data store for settings page
Add data package
move to packages
Fix isDirty after save
Add isBusy to primary button when saving
update Readme
remove comment
readme to use useSelect
Revert "update Readme"
This reverts commit 7402fd49b8f384fde5878e0bee0616f0a87bb4f6.
Data Layer: Settings page to use Settings store (https://github.com/woocommerce/woocommerce-admin/pull/3430)
* Data Layer: Settings store as source of truth for settings page
This reverts commit 7402fd49b8f384fde5878e0bee0616f0a87bb4f6.
* fixup
* save on reset
* non mutable constants
* add set/getSettings
* save using setSettings
* separate HOC
* cleanup
* remove settingsToData
* withHydration
* remove withSettings HOC
* renmove useSettins for now
* withSettingsHydration updates
* Revert "withSettingsHydration updates"
This reverts commit f2adf108fbe19b574978fea5925a1a18e7ed3007.
* rename withSettingsHydration
* redo withSettingsHydration simplification
* restore
* useSettings
* render using useSettings
* handleInputChange working
* get setIsDirty working
* saving works
* reset and cleanup
* cleanup
* use snake case on hook files
* use clearIsDirty
* Avoid mutation on setting update
* remove @todo
* persiting -> isPersisting
* better reducer ternaries
* add wcSettings as arg to withSettingsHydration
reset package-lock
Settings: split out mutable wcAdminSettings (https://github.com/woocommerce/woocommerce-admin/pull/3675)
Settings: handle async settings groups (https://github.com/woocommerce/woocommerce-admin/pull/3707)
* 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>
* 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 initial transient notices component
* Animate notices to slide in and out
* Add notices to wc-api
* Map notices from wc-api to transient notices
* Add success message on settings save
* Add save notices to Settings page
* Remove all margin and padding from notice box when empty
* Add role alert to transient notices
* Add prefers reduced motion media query for transient animation
* Remove initial test notice
* Remove notices from wc-api
* Add wc-admin store for transient notices
* Pull transient notices from newly implemented store
* Use speak instead of role alert for accessibility
* Only show success message after request is complete
* Destructure state in componentDidUpdate
* Add store notice tests and fixtures
* Add box shadow to transient notice
* Move transient notices to bottom left
* Fix indentation
* data: Add @fresh-data/framework to package.json
* data: Add fresh-data and replace orders in table
This PR adds fresh-data with a WooCommerce API spec to fulfill order
information. It then replaces the existing selectors for the orders
table with the new selectors as a proof-of-concept.
* wc-api: Add temporary code for `withSelect`
This adds temporary code for a `withSelect` function outside of
`@wordpress/data` until the context PR is merged:
https://github.com/WordPress/gutenberg/pull/11460
* wc-api: Update fresh-data to 0.5.0
* Importing all components from a root components file
* Update Ratings component to avoid circular dependencies, fix tests
* Export components on `wc.components`, use this for importing
* Move react-dates initialize to the components file
* Push query changes to history
Fixes an issues where native a links do not update the query in `history`
* Update test config for new @woocommerce/components path
* Update chart components import
* Merge simple/complex & alphabetize by first exported name
* Add a readme with info about how to call these components
* Move non-reset SCSS to a new file
* Split shared files and “meta” files into two folders
This also creates two new base scss files for the different app vs embedded CSS files
* Move notice & embed-specific css out of reset
* Update README with folder structure notes
* Makes the header/sidebar component embeddable on other WooCommerce pages.
* Some mobile CSS fixes to make sure the header bar displays properly on smaller screensizes.
* Refactor notices and pull out success message from the panel
* Handle positioning of screen options, update message handling, css fixes and header height increase to match mockups, some code cleanup
* Only enable the header embed on normal/classic WooCommerce pages, and provide a method for plugins to opt-in.
This change also builds nicer breadcrumbs for pages.
* Code cleanup and consistent naming.
* Some spacing cleanup. Also updated the page title method to correctly set page titles in PHP for classic WC pages
* Refactor dashboard layout into new Layout components
* Style the new layout
* Use Slot/Fill for the Header component
* Center cards, fixed size for sidebar
* Only set the box-sizing on things within our app
* Make app the full height of the wp-admin frame
* Add styles to show/hide sidebar
* Toggle the sidebar
* Wrap router around entire Layout, use page setting to show/hide sidebar on page
* Fix the styles on show/hide buttons, add title & close button to the sidebar
* Use a min-height on visible sidebars
* Add/update READMEs
* Update space between main content & sidebar
* Adds SCSS color variables and breakpoint mixins
* Use webpack to pull in shared CSS
* Move notices reset rule to wpadmin-reset
* Prefix breakpoints, colors, and wpadmin reset