woocommerce/plugins/woocommerce-admin/client/inbox-panel/style.scss

233 lines
3.7 KiB
SCSS
Raw Normal View History

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 11:43:35 +00:00
.woocommerce-inbox-message {
position: relative;
color: $gray-text;
background: $studio-white;
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 11:43:35 +00:00
border-radius: 2px;
@include font-size( 13 );
margin: 0 0 $gap-large;
-ms-box-orient: horizontal;
&.banner {
-webkit-flex-direction: column;
flex-direction: column;
img {
width: 100%;
height: 120px;
}
}
&.thumbnail {
display: flex;
-webkit-flex-direction: row-reverse;
flex-direction: row-reverse;
img {
width: 128px;
height: 100%;
}
}
.woocommerce-homepage-column & {
margin: 20px 0;
}
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 11:43:35 +00:00
&:not(.is-placeholder) {
border: 1px solid $gray-200;
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 11:43:35 +00:00
}
.line {
width: 100%;
}
.third-line {
width: 33%;
}
.fifth-line {
width: 20%;
}
.sixth-line {
width: 16%;
}
}
.woocommerce-inbox-message__content {
.woocommerce-inbox-message__title {
color: $gray-900;
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 11:43:35 +00:00
@include font-size( 16 );
font-style: normal;
line-height: 1.5;
font-weight: bold;
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 11:43:35 +00:00
margin: $gap-smaller 0;
.is-placeholder & {
& > div {
@include placeholder();
margin: 5px 0;
}
margin-bottom: 10px;
}
}
.woocommerce-inbox-message__date {
color: $gray-700;
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 11:43:35 +00:00
@include font-size( 12 );
margin-bottom: $gap;
font-style: normal;
font-weight: normal;
line-height: 16px;
.is-placeholder & {
& > div {
@include placeholder();
}
margin-bottom: 10px;
}
}
}
.woocommerce-inbox-message__text {
color: $gray-700;
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 11:43:35 +00:00
font-style: normal;
font-weight: normal;
@include font-size( 14 );
line-height: 20px;
& > p:first-child {
margin-top: 0;
}
& > p:last-child {
margin-bottom: 0;
}
.is-placeholder & {
& > div {
@include placeholder();
margin: 5px 0;
}
}
}
.woocommerce-inbox-message__actions {
padding-top: $gap;
border-top: 1px solid $gray-200;
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 11:43:35 +00:00
// Ensures any immediate child with a sibling has space between the items
& > * + * {
margin-left: 0.5em;
}
a,
button {
cursor: pointer;
}
.components-dropdown {
display: inline;
.components-popover__content {
min-width: 195px;
ul {
text-align: center;
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 11:43:35 +00:00
}
li {
margin: 0;
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 11:43:35 +00:00
cursor: pointer;
}
}
}
.is-placeholder & {
& > div {
@include placeholder();
float: left;
height: 28px;
margin-right: 8px;
}
}
}
.woocommerce-inbox-dismiss-confirmation_modal {
text-align: left;
}
.woocommerce-inbox-dismiss-confirmation_wrapper {
p {
font-size: 16px;
color: $gray-700;
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 11:43:35 +00:00
}
.woocommerce-inbox-dismiss-confirmation_buttons {
text-align: right;
button {
margin-left: 10px;
}
}
}
.woocommerce-inbox-message__wrapper > div {
padding: $gap $gap-large;
.is-placeholder & {
padding: 10px 24px;
display: flow-root;
}
}
.woocommerce-inbox-message__image {
.banner-block {
.is-placeholder & {
@include placeholder();
width: 100%;
height: 120px;
}
}
}
.woocommerce-layout__activity-panel-content {
padding-top: $gap-large;
}
#activity-panel-inbox {
margin: 0 $gap-large;
}
.woocommerce-layout__inbox-panel-header {
padding: $gap-large;
.woocommerce-homepage-column & {
padding: 0 24px;
}
}
// Tweak to fix dropdown and placeholder in IE 11
@media all and ( -ms-high-contrast: none ), ( -ms-high-contrast: active ) {
.woocommerce-admin-dismiss-dropdown {
margin-top: 0;
}
.woocommerce-inbox-message__wrapper {
.is-placeholder & {
padding-bottom: 10px;
}
}
}
.woocommerce-inbox-message-enter {
opacity: 0;
max-height: 0;
transform: translateX(50%);
}
.woocommerce-inbox-message-enter-active {
opacity: 1;
max-height: 100vh;
transform: translateX(0%);
transition: opacity 500ms, transform 500ms, max-height 500ms;
}
.woocommerce-inbox-message-exit {
opacity: 1;
max-height: 100vh;
transform: translateX(0%);
}
.woocommerce-inbox-message-exit-active {
opacity: 0;
max-height: 0;
transform: translateX(50%);
transition: opacity 500ms, transform 500ms, max-height 500ms;
}