Content
View differences
Updated by Behrokh Satarnejad 12 months ago
### Context and Problem Statement
As part of the feature, we should move the Hamburger toggle from the top bar menu to the sidebar, and when the sidebar is collapsed, there should be a button beside the breadcrumbs for opening the sidebar menu. There is a problem that we have rails and angular pages. In rails Pages, we are using PageHeader component in which there is a breadcrumb, while some of the angular pages have a breadcrumb, but some of them don't, therefore we have to find a solution that works for both of them.
#### The questions that we have to find the answer for:
1. Where should we locate the button?
2. How can We handle Open/Close events for both rails and frontend pages?
#### Proposed solutions: Options:
1. Add an Floating absolute positioned button to the DOM of the content, its click event can handle showing and hiding the sidebar menu
1. Faster and simpler solution 🟢
2. Works for both rails and angular pages 🟢
3. Everything button, everything will be managed in Core 🟢
4. It's a bit hacky because of adding an absolute positioned button to the DOM ðŸŸ
2. Add the A button in page header breadcrumb of PageHeader component, when clicking on it, it will execute a custom event, then in Core we will listen to this event and manage showing/hiding the sidebar menu
1. breadcrumb, primer-view-components and Core should change 🔴
2. We need to spend more time to change PageHeader component 🔴
3. PageHeader component has a different context from Sidebar menu, adding the button in it is mixing to different contexts 🔴
4. It only fixes the issue for rails pages, we have to find a solution for angular pages as well, and it will take more time 🔴
#### change.
Decision:
Based on the above points for each solution, we select the first one.
Always have buttons as part of the DOM. We should add an absolute positioned button to the DOM of the content, its click event can handle showing and hiding the sidebar menu.
When the button in the sidebar is clicked, it sets the class which is responsible for showing the content button and pushing the breadcrumb of page header or angular pages.
As part of the feature, we should move the Hamburger toggle from the top bar menu to the sidebar, and when the sidebar is collapsed, there should be a button beside the breadcrumbs for opening the sidebar menu. There is a problem that we have rails and angular pages. In rails Pages, we are using PageHeader component in which there is a breadcrumb, while some of the angular pages have a breadcrumb, but some of them don't, therefore we have to find a solution that works for both of them.
#### The questions that we have to find the answer for:
1. Where should we locate the button?
2. How can We handle Open/Close events for both rails and frontend pages?
#### Proposed solutions:
1. Add an
1. Faster and simpler solution 🟢
2. Works for both rails and angular pages 🟢
3. Everything
4. It's a bit hacky because of adding an absolute positioned button to the DOM ðŸŸ
1.
2. We need to spend more time to change PageHeader component 🔴
3. PageHeader component has a different context from Sidebar menu, adding the button in it is mixing to different contexts 🔴
4. It only fixes the issue for rails pages, we have to find a solution for angular pages as well, and it will take more time 🔴
####
Based on the above points for each solution, we select the first one.
Always have buttons as part of the DOM. We should add an absolute positioned button to the DOM of the content, its click event can handle showing and hiding the sidebar menu.