Commit Graph

68 Commits

Author SHA1 Message Date
louwie17 b642576e34 Remove the use of Dashicons and replace with `@wordpress/icons` or `gridicons` (https://github.com/woocommerce/woocommerce-admin/pull/7020)
* Updated mobile banner icon with cross-small gridicon

* Update analytics dashboard icons, removing use of dashicon

* Remove use of dash icon in tag component

* Remove dash icon from ellipsis menu

* Remove use of dashicon in calendar

* Update icon imports and remove use of Dashicon in collapsible list

* Remove Dashicon usage from store alerts as it is depreciated

* Remove dashicon usage in shipping label

* Fix up old css for icons

* Removed dashicon usage in favorite button

* Update the wordpress/icons package

* Add changelogs

* Fix broken test
2021-05-25 12:14:14 -03:00
Joel Thiessen 073a220b59 Adding Slotfill extension components for remote payments (https://github.com/woocommerce/woocommerce-admin/pull/6932) 2021-05-11 09:36:56 -07:00
Paul Sealock 562af3eedc SlotFill: Remove Navigation's context (https://github.com/woocommerce/woocommerce-admin/pull/6832)
* Use same wc-admin slotFill context

* changelog
2021-04-23 15:44:54 +12:00
Joel Thiessen 588776deb3 Fix persisted queries being lost when navigating to excluded page (such as Homescreen) (https://github.com/woocommerce/woocommerce-admin/pull/6614) 2021-04-02 14:35:31 -07:00
Paul Sealock b7360d0d55 Add typescript to Nav utils (https://github.com/woocommerce/woocommerce-admin/pull/6477)
* Add typescript to nav utils--no-verify

* save

* progress

* fixup category

* better

* getting closer

* grrr

* appease the type gods

* move types to start of page

* Fixup addHistoryListener

* Add typescript to nav utils--no-verify

* save

* progress

* fixup category

* better

* fix tsconfig

* changelog

* add babel jest typescript preset for tests

* fix rebase issue

* PR feedabck

* update package-lock

* eslint fix
2021-03-18 16:38:38 +13:00
Joshua T Flowers 828eccb20e Fix hidden menu title on smaller screens (https://github.com/woocommerce/woocommerce-admin/pull/6562)
* Fix hidden menu title on smaller screens

* Add changelog entry and testing instructions
2021-03-11 15:01:37 -05:00
Joshua T Flowers b7d4da5f45 Add nav intro modal tests (https://github.com/woocommerce/woocommerce-admin/pull/6518)
* Remove unnecessary tracking opt in check

* Add intro modal tests

* Add changelog entry

* Add extra check to see if modal has previously been dismissed
2021-03-09 17:53:24 -05:00
Joel Thiessen 84467d4f2a Fixing site errors being concealed by new navigation (https://github.com/woocommerce/woocommerce-admin/pull/6337) 2021-03-09 09:40:56 -08:00
Joel Thiessen 0bccfc123f Adding client-side filter to navigation root url (https://github.com/woocommerce/woocommerce-admin/pull/6505) 2021-03-05 08:34:17 -08:00
Joshua T Flowers 198e3fb7ce Add navigation container tests (https://github.com/woocommerce/woocommerce-admin/pull/6464)
* Add changelog and testing instructions

* Set active level when matching a new item

* Add navigation container tests

* Add testing instructions and changelog

* Update testing instructions

* Fix up missing changelog entries after rebase

* Add in missing menu items from useSelect in tests
2021-03-05 09:35:53 -05:00
Joshua T Flowers d5b4c432e0 Add nav header component tests (https://github.com/woocommerce/woocommerce-admin/pull/6509)
* Add nav header component tests

* Add changelog
2021-03-04 16:13:11 -05:00
Joshua T Flowers 5f9e4f3164 Add legacy report items to new navigation (https://github.com/woocommerce/woocommerce-admin/pull/6507)
* Add legacy report items

* Hide nav tabs on report pages

* Add testing instructions and changelog entry
2021-03-04 10:45:12 -05:00
Joshua T Flowers 2acbc0c1e8 Add category title tests (https://github.com/woocommerce/woocommerce-admin/pull/6445) 2021-03-04 10:32:46 -05:00
Joshua T Flowers 40a86daf2f Remove active item from navigation store (https://github.com/woocommerce/woocommerce-admin/pull/6486)
* Remove active item from navigation store

* Add changelog entry
2021-03-03 16:57:00 -05:00
Joshua T Flowers fbeb535b20 Use static images for nav intro modal (https://github.com/woocommerce/woocommerce-admin/pull/6493)
* Use static images for nav intro modal

* Add 2x images
2021-03-03 12:24:02 +13:00
Joshua T Flowers 8a0ba82e6f Add nav favorite button tests (https://github.com/woocommerce/woocommerce-admin/pull/6446)
* Add nav favorite button tests

* Add changelog entry
2021-03-02 11:19:31 -05:00
Joshua T Flowers c71d64a937 Fix double prefixing of navigation URLs (https://github.com/woocommerce/woocommerce-admin/pull/6460)
* Fix double prefixing of navigation URLs

* Add changelog and testing instructions
2021-03-02 11:18:48 -05:00
Joshua T Flowers a8757648a1 Refactor menu item mapping and sorting (https://github.com/woocommerce/woocommerce-admin/pull/6382)
* Separate primary and secondary menu components

* Simplify category mapping

* Map categories and items simultaneously to improve performance

* Sort added menu items

* Pre-sort menu items

* Create single mapped sorting on server-side

* Fix incorrect menu ID references

* Update tests

* Move methods to utils file

* Add in permissions check in client nav

* Fix server-side capability check

* Fix duplicate expectation and test name

* Add testing instructions
2021-02-22 13:54:27 -05:00
Joshua T Flowers 8e9c60b0b0 Add navigation intro modal (https://github.com/woocommerce/woocommerce-admin/pull/6367)
* Add initial intro modal

* Hide modal on dismissal

* Add modal styling

* Add modal page content

* Update styles to match Figma designs

* Replace video with gifs

* Check if user is opted in to satisfy gdpr concerns

* Add testing instructions and changelog notes

* Handle PR feedback

* Handle responsiveness

* Dismiss modal when welcome modal is shown simultaneously

* Update shared modal option constants
2021-02-22 13:40:44 -05:00
Elizabeth Pizzuti 38bc814409 Order and styles updates to nav footer (https://github.com/woocommerce/woocommerce-admin/pull/6373)
* nav-footer-styles

* nav-footer-styles
2021-02-22 09:04:14 +08:00
Joshua T Flowers 851dac281c Add filter to allow the wp toolbar in navigation (https://github.com/woocommerce/woocommerce-admin/pull/6371)
* Add class to determine styling for disabled wp toolbar

* Use disabled toolbar class in onboarding setup wizard

* Add changelog and readme notes for filter
2021-02-19 08:20:32 -05:00
Paul Sealock 3483f1930e Navigation: Add test to container component (https://github.com/woocommerce/woocommerce-admin/pull/6344)
* getCategoriesMap

* getMenuItemsByCategory

* changelog
2021-02-18 13:06:28 -05:00
Joshua T Flowers 8371325ba6 Fix empty nav menu (https://github.com/woocommerce/woocommerce-admin/pull/6366) 2021-02-18 12:27:04 -05:00
Joshua T Flowers bf3ed5ad87 Add the favorites tooltip to the navigation (https://github.com/woocommerce/woocommerce-admin/pull/6312)
* Add tooltip to plugin category titles

* Add useAnchor

* Hide tooltips if previously shown

* Refactor tooltip and favorite button to separate components

* Check if favorites resolved before showing button

* Update favorites tooltip option name

* Handle rebase changes

* Don't show tooltip when nav is folded
2021-02-17 09:29:28 -05:00
Joshua T Flowers 452494a4fe Move favorited menu items to primary menu (https://github.com/woocommerce/woocommerce-admin/pull/6290)
* Update menu ID when favoriting an item

* Allow favorites to be included alongside the primary menu items

* Add categories to favorites menu server-side

* Don't reset menu state when active item is the same

* Make sure favorites are finished resolving before showing
2021-02-16 11:12:25 -05:00
Joshua T Flowers 8629318f46 Use box sizing and padding to fix nav and admin menu styling (https://github.com/woocommerce/woocommerce-admin/pull/6335)
* Use box sizing and padding to fix nav and admin menu styling

* Move wpbody fixes to reset

* Move default header padding to reset
2021-02-16 10:57:56 -05:00
Joshua T Flowers a93a5def94 Remove categories without menu items (https://github.com/woocommerce/woocommerce-admin/pull/6329)
* Hide menu categories with no items

* Remove capabilities on categories

* Remove remaining references to category capabilities
2021-02-15 16:33:51 -05:00
Joshua T Flowers 80f5532543 Fix navigation priority settings conflict (https://github.com/woocommerce/woocommerce-admin/pull/6336)
* Remove the late addition of the core items for the navigation

* Add fallbacks in case the nav is not detected server-side

* Check if ref is set before resizing
2021-02-12 16:42:04 -05:00
Joshua T Flowers 683f8adf33 Add favoriting extensions client UI (https://github.com/woocommerce/woocommerce-admin/pull/6287)
* Add category title component

* Add category title styling

* Record tracks event when toggling favorite

* Fix aria labels

* Fix colors for favorite button

* Use CategoryTitle for secondary nav menu
2021-02-12 11:51:02 -05:00
Joshua T Flowers baaaf39bf0 Try: Refactor head and body heights (https://github.com/woocommerce/woocommerce-admin/pull/6247)
* Move navigation to WC header

* Remove wp toolbar class

* Set body margin on header change

* Fix up layout margins

* Remove excess padding on mobile

* Fix navigation preload styles and embed

* Fix preloading space due to adminbar missing

* Remove embed padding on wrap

* Fix body display for wpadmin menu

* Fix up wpadminbar reset padding

* Remove body padding on full screen layouts

* Fix mobile admin bar height on full screen

* Clean up body margin on unmount

* Center the activity panel (https://github.com/woocommerce/woocommerce-admin/pull/6289)

* Center the activity panel

* Handle PR feedback

* Fix up secondary nav group style changes

* Remove screen reader style changes

* Debounce resize event

* Make responsive button selector more specific

Co-authored-by: Hsing-Yu Flowers <hsingyuc.7@gmail.com>
2021-02-12 11:32:26 -05:00
Hsing-Yu Flowers d61cb9faf3 Change `siteUrl` to `homeUrl` on navigation site title (https://github.com/woocommerce/woocommerce-admin/pull/6240)
* Get home url

* Change siteUrl to homeUrl
2021-02-11 11:03:47 +13:00
Paul Sealock 078b4efa3c Navigation: Add temp override to fix Gutenberg item CSS (https://github.com/woocommerce/woocommerce-admin/pull/6254)
* override Nav item styles

* use hex colors
2021-02-09 14:39:03 +13:00
Joshua T Flowers e27d5127b8 Separate secondary items into separate menu in navigation (https://github.com/woocommerce/woocommerce-admin/pull/6253)
* Convert navigation to grid

* Include back button in primary menu

* Update secondary menu keys

* Use array instead of fragment to avoid unique key
2021-02-08 15:41:08 -05:00
Joel Thiessen bb446c8543 Adding text content to new navigation toggle & chart period select for screen-reader visibility (https://github.com/woocommerce/woocommerce-admin/pull/6224) 2021-02-01 16:43:37 -08:00
Joel Thiessen 752821c00e Fixed keyboard landmark menu items cut off when new navigation enabled (https://github.com/woocommerce/woocommerce-admin/pull/6225) 2021-02-01 13:26:34 -08:00
Joel Thiessen c6cd12560a Adding history listener to fold navigation on mobile when navigating (https://github.com/woocommerce/woocommerce-admin/pull/6102) 2021-01-21 12:13:09 -08:00
Joshua T Flowers bc998444a3 Future proof experimental components (https://github.com/woocommerce/woocommerce-admin/pull/5961)
* Possibly use safe Text component

* Possibly use safe navigation components

* Add experimental package

* Update components to import from woocommerce/experimental

* Make experimental package private

* Reference experimental package relatively

* Update packages/experimental/README.md

Co-authored-by: Paul Sealock <psealock@gmail.com>

* Update packages/experimental/CHANGELOG.md

Co-authored-by: Paul Sealock <psealock@gmail.com>

* Update history state instead of mocking getQuery in tests

* Handle PR feedback

* Create excluded externals array and return early

Co-authored-by: Paul Sealock <psealock@gmail.com>
2021-01-07 18:57:09 -05:00
Joel Thiessen 750efaef0f Removing duplicate back button on root level of new navigation (https://github.com/woocommerce/woocommerce-admin/pull/5915) 2021-01-04 09:00:42 -08:00
Joshua T Flowers 7977fb0148 Decode entities in titles (https://github.com/woocommerce/woocommerce-admin/pull/5964) 2020-12-28 13:48:29 -05:00
Joshua T Flowers 6e2bf974c7 Add filter for root back URL (https://github.com/woocommerce/woocommerce-admin/pull/5878)
* Add filter for root back URL

* Add filter for root back button label
2020-12-15 12:05:32 -05:00
Joshua T Flowers 10b9579cde Add nav item route regex matching (https://github.com/woocommerce/woocommerce-admin/pull/5818)
* Use default expression to match items

* Pass match expression for WCA homepage

* Match post types if the current post type matches item

* Remove unused getParams

* Update tests for isMatch util

* Update nav docs

* Update default expression to match params in any order

* add query arg tests: additional and order

* Use match score based on regex matches

* Return max safe int for exact matches

* Update tests for match score

* more tests

Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-12-09 13:45:30 +13:00
Joshua T Flowers c659d2a729 Fix nav group titles showing in child menus (https://github.com/woocommerce/woocommerce-admin/pull/5793) 2020-12-03 10:50:38 -05:00
Joshua T Flowers 1e01adcbc1 Add navigation item click tracks (https://github.com/woocommerce/woocommerce-admin/pull/5707)
* Add tracking to navigation item clicks

* Track back button click in navigation
2020-12-02 13:16:54 -05:00
Joshua T Flowers 5ba669a2f4 Only show menu items from same parent menu (https://github.com/woocommerce/woocommerce-admin/pull/5731)
* Only render nav items belonging to parent menu ID

* Set item menu ID for items automatically

* Use categories map to filter items early

* Convert categorized menus to objects

* Prevent bypassing menu via existing parent

* Fix plugins name
2020-12-02 09:36:35 -05:00
Joshua T Flowers d2234a7628 Position transient notices based on nav width (https://github.com/woocommerce/woocommerce-admin/pull/5628)
* Position transient notices based on nav width

* Position notices left when folded or on smaller screens
2020-11-23 14:28:17 -05:00
Joel Thiessen 4e5fa5cee9 Hiding primary tabs on Settings within WooCommerce since it's redundant with items in nav (https://github.com/woocommerce/woocommerce-admin/pull/5630)
* Hiding tabs displayed on wc-status pages as well
2020-11-18 15:54:24 -08:00
Joel Thiessen f8e053dcb4 Renaming navigation body classes to be less generic (https://github.com/woocommerce/woocommerce-admin/pull/5660) 2020-11-18 10:43:20 -08:00
Joel Thiessen b3e094889a Preventing desktop-sized navigation placeholder from appearing on mobile during load (https://github.com/woocommerce/woocommerce-admin/pull/5616) 2020-11-16 10:11:13 -08:00
Joel Thiessen b8238d91dc Adding wrapper class around navigation to implement scroll styles/logic (https://github.com/woocommerce/woocommerce-admin/pull/5570) 2020-11-12 09:10:42 -08:00
Joel Thiessen db6a404ba8 Refactoring logic handling auto-folding navigation to support resize event (https://github.com/woocommerce/woocommerce-admin/pull/5578) 2020-11-11 11:44:58 -08:00