fix(UI): tabsbar dropdown button visibility #305
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #304
This pull request fixes the issue of tabsbar dropdown button being visible even when tabs bar is not being overflown by ciruit buttons. This was creating a confusion (which i faced too) about the function of the dropdown button when the tabsbar isn't overflowing. For this, I added a V-if directive with computed property which checks whether the tabsbar has been overflown or not and conditionally renders the dropdown button on tabsbar. Now the dropdown button now only appears when necessary, improving the UI clarity and user experience.
I used two browser apis mutationObserver and resizeObserver for observing changes in size of tabsbar and checking overflow on insertion of new circuit buttons. Since resizeObserver is not supported in older browsers, i had to use a polyfill for it which i installed using npm.
Impact
User Experience: Enhances user experience by preventing confusion about the purpose of the dropdown button when there is no overflow.
Performance: Observers are used efficiently to manage and trigger updates only on actual changes to the tabs bar, ensuring minimal performance impact.
Testing: Manual testing was performed to ensure that the dropdown button now only appears when the tabs bar is actually overflowing