woocommerce / woocommerce-admin

(Deprecated) This plugin has been merged to woocommerce/woocommerce
https://woocommerce.github.io/woocommerce-admin/#/
Other
361 stars 144 forks source link

New navigation: add support to top extensions #5335

Closed pmcpinto closed 3 years ago

pmcpinto commented 4 years ago

User story: As a merchant I want to access the most important extensions in the new navigation So I don't need to go back to wp-admin to use a specific extension

Description: it will probably take a while until most of the 3pds extensions start supporting the new navigation. It would be good to launch the new navigation already supporting some of the top extensions in our marketplace, so 3PDs can see real examples of how extensions are going to look like in the new navigation and merchants can use those extensions without going to wp-admin.

Acceptance criteria: Add support in the new nav for the following extensions (similar to what we're doing in the Calypso nav):

Event tracking: NA

joshuatf commented 4 years ago

Just to double check on this issue @pmcpinto- we're talking about opening PRs in those repos to register support, right?

For some context, one thing we're trying to avoid is registering third party items within this repo to avoid some of the same pitfalls to what happened in the Calypso nav.

If this is just an issue to track progress on opening PRs in those plugins, then 👍

pmcpinto commented 4 years ago

Yep, ideally this work should happen on the extension side. Do we already have an example of how 3PDs can hook their extensions to the new nav? I can check with our Developer Advocate when it will be possible to start creating some content around that.

Registering 3rd party items within this repo would be mainly a worst-case scenario/workaround to cover the extensions that are included in the eComm bundle (WCPay, Facebook and Mailchimp) 😄

joshuatf commented 4 years ago

WooCommerce Admin makes use of this and plugs into the navigation feature just like an extension would, but I think it would be worthwhile to create a quick start extension that covers all use cases to make this easier for devs to get started.

joshuatf commented 4 years ago

Issue for example extension created here.

What do we think are good categories for each of these items?

WCPay - Settings? (the default Payments already exists under settings). AutomateWoo - Marketing Memberships - Products? Subscriptions - Products? Mailchimp - Marketing Facebook - Marketing

/cc @pmcpinto @jameskoster

psealock commented 4 years ago

Documentation issue here https://github.com/woocommerce/woocommerce-admin/issues/5426 to help with explaining how the process works. This could be useful so that teams owning extensions can make the pull requests themselves.

jameskoster commented 4 years ago

My gut feeling is that we should at least explore mimicking what core does with plugins. Unfortunately that is still not 100% clear, but the latest mockups have Plugins as an entirely separate navigational section:

1

Probably needs some design ideation for the Woo context @elizaan36

pmcpinto commented 4 years ago

I think that for the initial release we could keep it simple and just allow extensions to register under the extensions section. What do y'all think?

joshuatf commented 4 years ago

@jameskoster @pmcpinto Does this mean that we don't want to allow third party extensions to register under other categories? If so, we'll want to update our logic to prevent registering under those menu items.

psealock commented 4 years ago

I think that for the initial release we could keep it simple and just allow extensions to register under the extensions section. What do y'all think?

Moving in this direction actually complicates things. Currently, integration with Navigation has 3 avenues (See p90Yrv-1TJ-p2 for more details): Independent Inclusion like wc-admin does, via wc-admin itself, and lastly registration in PHP. Considering these various paths, we'll need to reflect on a few items.

image

Is WC Admin Special?

The Navigation has been developed agnostic of any extension, including WC Admin. If we stick to this standard, WC Admin links will also end up being in the "Plugins" section. WC Subscriptions and other Woo premium plugins will also end up in the Plugins bin. A two-tiered integration system will need to be implemented to get the desired result, leading to further questions.

Are WC Admin Extensions Special?

If we allow WC Admin to register top level items in the Navigation to avoid being grouped together with other "Plugins", then where do WC Admin extended pages belong? These are plugins that have created pages within the context of WC Admin, such as WC Payments which we'd surely like to place in an appropriate and intuitive location in the Navigation. Looks like we'll have to extend the two-tiered registration to WC Admin Extensions too.

Everyone is Special, No One is Special

If our own WC Subscription and WC Payments desire to be in the main section, we'll need to expose a method of registering top level items to all plugins. Now we're back to square one.

Maybe allowing only WC Admin pages (and its extensions) to register top level items is the right way to encourage extensions to create pages within that system? That may be a desired result? In any case, this is something that requires thought and documentation.

In conclusion, I want to avoid heading in this direction at this stage of the cycle because the implications need to be thought out first. We'll need to do a non-trivial amount of refactoring but this is not to say the decision can't be made later.

pmcpinto commented 4 years ago

@psealock thanks for the explanation, it was super helpful 💯 I agree that this is not the best timing to revisit this.

So just to confirm a couple of things about the current state:

joshuatf commented 4 years ago

I agree that this is not the best timing to revisit this.

Just to play devil's advocate here, while this is a potentially big shift in direction, it actually might be good to address this sooner rather than later if we are serious about making this change. The reason being that if we make this change later, we’ll be deprecating a lot of functionality and either forcefully moving menu items or requiring updates in all extensions to re-register items in the new location.

@psealock is correct that this would be a non-trivial refactor and this decision shouldn't be taken lightly. I'd like to get more discussion around this before we go further.

Extensions that extended wcadmin are automatically registered in the new nav and they (or we) just need to identify the category where the extension should be included, correct?

They should be (at least those registered as an analytics page).

What about the plugins that don't extend wcadmin? Are they also allowed to register a top-level item in any category?

Currently any plugin can register an item anywhere (even as a top-level category along side Home, Products, etc). This was an intentional decision since WCA itself also acts a third party plugin by registering “Analytics” as a top level category. This does open the door for possible abuse but at the benefit of extensibility.

To Paul’s point, if we update this to only allow specific plugins, such as WCA, memberships, etc to have items in the "main" menu area, then the registration for these items should be moved into the navigation and it becomes the gatekeeper for those items. But this does seem like a level of favoritism towards certain plugins.

pmcpinto commented 4 years ago

To Paul’s point, if we update this to only allow specific plugins, such as WCA, memberships, etc to have items in the "main" menu area, then the registration for these items should be moved into the navigation and it becomes the gatekeeper for those items. But this does seem like a level of favoritism towards certain plugins.

Yeah, I think that we should avoid this kind of favoritism. The only exception that I'm seeing is WooCommerce Admin, as from a user perspective it's part of the Core experience.

This does open the door for possible abuse but at the benefit of extensibility.

This is my major concern as it can lead for example to a situation where we have some marketing extensions as a top-level item and then others within the Marketing section. 🤔

elizaan36 commented 4 years ago

My two cents in service of an improved user experience - The goal of the new nav is to let merchants find what they need (faster and more intuitively) and reduce the fragmentation of the current experience. First I want to point out that I don't think it's a good way forward to allow for all extensions to register as a top level category for the potential of more fragmentation and distraction.

As Pedro mentioned, since WCA is now part of the core user experience I wouldn't view it in the same category as other plugins and wouldn't consider it favoritism to allow WCA elements such as Analytics to be in the top level menu area.

I think we can present the new nav in a way that all extensions feel they have an equal experience - by not allowing any extension to register an item in the top level of the navigation. For example, including a Payments category at the top level would give room for WCPay to have an encapsulated experience there, but also other payments extensions could surface their UI within that category as needed. All plugins can be managed from the Plugins area, and as needed can register their UI within the associated top level category in the nav.

@jameskoster does this decision tree you worked on still apply in this context? I know you've done a lot of thinking around this and want to make sure I understand correctly before moving forward with my own ideation.

My gut feeling is that we should at least explore mimicking what core does with plugins

If we mimic the core experience and only register extensions in the plugins folder, that would be a huge departure from what our extension authors have grown accustomed to. I want to make sure we're thinking of both sides here - regular merchants and 3PD's. This is a tough one.

Sounds like from @psealock and @joshuatf's perspectives, even just going with that approach as a start would create some debt down the road if we eventually want to register the extensions elsewhere.

Had a look at the list above and I think mapping the extensions like this would make sense:

WCPay - Payments (new top level item that would include Disputes, Transactions, etc as sub-items) AutomateWoo - Marketing Memberships - Orders Subscriptions - Orders Mailchimp - Marketing Facebook - Marketing

All of these extensions would appear in the associated category in Settings as well. I'm still wrapping my head around all of this but those are my initial thoughts. What do y'all think?

jameskoster commented 4 years ago

This is a tough one.

Yup, especially as the core direction wrt plugins is unclear. It's hard to align with something that doesn't actually exist yet 🙈

My suggestion was merely to explore the idea of grouping all extensions together at the top level, as that was the latest iteration of the core nav designs for plugins. But if it doesn't feel good, then we should do something else – WooCommerce is a fairly unique use case after all, and can likely help carve the path for core to follow when the time comes.

Ultimately, for core (or Woo) it comes down to a question of whether giving plugin authors carte blanche in terms of where they can place nav items is holistically beneficial compared to the predictability of all plugins being grouped together, Shopify style.

joshuatf commented 4 years ago

The goal of the new nav is to let merchants find what they need (faster and more intuitively) and reduce the fragmentation of the current experience.

I agree with this and feels it's one of the biggest opportunities with the new navigation.

One one hand, by separating plugins into their own menu/section, I see the appeal behind being able to easily access newly installed plugin pages. If you were to install Mailchimp, you would not need to guess that the newly added menu item would be under "Marketing," but instead could find it quickly under Plugins -> Mailchimp.

On the other hand, aside from the initial frustrations with finding an item after initial install, I would expect all "Marketing" items to be in one place.

I'm leaning towards the latter, but beginning to feel with either approach that the top-level categories in the main menu should be locked in place and force plugins to pick a category. The temptation and potential for abuse to register plugin items at the top-level just seems too high and this will degrade the new nav experience quickly.

This still fits with the idea that WooCommerce Admin pages are registered as third-party pages since the "Analytics" and "Marketing" sections are predefined within the navigation feature, but by default these contain legacy reports and coupon pages, respectively.

I think I'll do some exploration around locking top-level items to see what this would look like.

psealock commented 4 years ago

Its worth exploring what the landscape will look like if Core WP places all plugins in a plugins folder. If we do the same, it may be awkward for users to navigate through two plugin folders. Lets use Josh's Mailchimp example. Mailchimp would be available in two spots if I'm understanding correctly.

Main WP menu > Plugins > WooCommerce > Plugins > Mailchimp
Main WP menu > Plugins > Mailchimp

If Mailchimp will be made available under Core WP's Plugin folder, then WooCommerce can safely place Mailchimp under "Marketing", a more logical place, without sacrificing the ease of finding it under "Plugins". Given this, my vote is to stay with the current method of letting extensions choose their menu location.

I think I'll do some exploration around locking top-level items to see what this would look like.

Good idea @joshuatf

pmcpinto commented 4 years ago

I'm leaning towards the latter, but beginning to feel with either approach that the top-level categories in the main menu should be locked in place and force plugins to pick a category. The temptation and potential for abuse to register plugin items at the top-level just seems too high and this will degrade the new nav experience quickly.

@joshuatf this can be a great solution. It would be helpful to understand the amount of effort required to make this change,

I like the see the nav as an operating system (like iOS or Android) where the user has the power to organize the apps according to their needs instead of having the app developers mandating the placement of their apps. We're not there yet but empowering merchants to organize their navigation is something that we should consider in the future.

timmyc commented 4 years ago

My vote is for moving in the direction of what @jameskoster shared here, and also what sounds like Paul is keen to explore to per his last comment. This pattern of having all the "native/bundled" Woo menu items in one section ( including wc-admin ) and all extensions in their own section seems to be the most common pattern proposed for future wp-admin designs, but it is also used in Shopify's navigation.

Just building upon what Pedro shared too - based on the conversation we had with Matias and Jay - longer-term I believe the vision is to have the ability for users to favorite/star items in the nav... so this will kind of alleviate any of the un-organized nature of piling everything within the plugins portion of the nav and allow users to fully customize and prioritize their most used pages.

joshuatf commented 4 years ago

I've created an experimental PR to lock off top level items in https://github.com/woocommerce/woocommerce-admin/pull/5478

My vote is for moving in the direction of what @jameskoster shared here

I can see arguments on both sides. My only preference is (if possible) commit to one style prior to releasing this into the wild. If we decide later that extensions can't register items, we're going to need updates in all of those repos and previously registered items will not be backwards compatible.

joshuatf commented 4 years ago

Updated the original comment to track what's been done. If anyone wants to take any extensions, feel free to edit and add your name next to the plugin you're working on.

pmcpinto commented 3 years ago

@psealock @joshuatf @joelclimbsthings I forgot to include WooCommerce Bookings in the list. Can you also open the issue in their repo? Thanks 🙏

psealock commented 3 years ago

Since all outstanding PRs have been taken as far as they can by us, I will close out this issue.

zdenys commented 3 years ago

What happens with the rest of the extensions (besides the top one mentioned here)? I'm asking since I stumbled upon a case where WooCommerce Brands no longer has its dedicated subsection under Products with the new navigation. I filed this bug: https://github.com/Automattic/wp-calypso/issues/49234

But what else needs to be done for all the other extensions that used to have their own subsections under Products or under WooCommerce and that may not be displaying any longer?

psealock commented 3 years ago

Thanks for the question @zdenys

Items with subsections under WooCommerce that haven't been registered are moved under "Settings". We are exploring placing those items under "Extensions" because users are unable to find plugins and Settings may not be intuitive.

Items with subsections under Products weren't automatically transferred over as the WooCommerce ones were.

This PR addresses both of these issues https://github.com/woocommerce/woocommerce-admin/pull/6179, using WooCommerce Brands as a test case.