cv-frontend-vue icon indicating copy to clipboard operation
cv-frontend-vue copied to clipboard

Fix: Modified z-index for draggable components, navbar and tabsBar in both expanded and collapsed states of tabsBar

Open Chandrachur67 opened this issue 1 year ago • 6 comments

Fixes #260

Describe the changes you have made in this PR -

  1. Modified the z-index values to be assigned to draggable elements during the "mousedown" event (set to previous values similar to circuitverse.org/simulator)

  2. Modified code for the event listener of the tabsBar expand and collapse button

  • when expanded, added inline CSS to the navbar and tabsBar to have a higher z-index so that they appear on top of draggable panels.
  • when collapsed, removed the inline styling to revert back to original values so that draggable panels appear on top of everything.

Screenshots of the changes (If any) -

Before

Once draggable components are moved to overlap with the top section, it loses the functionality of moving further

Screenshot 2024-01-17 at 1 57 57 AM

After

tabsBar not expanded state => draggable panels on top of everything.

Screenshot 2024-01-17 at 1 49 04 AM

tabsBar expanded state => navbar and tabsBar on top of draggable components for better accessibility of tabsBar

Screenshot 2024-01-17 at 1 49 13 AM

Video demonstrating the change

https://github.com/CircuitVerse/cv-frontend-vue/assets/97349505/4956b3f1-df26-48ef-9ee4-a19a5fa9134e

Note: Please check Allow edits from maintainers. if you would like us to assist in the PR.

Chandrachur67 avatar Jan 16 '24 21:01 Chandrachur67

Deploy Preview for circuitverse ready!

Name Link
Latest commit 489151ee6a76260743c3ffc09fdb95051722e526
Latest deploy log https://app.netlify.com/sites/circuitverse/deploys/65f35eff40a30700083540b3
Deploy Preview https://deploy-preview-261--circuitverse.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Jan 16 '24 21:01 netlify[bot]

Hey @Arnabdaz, Please take a look at this. I have fixed the z-indexes following the requirements you specified.

Chandrachur67 avatar Jan 16 '24 21:01 Chandrachur67

Sure. Sorry for the glitch. I will fix this.

Clarification needed

However I need one more clarification: The z-index of dropdown menu is controlled by the z-index of the navbar. So in collapsed state, even if any a nav-dropdown item is expanded due to higher z-index of draggable components it will not come on top of draggable-component. Is this behaviour ok? if ok then I have done it and mentioned all the changes below.

But if you want me change this behaviour, then I have to modify and add event-listeners to some components of navbar and it will make the changes complex bacuase that is probably controlled by aria-expanded and data-toggle. please let me know what you want.

Propsed Solution

This is the behaviour I am trying to implement: Changing the value of z-index of #tabsBar in TabsBar.vue to 99.

In collapsed mode

z-index : draggable-components > navbar > tabsBar

In expanded mode

z-index: navbar > tabsBar > draggable-components

The exact values I am planning to use:

tabsBar state navbar tabsBar draggable components
Expanded 103 102 <102
Collapsed 100 99 (101 for selected and 100 for others)

Images

In collapsed mode

Screenshot 2024-01-17 at 12 46 52 PM Screenshot 2024-01-17 at 12 47 13 PM

In expanded mode

Screenshot 2024-01-17 at 12 48 30 PM Screenshot 2024-01-17 at 12 48 06 PM

Chandrachur67 avatar Jan 17 '24 08:01 Chandrachur67

Hey @Arnabdaz I have updated the code and I believe we will be getting the expected behaviour.

Video for reference

https://github.com/CircuitVerse/cv-frontend-vue/assets/97349505/e90a4731-f73c-4883-a10c-d62494854ef8

Chandrachur67 avatar Jan 17 '24 15:01 Chandrachur67

@Arnabdaz @Prerna-0202 it would be great if you could take a look at this.

Chandrachur67 avatar Jan 20 '24 20:01 Chandrachur67

i have got some ideas should i start working on this issue @Chandrachur67 @Arnabdaz

b-harsh avatar Jan 21 '24 20:01 b-harsh