This repository was archived by the owner on Jan 12, 2026. It is now read-only.
Open
Conversation
trusz
reviewed
May 15, 2025
Member
trusz
left a comment
There was a problem hiding this comment.
Thank you for your contribution!
The solution looks nice and I would like to ask for a few changes to finalize the solution. You can of course let us know if we should take over from here.
- I have small code change request about adding and removing event listeners.
- Also, I was wondering if you could place the overflow menu at the and of the row and not at the beginning. I think they are usually there.
- The style of the selected tabs have changed a bit. Would it be possible to revert them how they've looked like?
- I think it would be nice somehow to display the currently active plugin even if it in the overflow menu, but currently I do not have an idea how. I am open to suggestions.
| } | ||
|
|
||
| disconnectedCallback() { | ||
| window.removeEventListener('resize', () => this.#calculateVisibleTabs()); |
Member
There was a problem hiding this comment.
I think this won't remove the original one.
I would recommend creating a function that we can reference.
something along these lines:
private calculateVisibleTabs = () => {
...
}By using an arrow function we make sure that we have the correct context (this) without binding the function.
With that you can add and remove listeners:
window.addEventListener('resize', this.calculateVisibleTabs)
window.RemoveEventListener('resize', this.calculateVisibleTabs)
Contributor
Author
There was a problem hiding this comment.
- Thanks for the hint that removing the resize listener did not work. I fixed it now.
- The overflow menu is now placed at the end of the row - I like this solution better as well.
- I find styling Material Web Components quite painful, because there are many fixed/internal styles. I've adjusted the buttons to look more like mwc-tab-bar, but I couldn’t increase the icon size or vertical padding. Any ideas?
- My idea for improving the UI: If the active plugin is hidden in the overflow menu, move its button to the right-most visible position, and move the button currently there into the menu instead. This could be repeated if needed (e.g. if the active button is wider).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
closes #1592