PrestaShop / docs

PrestaShop technical documentation
https://devdocs.prestashop-project.org/
Other
120 stars 477 forks source link

Document Back Office menu navigation bar #987

Open matks opened 3 years ago

matks commented 3 years ago

We need a page that explains how the Menu Navigation bar of the Back Office is built. We need to explain what labels are. It would be in PrestaShop 1.7 > Core Reference > Components > Back Office Menu.

Page PrestaShop 1.7 > Modules > Extension concepts > Controllers > Admin controllers > Adding module links in the back-office side menu explains how to add items in the menu.

Here is a draft

---
title: Back Office Menu
menuTitle: Back Office menu
---

# The Back Office menu

Back Office controller return Back Office HTML pages.

Most of these pages Back Office page have a common HTML structure:
- a layout at the top
- a menu navigation bar on the left
- the page content at the center
- a collapsable right sidebar that contains documentation 

## Back Office Menu

TODO
matks commented 3 years ago

@jolelievre I think you worked on Tabs at some point, when you wanted to make them usable with Symfony. If you have a good understanding of the inner working of the Back Office menu, it would be absolutely outstanding if you could submit a documentation PR πŸ™

matks commented 3 years ago

Part of the content is in https://devdocs.prestashop.com/1.7/development/architecture/modern/controller-routing/#security because tabs are mapped to controllers and are linked to authorization

Also https://devdocs.prestashop.com/1.7/modules/concepts/controllers/admin-controllers/tabs/ explains a lot of things about it

kpodemski commented 3 years ago

This also seems to be done by you @matks

matks commented 3 years ago

Hi @kpodemski unfortunately no I think you refer to something else 😒 . I documented the collapsable right sidebar that contains documentation but the other elements of the BO menu navigation bar are not documented yet.

I mean this bar: Capture d’écran 2021-06-25 aΜ€ 14 48 21

kpodemski commented 3 years ago

@matks do you think we need a lot of details about it? those are basically registered Tabs: https://devdocs.prestashop.com/1.7/modules/concepts/controllers/admin-controllers/tabs/#tabs-registration

πŸ€”

matks commented 3 years ago

@matks do you think we need a lot of details about it? those are basically registered Tabs: https://devdocs.prestashop.com/1.7/modules/concepts/controllers/admin-controllers/tabs/#tabs-registration

πŸ€”

https://devdocs.prestashop.com/1.7/modules/concepts/controllers/admin-controllers/tabs/#tabs-registration

This page is great to explain "how to use the Tabs system to add links for my module in the menu bar" πŸ˜„ but it does not explain the inside of the menu bar inner working. How is it built? Is the content cached? When I create a new BO page, how does it "automatically" appear on the left?

So we have the "how to use it" πŸ‘ that is great, what I think would be interesting is also the "how it is built inside".

That however is for 2 different audiences.

"How to use it" is probably useful for module developers who want to add links in the menu.

"How it is built inside" would be useful for people who maintain and improve the menu: the project maintainers and prestashop contributors.

Imagine if tomorrow a contributor says "hello! I am motivated to help improve the menu bar because I noticed bug 92796 that impacts it, can you give me a quick link to doc so I can learn how it's built and I now where to explore"

kpodemski commented 3 years ago

@matks alright πŸ‘ now I understand the purpose