Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

dbr
Copy link
Contributor

@dbr dbr commented Oct 27, 2021

As described in #538 (comment) - this is just the "boring" parts of that PR which revise the build system, and #[cfg(...)] around the few differences in the API in the upstream docking branch

Meaning this basically just allows user to enable the imgui/docking feature, then do

imgui_ctx.io_mut().config_flags |= imgui::ConfigFlags::DOCKING_ENABLE;

to enable windows to be docked together

Once this is good and merged, we can start deciding which bits of the docking API to expose and how (probably very roughly along these lines)

@sanbox-irl
Copy link
Member

I am very excited for this. I looked over the code, but as we know, this isn't my forte in the code base.

@thomcc said he might have time over the weekend. With such a large, change, I think it'd be good to get a second pair of eyes on it, but if we go through the weekend and they couldn't find the time, I'm for the merge!

Copy link
Member

@thomcc thomcc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good, with some caveats.

  1. I don't feel that strongly about it if there's push back, but I think I'd prefer the name imgui-release to imgui-master for the directory, since it's not actually taken from the master branch (it's taken from a tag off of it, presumably), and who knows, imgui might stop using the master branch for similar reasons to us.

  2. We need to still expose a way to access DEP_IMGUI_THIRD_PARTY, and to loop in people who currently depend on it (@4bb4 and @benmkw AFAICT) and provide a migration path for them. We also might need to expose the fact that docking is enabled in case they need to know it.

    I think the way to do this probably to just expose the third-party/imgui-release (or whatever) or third-party/imgui-docking as the DEP_IMGUI_THIRD_PARTY var, depending on features, which (probably? hopefully?) would not be breaking.

  3. This makes it more important that we come up with some automated way of doing updates (#435). Probably a new xtask command which takes the path to the cimgui checkout (or checks it out itself in a temp dir), or something. That doesn't need to be in this PR ofc, but it seems worth doing.

    At the very least, IMO you should write down the concrete steps to take to perform the update in a comment on #435 (although there isn't much rush on that β€” just if you don't do it before the next update, you'll probably be the one who should do that update, and write down the steps you're taking as you do it).


#[cfg(not(feature = "wasm"))]
pub use crate::bindings::*;
cfg_if::cfg_if! {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think I'd prefer this be flattened rather than 2 levels of nesting, tbh.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't work out a neater way of doing this - how would you write the flattened version?

dbr added 4 commits November 2, 2021 14:24
Avoids unnecessary rebuilds of build script.

Also a few somewhat unrelated tidy-ups
Now a bit simpler as:
1. No submodules
2. update-cimgui-output.sh handles pointing it to the correct imgui source
@dbr
Copy link
Contributor Author

dbr commented Nov 2, 2021

but I think I'd prefer the name imgui-release to imgui-master for the directory, since it's not actually taken from the master branch (it's taken from a tag off of it, presumably)

The imgui-docking is also not taken from the latest docking ref directly, but a commit on that branch which corresponds to the tagged release, so I think the current naming is clearest approach. If the default branch is renamed we can update here without a breaking change

We need to still expose a way to access DEP_IMGUI_THIRD_PARTY

A good point, I wasn't aware of this - this is now restored and should work exactly as it did before.

At the very least, IMO you should write down the concrete steps to take to perform the update

Done in docs/upgrading-imgui.md (and I'll reference this file in that thread for visibility)

@sanbox-irl
Copy link
Member

@dbr lets do it?

@dbr
Copy link
Contributor Author

dbr commented Nov 12, 2021

πŸƒ

@dbr dbr merged commit f0f2066 into imgui-rs:main Nov 12, 2021
@dbr dbr deleted the dockfeat branch November 12, 2021 06:46
@dbr dbr mentioned this pull request Nov 15, 2021
This was referenced Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants