Closed micfong-z closed 4 weeks ago
This should be feature-complete and bug-free AFAIK.
Hi, sorry for the massive delay! My irl stuff has been insane in the last couple of months.
I think the features you've added are great, although I think having a button that lets you collapse a whole window (which we lost in this PR) would be really nice to have. Can we add it back?
I've fixed up a few things following the release of 0.13 and rebasing to the next release branch. Let me know if there's anything I could help you with.
I think having a button that lets you collapse a whole window (which we lost in this PR) would be really nice to have.
I'd be glad to add this feature, but I'm not fully certain how this should be designed. Should collapsing a whole window be:
@Adanos020 I've implemented this feature like this:
https://github.com/Adanos020/egui_dock/assets/68492819/7f86e70b-9049-4726-a405-d1a20c782183
So essentially all features available in the original design is now in the right-click context menu of the relevant buttons.
I named this feature minimizing a window, to avoid frequent confusions with collapsing a node in the codebase. Let me know if there's a better way to name this ;)
@micfong-z This looks good, although it isn't immediately obvious that you can right-click on the buttons. I reckon a tooltip on each button could help with that.
@Adanos020 Done – I've also fixed cargo test. I reckon another design of activating these features by shift-clicking (or ctrl/alt/...-clicking?) the buttons might be possible, but I'm not really sure if this applies well to different keyboard layouts, or* if this is even more obscured.
*: I just checked the way how egui handles modifier keys. This shouldn't be a problem now.
That sounds good, I'd say let's come up with a few designs and let the library users choose.
One design I've been thinking of is to have separate buttons for windows, but make them look like little bookmarks behind the window (or the tab bar) that'll pull out when you hover over them. How does that sound?
That design sounds brilliant! Though I would have to dig deep enough to figure out a way to display some sort of floating panels behind windows. AFAIK, since all Area
s in egui are rectangular, these floating panels may mean introducing two auxiliary windows for each window.... I'll give it a try anyways :/
Edit: could tooltip/menu implementations help?
Sorry for not being active on this PR recently due to ... irl stuff ( :( ) – but I think I've caught up a bit.
For now I have implemented the two options I've mentioned for the user to choose (modifier key method and context menu method), but I've been really struggling to get the bookmark button method done.
I have experimented with creating new Area
s, tweaking Tooltip
s, or even creating auxiliary Window
s, but all of them have issues with at least one of focusing, anchoring and layering. ChatGPT and Googling didn't help (of course), and the codebase and changelog is getting a bit messy.
I'd be happy to carry on experimenting if someone could give me some directions to work on. Nevertheless, this feature could probably be put in a separate PR instead considering its complexity.
@Adanos020 if creating a separate PR for this specific issue is okay, I'll go on finalizing/cleaning up the codebase then!
Edit: I'll layout the issues I've encountered so far.
Area
and Window
(same thing under the hood): focusing and layering issues. I couldn't figure out a way to programmatically shift the auxiliary window holding the buttons to the layer "just after the window that has been hovered on", without a change to nearly everything. Anchoring went well.Tooltip
: well firstly it appears above the window. Plus for some reason setting tooltip delay (ideally to 0) had no effect. Anchoring is also quite difficult in this case.Hey, no worries at all, I've also been dealing with lots of personal issues because of which I didn't have much time to dedicate to this project. Thanks for coming back to this PR!
If the bookmark button is too big of a pain to implement, then I'd say let's drop it for now. We can make do with the current designs.
@Adanos020 Everything is good to go now (from my side), but I'll point out a few possible caveats
lib.rs
are translated from an online service, so no guarantee that they would be fully correctLeaf
s on user-side tooltips. Not sure if this would be confusing.Thanks for merging! A side note for consistency in JP translations: the lines ending with 。
(CN/JP full stop) are all tooltip texts, so keeping them at the end is more consistent with English/Polish translations.
However, as per Material Design Guidelines, the full stops should not follow single-sentence tooltip texts. Maybe remove all full stops in translations would be good.
Resolves #238. See the issue for a full discussion of this design.
Here's a list of technically missing features in this PR, but I'd like to hear some opinions before carrying on ;)
Proper styling (especially rounding)Leaf
(https://github.com/Adanos020/egui_dock/pull/237/commits/fd805c924e2febed9bebee02c338d3ee0bf840cd, https://github.com/Adanos020/egui_dock/pull/237/commits/ccce02f21005aada100e33c47a6b00c5b4d55e1b)