Commit Graph

182 Commits

Author SHA1 Message Date
Bec Scott 76ce5d84f3 Fix logic error that was stopping dismiss link from appearing on the inbox cards (https://github.com/woocommerce/woocommerce-admin/pull/4624)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-18 14:00:27 +10:00
Bec Scott d36fdc01d7 Add Insight note (https://github.com/woocommerce/woocommerce-admin/pull/4516)
* Add Insight note

* Change actioned_label to actioned_text

* Move actioned text up a level

* Fix comment

* Rename insight class

* Add deny action to insight first sale and fix the button actions

* fix spacing

* Tweak conditions in the inbox card

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-18 11:28:27 +10:00
Paul Sealock 03db742cdd Currency package: make naming clearer (https://github.com/woocommerce/woocommerce-admin/pull/4560) 2020-06-18 11:33:40 +12:00
Timmy Crawford 8dc7b4cbea G2: Remove pink/purple from ActivityPanels and Header (https://github.com/woocommerce/woocommerce-admin/pull/4586)
* G2: Remove pink/purple from ActivityPanels and Header

* Manage all orders purple.
2020-06-15 17:24:01 -07:00
Fernando f8d7dc13a2 Dismiss dropdown styles fixed (https://github.com/woocommerce/woocommerce-admin/pull/4569)
* Dismiss dropdown styles fixed

This commit fixes the "Dismiss" dropdown styles

* Text color replaced in Dismiss dropdown

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-12 17:55:42 -07:00
Paul Sealock 41481a7299 Button: Remove deprecated isDefault (https://github.com/woocommerce/woocommerce-admin/pull/4548) 2020-06-12 07:22:20 +12:00
Jeff Stieler 8a2750c973 Migrate user store to wp.data (https://github.com/woocommerce/woocommerce-admin/pull/4505)
* 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.
2020-06-10 11:46:46 -05:00
Fernando 7d42d389b8 Inbox notification: fixed Dismiss dropdowns for IE 11 (https://github.com/woocommerce/woocommerce-admin/pull/4504)
* Added refactor in "handleBlur" for IE compatibility

This commit adds a refactor in the method "handleBlur" for IE compatibility

* Modified styles for IE compatibility

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-10 10:32:55 -03:00
Fernando 621f568297 Inbox panel on the home screen (https://github.com/woocommerce/woocommerce-admin/pull/4496)
* Homepage InboxPanel integration

# Conflicts:
#	client/homepage/layout.js
#	client/homepage/test/index.js

* InboxPanel refactor

This commit removes "context" prop and adds "isPanelEmpty" method to InboxPanel.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-05 13:28:25 -03:00
Fernando d5b40ae01f Usage of URLSearchParams breaks in IE11 (https://github.com/woocommerce/woocommerce-admin/pull/4501)
* 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>
2020-06-05 13:07:28 -03:00
Fernando aefbafea9b Inbox notification: layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4218)
* Inbox notification: Added layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4256)

* Added notes layout and image to the API

Added note layout and note image to the API and the DB

* Unit test modified

Unit test where modified to adapt them to the new elements

* Changed the frontend following the new designs.

The fronted was changed to follow the new inbox messages design.

* Changed default layout type in DB

* Added all the requested visual element

Changed the cards' js, css and actions to achieve the visual requirements

* Added "layout" and "image" to inboxQuery

* Modal confirmation buttons repaired

* Added "layout" and "image" to docs examples.

* Removed "updateNote" from action.js

Removed "updateNote" from action.js, I left it by mistake.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* noteName removed and icon added to make code reviewing easier

This commit removes the "noteName" from card.js and adds the icon to make code reviewing easier

* Dismiss action button refactor

Refactor of the dismiss action button in the InboxNoteCard class

* Removed unnecessary control

* Destructured all the note properties

* Colors replaced by existing variable

* Removed setting of layout and image in the creation of the notes

* Removed blank lines added by mistake

* Close dismiss dropdown when clicking away from the  popover.

* Prevented the closing of the inbox panel with an action in the modal

* Added small design changes

* Removed unused "Gridicon" import

* Prevent showing the image tag when the layout is blank

* The method name getDismissButton was changed to getDismissConfirmationButton

* Removed unnecessary vendor-prefixed properties

* Improved note filtering in unreadNotes method

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Remove icons (https://github.com/woocommerce/woocommerce-admin/pull/4258)

* Info icon removed from inbox notifications

The info icon was removed from inbox notifications

# Conflicts:
#	src/Notes/DataStore.php

* Removed "icon" from inboxQuery

* Tests repeared

Some problems with the unit tests were repaired in this commit

# Conflicts:
#	docs/examples/activity-panel-inbox.md

# Conflicts:
#	tests/api/admin-notes.php

* Removed icon from card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Inbox notification: Add dismiss functionality (https://github.com/woocommerce/woocommerce-admin/pull/4262)

* Added is_deleted param to soft delete

# Conflicts:
#	src/API/Notes.php
#	src/Install.php
#	src/Notes/DataStore.php
#	src/Notes/WC_Admin_Note.php
#	src/Notes/WC_Admin_Notes.php
#	tests/api/admin-notes.php

* Added the Dismiss functionality

# Conflicts:
#	client/header/activity-panel/panels/inbox/action.js

* Where clause repeared

* Added Snackbar after action.

* API modified to dismiss notes

* Small refactor in "get_item" method

This commit adds a small refactor in "get_item" method to use "prepare_note_data_for_response"

* Added missing logic to Dismiss note

This commit adds missing client logic to Dismiss note.

# Conflicts:
#	client/header/activity-panel/panels/inbox/action.js
#	client/header/activity-panel/panels/inbox/card.js

* Moved the delete action to WC_Admin_Notes.php

The delete action was moved to WC_Admin_Notes.php to follow the pattern.

* Added changes to dismiss messages

This commit addeds changes to the  messages soft delete.

* DataStore.php repaired

This commits adds some code that was deleted by mistake and the param "is_deleted" has been escaped.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* Repaired "get_notes_where_clauses" method

A problem with the deleted notes was repaired

* Added a comment to DataStore.php

* Stopped sending the "dismissType" to action.js

The "dismissType" is not sent to action.js anymore.

* Bugfix: now the method get_notes_with_name also returns deleted notes

* Bugfix: repaired empty notification list

This commit repairs a bug that happens when there isn't anything in the inbox notification list

* Small refactor to not use "some" Lodash method anymore

* Small refactor in rednderNotes method

* Added check to set_layout

* Added small refactor to delete_all_notes method

* Fixed code comment error

* Bugfix: repaired the "delete_note" call

* Inbox notification: Added layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4256)

* Added notes layout and image to the API

Added note layout and note image to the API and the DB

* Unit test modified

Unit test where modified to adapt them to the new elements

* Changed the frontend following the new designs.

The fronted was changed to follow the new inbox messages design.

* Changed default layout type in DB

* Added all the requested visual element

Changed the cards' js, css and actions to achieve the visual requirements

* Added "layout" and "image" to inboxQuery

* Modal confirmation buttons repaired

* Added "layout" and "image" to docs examples.

* Removed "updateNote" from action.js

Removed "updateNote" from action.js, I left it by mistake.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* noteName removed and icon added to make code reviewing easier

This commit removes the "noteName" from card.js and adds the icon to make code reviewing easier

* Dismiss action button refactor

Refactor of the dismiss action button in the InboxNoteCard class

* Removed unnecessary control

* Destructured all the note properties

* Colors replaced by existing variable

* Removed setting of layout and image in the creation of the notes

* Removed blank lines added by mistake

* Close dismiss dropdown when clicking away from the  popover.

* Prevented the closing of the inbox panel with an action in the modal

* Added small design changes

* Removed unused "Gridicon" import

* Prevent showing the image tag when the layout is blank

* The method name getDismissButton was changed to getDismissConfirmationButton

* Removed unnecessary vendor-prefixed properties

* Improved note filtering in unreadNotes method

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Remove icons (https://github.com/woocommerce/woocommerce-admin/pull/4258)

* Info icon removed from inbox notifications

The info icon was removed from inbox notifications

# Conflicts:
#	src/Notes/DataStore.php

* Removed "icon" from inboxQuery

* Tests repeared

Some problems with the unit tests were repaired in this commit

# Conflicts:
#	docs/examples/activity-panel-inbox.md

# Conflicts:
#	tests/api/admin-notes.php

* Removed icon from card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Improved error handling for the set_layout method

* Bugfix: fixed error handling clicks inside dropdowns

* Bugfix: repaired dropdown onBlur handler

This commit repairs a weird behavior that the dropdown onBlur handler method had sometimes.

* Text error changed

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Add undo snackbar button after deletion (https://github.com/woocommerce/woocommerce-admin/pull/4281)

* Added undo snakbar button for a single note

# Conflicts:
#	client/wc-api/notes/mutations.js
#	src/Notes/DataStore.php
#	src/Notes/WC_Admin_Notes.php

* Added a button to undo the deletion of all notes

# Conflicts:
#	client/wc-api/notes/operations.js
#	src/API/Notes.php

* Code adapted to make code reviewing easier

There was some code that also was present in another PR, that code was removed to make code reviewing easier.

* UnitTest added

This commit adds some unit tests

* Added verification for API response

* Added casting to $note_id

* Inbox notification: Added layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4256)

* Added notes layout and image to the API

Added note layout and note image to the API and the DB

* Unit test modified

Unit test where modified to adapt them to the new elements

* Changed the frontend following the new designs.

The fronted was changed to follow the new inbox messages design.

* Changed default layout type in DB

* Added all the requested visual element

Changed the cards' js, css and actions to achieve the visual requirements

* Added "layout" and "image" to inboxQuery

* Modal confirmation buttons repaired

* Added "layout" and "image" to docs examples.

* Removed "updateNote" from action.js

Removed "updateNote" from action.js, I left it by mistake.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* noteName removed and icon added to make code reviewing easier

This commit removes the "noteName" from card.js and adds the icon to make code reviewing easier

* Dismiss action button refactor

Refactor of the dismiss action button in the InboxNoteCard class

* Removed unnecessary control

* Destructured all the note properties

* Colors replaced by existing variable

* Removed setting of layout and image in the creation of the notes

* Removed blank lines added by mistake

* Close dismiss dropdown when clicking away from the  popover.

* Prevented the closing of the inbox panel with an action in the modal

* Added small design changes

* Removed unused "Gridicon" import

* Prevent showing the image tag when the layout is blank

* The method name getDismissButton was changed to getDismissConfirmationButton

* Removed unnecessary vendor-prefixed properties

* Improved note filtering in unreadNotes method

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Remove icons (https://github.com/woocommerce/woocommerce-admin/pull/4258)

* Info icon removed from inbox notifications

The info icon was removed from inbox notifications

# Conflicts:
#	src/Notes/DataStore.php

* Removed "icon" from inboxQuery

* Tests repeared

Some problems with the unit tests were repaired in this commit

# Conflicts:
#	docs/examples/activity-panel-inbox.md

# Conflicts:
#	tests/api/admin-notes.php

* Removed icon from card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Inbox notification: Add dismiss functionality (https://github.com/woocommerce/woocommerce-admin/pull/4262)

* Added is_deleted param to soft delete

# Conflicts:
#	src/API/Notes.php
#	src/Install.php
#	src/Notes/DataStore.php
#	src/Notes/WC_Admin_Note.php
#	src/Notes/WC_Admin_Notes.php
#	tests/api/admin-notes.php

* Added the Dismiss functionality

# Conflicts:
#	client/header/activity-panel/panels/inbox/action.js

* Where clause repeared

* Added Snackbar after action.

* API modified to dismiss notes

* Small refactor in "get_item" method

This commit adds a small refactor in "get_item" method to use "prepare_note_data_for_response"

* Added missing logic to Dismiss note

This commit adds missing client logic to Dismiss note.

# Conflicts:
#	client/header/activity-panel/panels/inbox/action.js
#	client/header/activity-panel/panels/inbox/card.js

* Moved the delete action to WC_Admin_Notes.php

The delete action was moved to WC_Admin_Notes.php to follow the pattern.

* Added changes to dismiss messages

This commit addeds changes to the  messages soft delete.

* DataStore.php repaired

This commits adds some code that was deleted by mistake and the param "is_deleted" has been escaped.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* Repaired "get_notes_where_clauses" method

A problem with the deleted notes was repaired

* Added a comment to DataStore.php

* Stopped sending the "dismissType" to action.js

The "dismissType" is not sent to action.js anymore.

* Bugfix: now the method get_notes_with_name also returns deleted notes

* Bugfix: repaired empty notification list

This commit repairs a bug that happens when there isn't anything in the inbox notification list

* Small refactor to not use "some" Lodash method anymore

* Small refactor in rednderNotes method

* Added check to set_layout

* Added small refactor to delete_all_notes method

* Fixed code comment error

* Bugfix: repaired the "delete_note" call

* Inbox notification: Added layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4256)

* Added notes layout and image to the API

Added note layout and note image to the API and the DB

* Unit test modified

Unit test where modified to adapt them to the new elements

* Changed the frontend following the new designs.

The fronted was changed to follow the new inbox messages design.

* Changed default layout type in DB

* Added all the requested visual element

Changed the cards' js, css and actions to achieve the visual requirements

* Added "layout" and "image" to inboxQuery

* Modal confirmation buttons repaired

* Added "layout" and "image" to docs examples.

* Removed "updateNote" from action.js

Removed "updateNote" from action.js, I left it by mistake.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* noteName removed and icon added to make code reviewing easier

This commit removes the "noteName" from card.js and adds the icon to make code reviewing easier

* Dismiss action button refactor

Refactor of the dismiss action button in the InboxNoteCard class

* Removed unnecessary control

* Destructured all the note properties

* Colors replaced by existing variable

* Removed setting of layout and image in the creation of the notes

* Removed blank lines added by mistake

* Close dismiss dropdown when clicking away from the  popover.

* Prevented the closing of the inbox panel with an action in the modal

* Added small design changes

* Removed unused "Gridicon" import

* Prevent showing the image tag when the layout is blank

* The method name getDismissButton was changed to getDismissConfirmationButton

* Removed unnecessary vendor-prefixed properties

* Improved note filtering in unreadNotes method

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Remove icons (https://github.com/woocommerce/woocommerce-admin/pull/4258)

* Info icon removed from inbox notifications

The info icon was removed from inbox notifications

# Conflicts:
#	src/Notes/DataStore.php

* Removed "icon" from inboxQuery

* Tests repeared

Some problems with the unit tests were repaired in this commit

# Conflicts:
#	docs/examples/activity-panel-inbox.md

# Conflicts:
#	tests/api/admin-notes.php

* Removed icon from card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Improved error handling for the set_layout method

* Bugfix: fixed error handling clicks inside dropdowns

* Bugfix: repaired dropdown onBlur handler

This commit repairs a weird behavior that the dropdown onBlur handler method had sometimes.

* Text error changed

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Stopped sending the "dismissType" to action.js

The "dismissType" is not sent to action.js anymore.

# Conflicts:
#	client/header/activity-panel/panels/inbox/card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Bugfix: solved problem when a note was undismissed

There was a problem with the undismiss functionality. When a note was undismissed, it always was recovered with "plain" layout. This commit solves this problem.

* Inbox notification: add event recording (https://github.com/woocommerce/woocommerce-admin/pull/4320)

* Added events recording

This commit adds events recording to the inbox notifications

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Added 'home_screen' verification

Changed recorded name, now when the client is in the WooCommerce 'home' page we record 'home_screen' instead of 'wc-admin'.

* Added a naming fix and a new prop to the recordEvent

* bugfix: added control before interaction with bodyNotificationRef

* Added more unit tests for new endpoints

This commit adds tests for deleting a single note and for deleting all the notes, both without permission.

* Modified variable name

* Refactor: prop rename and small logic change

* Screen name getter moved into the InboxNoteCard

This commit moves the screen name getter inside the InboxNoteCard.

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Removed "screen" from state

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Refactor in admin-notes unit tests

Some unnecessary controls were removed from the admin-notes unit tests

* Indentation fixed in Install.php. Replaced spaces with tabs.

* Inbox notification: added new placeholder and empty card (https://github.com/woocommerce/woocommerce-admin/pull/4379)

* Added a new placeholder and an empty card

This commit adds a new placeholder and a new empty card to the inbox panel

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js
#	client/header/activity-panel/panels/inbox/style.scss

* Added border to read notes

* Improved note filtering in unreadNotes method and validNotes

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Actions render refactored

The actions render was refactored in InboxNoteCard component

* Refactor of InboxPanel component

The methods getUnreadNotesCount and hasValidNotes were separated from the InboxPanel component

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Refactor inbox panel subtitle classes

* Added changes for when a note is undismissed

This commit adds the requested changes in behavior and design for when a note is dismissed.

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Bugfix: Added key to itemlist

The InboxNotePlaceholder is shown as an itemlist but it didn't have a key. This commit adds it.

* Removed unnecessary validation

* Refactored actionList map

This commit adds a refactor to the actionList map

* Changes to the getUndoDismissRequesting functionality

This commit adds a few changes to the getUndoDismissRequesting functionality

* Changed className prop

* Changed other className prop

* Modified InboxPanel rendering

* Removed unnecessary method in placeholder.js

* Simplified the card.js renderActions method

* Change renderActions return in card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Inbox notification: add client unit tests (https://github.com/woocommerce/woocommerce-admin/pull/4386)

* Added client unit tests

* Added test cases for getUnreadNotesCount and hasValidNotes

* Corrected typo error

* Removed Enzyme and added React Testing Library

* Removed unnecessary param

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Resolved some conflicts with master

* Marketing note test repaired

This commit repairs the marketing note test

* Added note type 'marketing' to delete all functionality

* Removed set_icon method from some notes and docs

* Added set_icon method as deprecated to prevent errors.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2020-06-03 08:43:35 -03:00
Paul Sealock 16cb332f28 IconButton: Replace with Button (https://github.com/woocommerce/woocommerce-admin/pull/4415) 2020-05-29 14:32:37 +12:00
Joshua T Flowers f132e35c7b Add EU VAT extension note (https://github.com/woocommerce/woocommerce-admin/pull/4452)
* Add EU VAT extension note

* Add note types to default notes query
2020-05-28 11:52:25 +03:00
David Stone 8ebd33fe6b Use Route based code splitting to optimize bundle size (https://github.com/woocommerce/woocommerce-admin/pull/4094)
* 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>
2020-04-29 12:01:27 -06:00
Jeff Stieler 267c95e8d5 Reduce queries in Inbox Panel. (https://github.com/woocommerce/woocommerce-admin/pull/3977)
* Notes panel: only request fields needed for render.

* Avoid retrieving post meta for WC_Admin_Note objects.

It's an ID collision anyhow.
2020-04-22 10:05:11 -06:00
Paul Sealock cb4ba39e30 Dynamic Currency with Context API (https://github.com/woocommerce/woocommerce-admin/pull/4027)
* Make currency setting dynamic with context API

* reference Currency

* what is 'this'

* remove comment

* All report tables

* Customers report

* activity panel

* leaderboard test

* business details

* store details

* single source of truth

* shipping rates

* remove currency-format.js

* tidy up

* make Currency a factory function

* factory revenue table

* tables

* Chart y-axis labels

* customers table

* cleanup

* business details

* shipping

* number-format

* stock and downloads tables

* changelog

* cleanup

* SQL example: update to dynamic currencies (https://github.com/woocommerce/woocommerce-admin/pull/4033)
2020-04-03 10:54:38 +13:00
Jeff Stieler f13b9f334f Reduce queries in Orders Panel. (https://github.com/woocommerce/woocommerce-admin/pull/3969)
* Allow on-demand retrieval of order line items in REST API.

* Orders Panel: reduce response fields from orders endpoint.
2020-03-27 13:01:19 -06:00
Darren Ethier 783f613815 wp.data Settings refactor
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)
2020-03-25 16:20:17 +13:00
James Koster fa9a4d8314 style and icon updates (https://github.com/woocommerce/woocommerce-admin/pull/3965) 2020-03-24 11:21:20 -07:00
Bec Scott dd279a5cc1 Make WooCommerce breadcrumbs use WooCommerce branding if it is installed (https://github.com/woocommerce/woocommerce-admin/pull/3798)
* 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>
2020-03-24 08:57:16 +10:00
Timmy Crawford f5d0da0b19 Merge final `version/1.0` branch with `master` (https://github.com/woocommerce/woocommerce-admin/pull/3848)
* 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)

* Stock panel indicator - cache and use lookup tables. (https://github.com/woocommerce/woocommerce-admin/pull/3729)

* Stock panel indicator - cache and use lookup tables.

* Revise query, clear transient on product update.

* Fix error, ht Josh.

* Checklist: Remove sideloaded images to reduce build size, take 2 (https://github.com/woocommerce/woocommerce-admin/pull/3731)

* Remove homepage template images.

* Use other-small on all industries, adjust text color.

* Remove background dim and opacity set to 0

* Fix/3631 (https://github.com/woocommerce/woocommerce-admin/pull/3730)

* Added CBD as an industry type

CBD was added as an industry type in API

* Industries options modified

Modified the industries options. Now we are able to choose if we will use an input or not in the option.

* API control changed for industries.

API control changed for industries. Now it accepts the data type we need.

* Added input in Industries list for the option "Other"

Added an input for the option "Other" in the industries list

* Added suggested changes in review comments.

* Added data preparation for recordEvent

* Changed variable to snake_case

The variable "industriesWithDetail" was changed to "industries_with_detail" (snake_case)

* Onboarding: Create homepage without redirect (https://github.com/woocommerce/woocommerce-admin/pull/3727)

* Add link to edit homepage instead of redirect

* Add busy state to homepage creation button

* Publish homepage on create via API

* Update homepage notice to show on first post update

* Update homepage creation notice per design

* Record event on customize homepage

* Set homepage to frontpage on creation

* Add deactivation note for feature plugin (https://github.com/woocommerce/woocommerce-admin/pull/3687)

* Add version deactivation note

* Add the note to deactivate if the version is older than the current WC version

* Deactivate wc admin feature plugin on action click

* Add notes version hooks

* change the Package class namespace to exclude from standalone autoloader

* add use statement for FeaturePlugin

* add note explaining namespace

* use wc-admin-deactivate-plugin note name

* Rename file and class to WC_Admin_Notes_Deactivate_Plugin

Co-authored-by: Ron Rennick <ron@ronandandrea.com>
Co-authored-by: Paul Sealock <psealock@gmail.com>

* Add Travis tests on GH for release branch (https://github.com/woocommerce/woocommerce-admin/pull/3751)

* Add Travis tests on GH for release branch

* fix linter errors

* ActivityPanels.php -> use public static functions

* Remove free text Search option when no query exists (https://github.com/woocommerce/woocommerce-admin/pull/3755)

* Revert changes in woocommerce/woocommerce-admin#3700

* Don't add free text search if no query exists

* Add tests for Search without query

* Add test for showing free text search option

* Fix image sideloading for store industries. (https://github.com/woocommerce/woocommerce-admin/pull/3743)

* Fix image sideloading for store industries.

Data format changed in https://github.com/woocommerce/woocommerce-admin/pull/3730

* Fix industry image sideload in cases where the count is less than requested.

* Be backwards compatible with the old industry data format.

* Added event props to identify stores with WCS and Jetpack installed (https://github.com/woocommerce/woocommerce-admin/pull/3750)

* Added event props to identify stores with WCS and Jetpack installed

Also, added Jeckpack connected status

* Improved variable name

* Simplified method

Simplified method. "intersection" check was removed

* Tests errors repeared

The method "clear_low_out_of_stock_count_transient" now is static.

* OBW: fix sideloading image test error (https://github.com/woocommerce/woocommerce-admin/pull/3762)

* Release 0.26.0 changes (https://github.com/woocommerce/woocommerce-admin/pull/3753)

* add deactivation hook to Package.php (https://github.com/woocommerce/woocommerce-admin/pull/3770)

* Add active version functions (https://github.com/woocommerce/woocommerce-admin/pull/3772)

* add active version functions to Package.php

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* 0.26.1 changes (https://github.com/woocommerce/woocommerce-admin/pull/3773)

* Customers Report: fix missing report param in search (https://github.com/woocommerce/woocommerce-admin/pull/3778)

* Product titles include encoded entities (https://github.com/woocommerce/woocommerce-admin/pull/3765)

* Stripped HTML from product titles and decoded before displaying them

Stripped html from product titles and entities are decoded before displaying them

* Stripped HTML from product titles and decoded in Stock report

Stripped html from product titles and entities are decoded before displaying them. Now in Stock report

* Added support for HTML tags and encoded entities on product titles

Added support for HTML tags and encoded entities on filtered product list, dropdown menus and tag names.
Also, strip_tags() function was replaced with wp_strip_all_tags() instead.

* strip_tags() function was replaced with wp_strip_all_tags() instead.

* Added control for a variable

Added control for "item->data" before applying wp_strip_all_tags method.

* pre-commit changes

* Test text corrected

* Enable taxes on automatic tax setup (https://github.com/woocommerce/woocommerce-admin/pull/3795)

* Update Country Labeling to Match Core (https://github.com/woocommerce/woocommerce-admin/pull/3790)

* Updated country labeling

Country labeling on Customer Report was updated

* Updated country labeling in other files

* remove .jitm-card notice padding (https://github.com/woocommerce/woocommerce-admin/pull/3814)

* OBW Connect: Fix requesting state (https://github.com/woocommerce/woocommerce-admin/pull/3786)

* OBW Connect: Fix requesting state

* pass down setIsPending

* setIspending propType

* defaultProps

* test

* Revert "test"

This reverts commit e921092b19401931cc1aec8ee84fa53c53b67f36.

* better comparison for redirect

* Fixes Taxes Report search bug and adds initial documentation. (https://github.com/woocommerce/woocommerce-admin/pull/3816)

* Initial Taxes Report documentation.

* Fix taxes endpoint search parameter.

* OBW: Fix retry plugin install button disappearing (https://github.com/woocommerce/woocommerce-admin/pull/3787)

* OBW: Fix retry plugin install btn disappearing

* try suggestion

* Revert "try suggestion"

This reverts commit 5b9386957a501ac3e729e5f16b0ee71c9d792859.

* Fix special character escaping in search. (https://github.com/woocommerce/woocommerce-admin/pull/3826)

* Properly prepare/escape special characters in Product search.

* Properly prepare/escape special characters in Coupon search.

* Properly prepare/escape special characters in Tax code search.

* Fix tracking on migrated options (https://github.com/woocommerce/woocommerce-admin/pull/3828)

* Don't track onboarding toggle if migrating options

* Prevent WC_Tracks from recording event post types not yet registered

* Activity Panels: Remove W Panel (https://github.com/woocommerce/woocommerce-admin/pull/3827)

* Remove W Notif Panel.

* Add back in trapping logic, and hide on non-embed pages.

* add npm run test:zip command (https://github.com/woocommerce/woocommerce-admin/pull/3823)

* add npm run test:zip command

* 1.0.0 release changes🎉 (https://github.com/woocommerce/woocommerce-admin/pull/3831)

* 1.0.0 release changes🎉

* changelog

* 0.26.1 changelog

* Add Report Extension Example: Add default props to ReportFilters (https://github.com/woocommerce/woocommerce-admin/pull/3830)

* ReportFilters component: Add sane defaults

* styles

* add required column

* add left join to sku ordering (https://github.com/woocommerce/woocommerce-admin/pull/3845)

* Deal with lint errors, and improperly merged files

* regenerate package-lock.json

* attempting to resolve package lock conflict.

Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
Co-authored-by: Ron Rennick <ron@ronandandrea.com>
Co-authored-by: Fernando <ultimoround@gmail.com>
Co-authored-by: edmundcwm <edmundcwm@gmail.com>
Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-03-10 15:47:39 +13:00
Ron Rennick 54d58ed13e Version/1.0 master merge (https://github.com/woocommerce/woocommerce-admin/pull/3797)
* 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)

* Stock panel indicator - cache and use lookup tables. (https://github.com/woocommerce/woocommerce-admin/pull/3729)

* Stock panel indicator - cache and use lookup tables.

* Revise query, clear transient on product update.

* Fix error, ht Josh.

* Checklist: Remove sideloaded images to reduce build size, take 2 (https://github.com/woocommerce/woocommerce-admin/pull/3731)

* Remove homepage template images.

* Use other-small on all industries, adjust text color.

* Remove background dim and opacity set to 0

* Fix/3631 (https://github.com/woocommerce/woocommerce-admin/pull/3730)

* Added CBD as an industry type

CBD was added as an industry type in API

* Industries options modified

Modified the industries options. Now we are able to choose if we will use an input or not in the option.

* API control changed for industries.

API control changed for industries. Now it accepts the data type we need.

* Added input in Industries list for the option "Other"

Added an input for the option "Other" in the industries list

* Added suggested changes in review comments.

* Added data preparation for recordEvent

* Changed variable to snake_case

The variable "industriesWithDetail" was changed to "industries_with_detail" (snake_case)

* Onboarding: Create homepage without redirect (https://github.com/woocommerce/woocommerce-admin/pull/3727)

* Add link to edit homepage instead of redirect

* Add busy state to homepage creation button

* Publish homepage on create via API

* Update homepage notice to show on first post update

* Update homepage creation notice per design

* Record event on customize homepage

* Set homepage to frontpage on creation

* Add deactivation note for feature plugin (https://github.com/woocommerce/woocommerce-admin/pull/3687)

* Add version deactivation note

* Add the note to deactivate if the version is older than the current WC version

* Deactivate wc admin feature plugin on action click

* Add notes version hooks

* change the Package class namespace to exclude from standalone autoloader

* add use statement for FeaturePlugin

* add note explaining namespace

* use wc-admin-deactivate-plugin note name

* Rename file and class to WC_Admin_Notes_Deactivate_Plugin

Co-authored-by: Ron Rennick <ron@ronandandrea.com>
Co-authored-by: Paul Sealock <psealock@gmail.com>

* Add Travis tests on GH for release branch (https://github.com/woocommerce/woocommerce-admin/pull/3751)

* Add Travis tests on GH for release branch

* fix linter errors

* ActivityPanels.php -> use public static functions

* Remove free text Search option when no query exists (https://github.com/woocommerce/woocommerce-admin/pull/3755)

* Revert changes in woocommerce/woocommerce-admin#3700

* Don't add free text search if no query exists

* Add tests for Search without query

* Add test for showing free text search option

* Fix image sideloading for store industries. (https://github.com/woocommerce/woocommerce-admin/pull/3743)

* Fix image sideloading for store industries.

Data format changed in https://github.com/woocommerce/woocommerce-admin/pull/3730

* Fix industry image sideload in cases where the count is less than requested.

* Be backwards compatible with the old industry data format.

* Added event props to identify stores with WCS and Jetpack installed (https://github.com/woocommerce/woocommerce-admin/pull/3750)

* Added event props to identify stores with WCS and Jetpack installed

Also, added Jeckpack connected status

* Improved variable name

* Simplified method

Simplified method. "intersection" check was removed

* Tests errors repeared

The method "clear_low_out_of_stock_count_transient" now is static.

* OBW: fix sideloading image test error (https://github.com/woocommerce/woocommerce-admin/pull/3762)

* Release 0.26.0 changes (https://github.com/woocommerce/woocommerce-admin/pull/3753)

* add deactivation hook to Package.php (https://github.com/woocommerce/woocommerce-admin/pull/3770)

* Add active version functions (https://github.com/woocommerce/woocommerce-admin/pull/3772)

* add active version functions to Package.php

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* 0.26.1 changes (https://github.com/woocommerce/woocommerce-admin/pull/3773)

* Customers Report: fix missing report param in search (https://github.com/woocommerce/woocommerce-admin/pull/3778)

* Product titles include encoded entities (https://github.com/woocommerce/woocommerce-admin/pull/3765)

* Stripped HTML from product titles and decoded before displaying them

Stripped html from product titles and entities are decoded before displaying them

* Stripped HTML from product titles and decoded in Stock report

Stripped html from product titles and entities are decoded before displaying them. Now in Stock report

* Added support for HTML tags and encoded entities on product titles

Added support for HTML tags and encoded entities on filtered product list, dropdown menus and tag names.
Also, strip_tags() function was replaced with wp_strip_all_tags() instead.

* strip_tags() function was replaced with wp_strip_all_tags() instead.

* Added control for a variable

Added control for "item->data" before applying wp_strip_all_tags method.

* pre-commit changes

* Test text corrected

* fix linting issues

* fix mis-merged changes

* Update jsdoc

Co-Authored-By: Paul Sealock <psealock@gmail.com>

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>
Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-03-03 11:22:32 +13:00
Paul Sealock 35462eab0d Coding standards: fix errors (https://github.com/woocommerce/woocommerce-admin/pull/3763) 2020-02-25 14:18:52 +13:00
Darren Ethier 33c5b41e3f Align WooCommerce javascript code standards/linting/styles with WordPress core. (https://github.com/woocommerce/woocommerce-admin/pull/3674)
* align code styles with the same configuration as Woo-Blocks

* initial pass of reformat-files

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

* Fix state mutation in image-upload

* remove unused pre-commit-hook.js

* requestAnimationFrame -> window.requestAnimationFrame

* wc-api eslint changes

* eslint fixes on client/lib and client/settings

* client/header eslint changes

* fixes for client/dashboard part 1

* fixes client/dashboard part 2 of 2

* client/analytics part 1

* client/analytics continued

* client/analytics, last batch

* rename __mock__ directory

* pass in useEffect, useState from React component or function

* remove '+' from sprintf string argument

* use ref instead of findDOMNode

* reformat and repaply package.json changes

* install deps before running linter in Travis

* useGetCountryStateAutofill

* counryStateAutofill

* countryStateAutofill

Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-02-14 15:23:21 +13:00
Fernando 387bf188a4 Decode breadcrumb correctly (https://github.com/woocommerce/woocommerce-admin/pull/3653)
When viewing the Accounts & Privacy tab in WooCommerce Settings, the page title in the breadcrumbs includes an "&amp;".
Now "decodeEntities" method is used to correct the breadcrumb.
2020-02-05 11:35:50 -08:00
Jeff Stieler 25c09563a1 Don't modify the document title on existing WooCommerce pages. (https://github.com/woocommerce/woocommerce-admin/pull/3585) 2020-01-20 10:34:24 -07:00
Joshua T Flowers d5444f6351 Updating unread stock indicator on stock update (https://github.com/woocommerce/woocommerce-admin/pull/3550)
* Force refetch of low product query after updating stock

* Continue showing unread indicator while fetching
2020-01-14 18:19:35 +08:00
Jeff Stieler 8a976c28bb Add initial Activity Panel documentation. (https://github.com/woocommerce/woocommerce-admin/pull/3525)
* Add initial Activity Panel documentation.

* Fix orders panel documentation.

* Additionally remove use of "ship" in messaging - not all stores sell physical products.
2020-01-08 12:25:13 -05:00
Jeff Stieler a5c4e13fbb Show pending review regardless of comment moderation settings (https://github.com/woocommerce/woocommerce-admin/pull/3459)
* Show pending reviews regardless of comment moderation settings.

* Filter "view reviews" link to show only product review comments.
2019-12-20 13:16:48 -05:00
Jeff Stieler 1c51cf94e0 Add filters to WP notice collapsing behavior. (https://github.com/woocommerce/woocommerce-admin/pull/3391)
* Add filters to WP notice collapsing behavior.

* Avoid modifying the WP notices NodeList inline.

* Add example showing WP notices filter usage.

* Keep hidden/shown notice widths consistent.
2019-12-18 08:12:32 -05:00
Ron Rennick dd5929ea46 scroll to notices when made visible while scrolled down (https://github.com/woocommerce/woocommerce-admin/pull/3390)
* scroll to notices when made visible while scrolled down

* use window.scrollY for calculating scroll
2019-12-17 16:24:58 -04:00
Jeff Stieler c2020507e3 Decouple Navigation from `wcSettings`. (https://github.com/woocommerce/woocommerce-admin/pull/3294)
* Move getAdminLink to wc-admin-settings.

* Add changelog entries.

* Look for `getAdminLink()` in @woocommerce/settings first.
2019-11-22 12:07:26 -05:00
David Levin 52cb35f4de Correcting and clarifying analytics terms and calculations (https://github.com/woocommerce/woocommerce-admin/pull/3104)
* Relabel Net Revenue to Net Sales, revert previous refund work on Gross revenue and rename to total sales. Update the orer of all the things

* Add gross sales calculation to revenue stats endpoint.

* Restore coupon_total when updating order stats.

* Wire up gross sales to revenue report.

* Fix revenue report refunds calculation when there are no refunds.

* update net sales labels and cases in order, product and category tables

* Subtract refunded shipping and taxes from gross sales.

* pluses to minuses to fix the gross revenue and refund totals when refunding

* Add gross_sales to revenue stats orderby enum.

* Change refund labels to Returns

* Remove usage of defunct coupon_total column.

* Store refunded amount in stats table.

* Rename "gross_total" column to "total_sales".

* Net total for refund orders can be used instead of a new column.

* Rename gross_revenue to total_sales.

* Coalesce coupons total in order stats query.

SUM()ing all nulls gives null, not zero.

* Use segmentation selections to backfill missing data.

Fo when report columns and segmentation columns don't match.

* Remove errant gross_sales from expected interval test data.

* Fix gross sales tests for revenue/stats.

* Move missing segment fills back to their original locations.

* Fix remaining tests failing because of gross sales.

* Fix db upgrade function rename of gross_total column.

* Fix linter errors.
2019-11-22 10:06:14 -05:00
Jeff Stieler 17514872ad Decouple currency and numbers packages from `wcSettings`. (https://github.com/woocommerce/woocommerce-admin/pull/3277)
* Remove wcSettings dependency from currency and number packages.

Either take a configuration object in function calls or in a new class constructor.

* Use new Currency class and number format methods in client/.

Compose with store settings to keep the same API.

* Don't reintroduce lodash dependency to currency package.

* Add changelog entries to currency and number packages.

* Update docs, example, and changelog for AdvancedFilters component.

* Use precision-less formatValue() for integer report values.

* Make Currency instance immutable.
2019-11-21 16:51:52 -05:00
Albert Juhé Lluveras 319cc65d22 Make WooCommerce brand localizable (https://github.com/woocommerce/woocommerce-admin/pull/3247)
* Make WooCommerce brand localizable

* Make HeaderLogo aria-label localizable
2019-11-14 16:24:42 +01:00
Jeff Stieler 26f23def50 Add Inbox note action indication (https://github.com/woocommerce/woocommerce-admin/pull/3039)
* Move inbox note actions to a bespoke component.

* Set busy state on action buttons on click.

* Allow for Note actions to be deleted.

* Update FB extension note after installation is complete.

* Link actions don't get busy treatment.

* Re-fetch note actions after updating.

Get new action IDs from the database.

* Add tracking to inbox note views. (https://github.com/woocommerce/woocommerce-admin/pull/3096)

* Move inbox note content to its own component.

* Send a tracks event when inbox notes are in the viewport.

Uses react-visibility-sensor.

* Match event data to `inbox_action_click`.
2019-10-24 10:13:05 -07:00
renovate[bot] 5797f2b82e Update wordpress monorepo (https://github.com/woocommerce/woocommerce-admin/pull/2929)
* Update wordpress monorepo

* Add missing Gutenberg grid variables

* Fix button styling

* Fix snapshots (new classes and events are passed through from WP components update)

* Adjust button overwrites

* Update package-lock.json

* Fix focus issues/conflicts with react-dates and Dropdown

* Maintain DateRange focus without impacting expected "click outside" behavior.

* Resolve multiple React versions, update testing dependencies.

* blow away package-lock.json and refresh

- this fixed tests after an npm install on my end

* Allow tabbing to month nav and calendar grid.

* Fix keyboard navigation of DayPicker elements.

Add prop for specifying an element that's allowed to take focus from DateRange.

* refresh package-lock
2019-10-23 11:18:32 -07:00
Darren Ethier fee65dd6ac Decouple wcSettings from published packages. (https://github.com/woocommerce/woocommerce-admin/pull/3001)
* refactor wcSettings in components to use new api

* update test snapshot

* refactor wcSettings in other packages

* fix how defaults are set for setting

* decouple siteLocale from ReportsFilters and AdvancedFilters

* Decouple currency settings from packages

AdvancedFilters, ReportFilters, and NumberFilters now receive currency info as props.

* decouple currency settings from `ReportChart`

* decouple `wcAdminAssetsUrl` setting from `EmptyContent`

- also refactors to remove the need for `ImageAsset` component.

* decouple OrderStatus from wcSettings

* decouple wcAdminUrl setting from ProductImage component

- this also implements a SVG for default product image.

* remove export for image-asset that is no longer present

* remove console.log

* update test snapshots for ProductImage
2019-10-11 11:45:45 -04:00
Jeff Stieler bfba456a46 Render a "manage" link on review inbox items. (https://github.com/woocommerce/woocommerce-admin/pull/3011)
* Render a "manage" link on review inbox items.

Instead of the SplitButton with multiple actions.

* Remove review ID from tracks event data.
2019-10-10 15:31:28 -07:00
Darren Ethier f8ebc4cd6d refactor all client files to use new settings api (https://github.com/woocommerce/woocommerce-admin/pull/3002) 2019-10-07 07:51:25 -04:00
Deiva Magalhaes c72abdc233 Fix issue woocommerce/woocommerce-admin#2992 (order number in orders panel) (https://github.com/woocommerce/woocommerce-admin/pull/2994) 2019-10-03 09:49:06 +13:00
Darren Ethier d728d38219 Refactor: Alternative approach to implementing extendable settings from the server (https://github.com/woocommerce/woocommerce-admin/pull/2917)
* integrate with new asset data registration (php side)

- includes back-compatibility.

* update js configuration and implement settings alias

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

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

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

* missed one spot for adding new filter implementation

* fix incorrect jest config

* Avoid unnecessary assignment and directly return.

* Remove unnecessary defaults

* Fix inline comment text case.

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

* Remove unnecessary inline comment.

* use @todo instead of TODO

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

* fix incorrect reference in webpack config.

* add missing import and slightly delay dependency injection for scripts

* update get-setting and set-setting callbacks

* disable lint rule for console.error on dev doc builds
2019-09-23 17:47:08 -04:00
Justin Shreve e67b556ac9 Update to Color Studio v2.1.0 (https://github.com/woocommerce/woocommerce-admin/pull/2837)
* Update color-studio to v2.1.0

* Handle additional color updates after rebase.
2019-08-29 12:07:56 -04:00
Ron Rennick 44bf577938 display local time on note instead of UTC 2019-08-20 19:38:56 -03:00
Paul Dechov 527f390d35 Sync active tab indicator with activity panel transition 2019-07-24 21:43:49 -04:00
Paul Dechov 21217f4b0b Animate wrapper instead of content on switch 2019-07-24 21:43:46 -04:00
Paul Dechov 7223c3396c Keep content during close transition
Doesn't clear currentTab until transition ends.
2019-07-24 21:42:57 -04:00
Paul Dechov 765b826105 Transition transform rather than width on open/close 2019-07-24 21:40:52 -04:00
Jeff Stieler 64d44bd905 Merge pull request woocommerce/woocommerce-admin#2659 from woocommerce/fix/2592-orders-linger
Reduce order status change delay in Orders Panel.
2019-07-18 08:20:39 -06:00
Jeff Stieler 5a859ab919 Fix "non actionable" order query. 2019-07-18 08:09:50 -06:00