electric-toolbar: nice-to-have improvement to deal with customized toggling of toolbar visibility #1385
Closed
flipvh
started this conversation in
Feature requests
Replies: 1 comment
-
👋 we've been working the last month on a rebuild of the Electric server over at a temporary repo https://github.com/electric-sql/electric-next/ You can read more about why we made the decision at https://next.electric-sql.com/about We're really excited about all the new possibilities the new server brings and we hope you'll check it out soon and give us your feedback. We're now moving the temporary repo back here. As part of that migration we're closing all the old issues, PRs, and discussions. We really appreciate you taking the time to start this discussion! If it's still relevant in the new system, please reopen. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
Because we are using already 3 different toolbars by now, we created our own dropdown to toggle toolbars, one of which is electric: https://x.com/flipvanhaaren/status/1803131132143349974
We got it working sort of , code here, but this resulted in three small - nice-to-have - requests.
1: expose state open/close in parent/host element of shadowRoot
Our dom has limited ways of knowing what is the state (open vs closed) of the electric toolbar. It would be great if the
__electric_debug_toolbar_container
element could show a state in the form of a className or a data prop so we can easily read out if its opened or closed and target it with css easily based on this state.2: Open button in main dom
The way that the toggle button is also part of the toolbar header itself is elegant but not great if you want to target it, since it is in the shadowRoot. While still pretty easy to target, you could consider putting an 'open button' in the dom of the root window, so it can be more easily changed with css by anyone interested in doing so.
3: Close by clicking logo
We also have toolbars for react-query and tanstack-router. They also allow toggling by clicking the main logo on the left. Perhaps something to be considered if the logo doesnt have another target url (planned).
1 and 2 are sort of connected. If you consider working on 2, then perhaps 1 - for us at least - is not necessary. Since we would just hide this open button so that devs can use our toolbar toggle dropdown. (and still use the electic header toolbar to close)
Hope it makes sense!
Beta Was this translation helpful? Give feedback.
All reactions