Woocommerce-admin: Nav jumps to Tools/Utilities after creating new product or order

Created on 9 Nov 2020  路  4Comments  路  Source: woocommerce/woocommerce-admin

Describe the bug
After you create a new product or order, the new nav jumps to Tools > Utilities.

To Reproduce

  1. Create a new product or order.
  2. Click "Publish".
  3. See nav jump to Tools > Utilities

Expected behavior
The navigation should stay on the existing item, Add product or Add order.

Screenshots
Screen Shot 2020-11-09 at 3 45 25 PM

Screen Shot 2020-11-09 at 3 32 39 PM

Desktop (please complete the following information):

  • Tested on Chrome, Firefox, and Vivaldi.
navigation bug

Most helpful comment

Yes, I can't think of any reason why not. Can you think of any edge cases where it wouldn't work?

I currently can't either. Seems like a reasonable change and we can re-address if we run into any exceptions in the future.

All 4 comments

I think this is due to the lack of matching URLs and how we try to "fuzzy" match active menu items. Are we thinking the "Orders" menu item would remain active when on a specific order? And if so, would this be true of all custom post types (show the main page as active when on a single item)?

Note that the "Add Order" item will be resolved by https://github.com/woocommerce/woocommerce-admin/issues/5539

Are we thinking the "Orders" menu item would remain active when on a specific order?

Yeah, the "Orders" menu item should still be active when you're on "Edit Order". Ideally we can get the back button in the top bar soon to make that connection more clear for people. That was discussed in this issue.

And if so, would this be true of all custom post types (show the main page as active when on a single item)?

Yes, I can't think of any reason why not. Can you think of any edge cases where it wouldn't work?

Note that the "Add Order" item will be resolved by #5539

Nice, I was going to ask about that.馃槅

Yes, I can't think of any reason why not. Can you think of any edge cases where it wouldn't work?

I currently can't either. Seems like a reasonable change and we can re-address if we run into any exceptions in the future.

Was this page helpful?
0 / 5 - 0 ratings