hoffstadt / DearPyGui

Dear PyGui: A fast and powerful Graphical User Interface Toolkit for Python with minimal dependencies
https://dearpygui.readthedocs.io/en/latest/
MIT License
13.31k stars 691 forks source link

Updating backend ImGui/ImPlot/ImNodes to latest versions #2275

Closed SamuMazzi closed 2 months ago

SamuMazzi commented 9 months ago

name: Updating backend ImGui/ImPlot/ImNodes about: Updated backends title: Updating backend ImGui/ImPlot/ImNodes assignees: ''


After a loooooot of work and time, we've finally finished the PR. A huge thank you to @v-ein for all the help and support.

Description

This PR aims to update the ImGui/ImPlot/ImNodes backends of DPG to way more recent versions.

Currently, DPG relies on really old version of these packages (~2/3 years old), now this is the situation before/after the PR:

Those versions are the latest available at the moment of merging the PR and they are supported by DPG but this doesn't mean that we implemented every single feature from those libraries (many are still missing like multi-selection, several flags in different components, new API for shortcuts, etc...).

Below will be listed a summary of the major changes and new features. We tried to be as much backward compatible as possible. And hopefully you may not need to change anything in your current code.

Issues solved

Changes

Here is a list of all the new and deprecated arguments and functions.

Note: all deprecated functions and arguments are still accepted by DearPyGui API. Some of them may still work, some are ignored, but none should crash your application.

New functions

New arguments

Function Arguments
add_2d_histogram_series
col_major
add_button
repeat
add_child_window






always_auto_resize
always_use_window_padding
auto_resize_x
auto_resize_y
frame_style
resizable_x
resizable_y
add_colormap_scale


format
mirror
reverse_dir
add_combo
fit_width
add_custom_series
no_fit
add_drag_line



delayed
no_cursor
no_fit
no_inputs
add_drag_point





clamped
delayed
no_cursor
no_fit
no_inputs
offset
add_group
enabled
add_heat_series
col_major
add_histogram_series

cumulative
horizontal
add_input_text





always_overwrite
auto_select_all
ctrl_enter_for_new_line
escape_clears_all
no_horizontal_scroll
no_undo_redo
add_line_series




loop
no_clip
segments
shaded
skip_nan
add_pie_series
ignore_hidden
add_plot







max_query_rects
min_query_rects
no_frame
no_inputs
override_mod
query_color
zoom_mod
zoom_rate
add_plot_axis











auto_fit
foreground_grid
no_highlight
no_initial_fit
no_label
no_menus
no_side_switch
opposite
pan_stretch
range_fit
scale
tick_format
add_plot_legend




no_buttons
no_highlight_axis
no_highlight_item
no_menus
sort
add_scatter_series
no_clip
add_stair_series

pre_step
shaded
add_stem_series
horizontal
add_subplots
share_series
add_table_column

angled_header
no_header_label
add_text_point
offset
add_tree_node

span_full_width
span_text_width
add_window
unsaved_document
configure_app



anti_aliased_fill
anti_aliased_lines
anti_aliased_lines_use_tex
docking_shift_only

Deprecated functions

Deprecated arguments

Function Argument Explanation
add_histogram_series cumlative Deprecated because of a typo: use cumulative
add_image_button frame_padding Not supported anymore by Dear ImGui; still works in DPG but will eventually be removed.
add_plot anti_aliased Not supported by ImPlot anymore. To enable/disable anti-aliasing, use dpg.configure_app() with the anti_aliasing parameters.
add_plot no_child Removed in ImPlot as child windows are no longer needed to capture scroll.
add_plot no_highlight Removed because not supported by ImPlot anymore. To control the highlighting of series use the same argument in add_plot_legend.
add_plot

query_button
query_mod
This refers to the old way of querying in ImPlot, now replaced with add_drag_rect().
add_plot_axis log_scale Use scale=dpg.mvPlotScale_Log10 instead.
add_plot_axis time Use scale=dpg.mvPlotScale_Time instead.
add_text_point

x_offset
y_offset
Use the offset argument instead.

Nerd info (for developers)

Why?

ImGui is currently sponsored by big tech companies like Adobe, Blizzard, Activision, etc. so we can expect a lot of improvements with the update (there are already ton of them) and we can expect a lot of people working on the really ugly/hard things like graphical backend libraries.

At my workplace we are about to ship a product based on DPG. Because of my job, I had to edit the backend and then I found out that what I edited was already modified in the new ImGui and then I also found out that the ImGui version we were relying on in DPG was really old. We want to stick with this library but I honestly told them that I don't see the point of relying on an almost dead (okay, no, maintenance mode) library, so we decided to either upgrade it or drop it and replace it with something else.

I know that this is quite a huge change, and that several problems can arise but I also think that it can be definitely worth it. Also with this huge community all of these changes can be "easily" tested.

OpenGL

Currently, for the build, DPG relies on gl3w in the examples folder of ImGui. This doesn't sound like a really stable thing and indeed a couple of releases later, that's been removed, so I added gl3w directly in the thirdparty folder. Also ImGui decided to make some heavy changes in order to be more cross-platform. One of these, which is also my biggest concern about all of this work, is about the buttons of the keyboard. These are now less than before, and they have been all mapped to predefined values in ImGui. So if someone used them heavily now they could have some problem.

Major concerns

Notes

There are still tons of updates and new features that can be implemented (i.e. Shortcuts API, Multi select, and many others), then if you want to take a look on what happened check this for ImPlot and ImGui

In ~2022 ImGui moved all the docking stuff in a separate branch, so now we're relying on that branch. This is not a big difference because it's always rebased on the main branch on every update and should be merged in the master in the version 2.0

Everything was tested with Valgrind in order to be sure that there wasn't any kind of accidental memory leak (or at least not more than those who were already there).

My main goal here was to have a real feedback from the most expert users on this work.

I hope I was clear enough! I'd like to improve this library because I think it's really great, so any kind of suggestion will be well accepted.

bandit-masked commented 9 months ago

What a massive PR! It would be very cool if it would be merged. Grazie mille!

Is there a website for this product by your company?

Atlamillias commented 9 months ago

This is a great PR!

It looks like a lot of the breaking changes could be made to not be if desired via aliases on the Python side, which is nice.

SamuMazzi commented 9 months ago

What a massive PR! It would be very cool if it would be merged. Grazie mille!

Is there a website for this product by your company?

Really thank you! Here it is the link for the product web page, a public demo should be available before the end of the second quarter!

SamuMazzi commented 9 months ago

This is a great PR!

It looks like a lot of the breaking changes could be made to not be if desired via aliases on the Python side, which is nice.

Thank you! What do you mean with aliases? How would you use them in this case?

bandit-masked commented 9 months ago

Could you reply here when the demo is up? Or you could post on #showcase on Discord.

bandit-masked commented 9 months ago

Also, if you are looking to promote your app when it's done, I'd recommend posting on Reddit. I have some experience with that, so I'd could give a few suggestions if you like.

Atlamillias commented 9 months ago

This is a great PR!

It looks like a lot of the breaking changes could be made to not be if desired via aliases on the Python side, which is nice.

Thank you! What do you mean with aliases? How would you use them in this case?

"Alias" may not have been the best word.

For example; in the case of discontinuing add_area_series, implementing a function in dearpygui.dearpygui named add_area_series that wraps add_line_series to allow for proper deprecation instead of discontinuing it altogether. Keyword arguments that would be no longer necessary or simply unsupported with this merge could be handled similarly, since most high-level dearpygui functions accept variadic keyword arguments. The behavior of some of these may differ given the update, but at least it wouldn't break the API.

While I personally don't mind when updates are API-breaking (a benefit of me not needing to work on large projects, I suppose), DPG is supposed to be in "maintenence mode"; @hoffstadt and @Pcothren may not want to have a major release, which would likely be necessary given the API change.

bzczb commented 9 months ago

This branch seems to work well with an app that uses DearPyPixl, just needed to rename mvTag to mvPlotTag so all the machinery worked.

SamuMazzi commented 9 months ago

Also, if you are looking to promote your app when it's done, I'd recommend posting on Reddit. I have some experience with that, so I'd could give a few suggestions if you like.

Thank you, I appreciate that! I'll tell you something when it'll be the moment and I'll post something in the #showcase for sure

SamuMazzi commented 9 months ago

This branch seems to work well with an app that uses DearPyPixl, just needed to rename mvTag to mvPlotTag so all the machinery worked.

That's great, thanks! I really need feedback of someone testing it!

SamuMazzi commented 9 months ago

While I personally don't mind when updates are API-breaking (a benefit of me not needing to work on large projects, I suppose), DPG is supposed to be in "maintenence mode"; @hoffstadt and @Pcothren may not want to have a major release, which would likely be necessary given the API change.

Oh okay, got it, but I think this is gonna create a "complete" new version so maybe there won't be the need of making 100% backward compatible, but if they'll say so I'm sure we'll find a way... there aren't so many breaking changes

bandit-masked commented 9 months ago

Also, if you are looking to promote your app when it's done, I'd recommend posting on Reddit. I have some experience with that, so I'd could give a few suggestions if you like. Thank you, I appreciate that! I'll tell you something when it'll be the moment and I'll post something in the #showcase for sure

The main things to take into account are:

  1. Day of the week and time of posting. There are websites dedicated to establishing the perfect day and time for each subreddit. The quick and simple rule is to post between 8 and 9 a.m. US East Coast time so that it can gather as many possible upvotes in a day as the post becomes trending as people start working.

  2. Post a GIF or video without any text if possible (whether that's possible depends on the subreddit). If it's just a GIF or video, the GIF or video will be shown directly in the feed, which draws more attention and upvotes to it. You can post a comment on your own post with the backstory and links. Unfortunately, r/python, which is one of the biggest communities, doesn't allow for posting a video only. I'm not sure, but it used to pick up the image associated with a GitHub link as the thumbnail for your post. Better make sure to test this, e.g. on an unknown/your own subreddit, before posting to the big subreddits.

  3. If you get a few upvotes really quickly in the beginning, that will boost the visibility incredibly and will start a domino effect. Hence, make sure people know you are going to post and get them to upvote within the first 10 minutes.

  4. Besides the obvious subreddits such r/python, find other subreddits to show your application. People tend to show a relatively stronger response in smaller, yet active communities, especially if its a good match.

Good luck!

Atlamillias commented 9 months ago

This branch seems to work well with an app that uses DearPyPixl, just needed to rename mvTag to mvPlotTag so all the machinery worked.

Thanks for the heads-up! I'll need to test this PR against my apps that use DearPyPixl as well, although I don't expect I'll find many problems. Docking's one, I suppose.

v-ein commented 8 months ago

While I really appreciate all the work done and still being done behind this PR, and welcome any fixes that correct possible earlier mistakes in ImGui upgrade, can we keep unrelated commits in separate PRs? (maybe published later, once this PR gets merged).

I've noticed that commits continue to trickle into this PR, and some of them look unrelated to ImGui upgrade, which increases the work to review all this and might cause extra havoc if this PR needs any substantial rework.

Unfortunately I myself haven't had a chance to review the PR yet - my apologies on that, I'm quite bogged with other stuff. Hoping to get some progress this week...

SamuMazzi commented 8 months ago

While I really appreciate all the work done and still being done behind this PR, and welcome any fixes that correct possible earlier mistakes in ImGui upgrade, can we keep unrelated commits in separate PRs? (maybe published later, once this PR gets merged).

Yeah sure! I think you refer to the "recursive" functionality (as far as I remember it should be the only "extra" thing that I added)... I was actually uncertain of pushing that commit, but I'll revert it asap

And obviously no problem for the review :)

v-ein commented 8 months ago

Just a heads up - I'm reviewing this PR as time permits. It's hard to estimate progress - I think I'm still less than 20% into it. Since there's still a lot to review, I'm not making any comments yet - will be adding them later.

ArneSchulzTUBS commented 8 months ago

Thanks for the great work. How much effort would it be to directly use ImGui's docking branch so that we can keep the docking feature in DearPyGui ? If i understand correctly, their main and docking branch are regularly synced so there aren't too many differences in the core functionality.

v-ein commented 8 months ago

+1 for keeping the docking feature. That's one of the things I was going to discuss.

v-ein commented 7 months ago

While I'm still going through all the changes, I think it's time to start making some initial comments.

First of all, a disclaimer: the text below reflects my own opinion and not that of DPG devs (I'm not one of DPG authors). Also, some of my comments might seem a bit harsh - please bear with me, it's not because of any negative attitude, it's more like giving up on proper wording :slightly_smiling_face:.

Here are some key things (other comments will be attached to code lines as usual in a PR).

Making comments in the PR will take quite some time (maybe a couple of days), and I'm still halfway through the review, so get your popcorn ready! :popcorn: :grin:

v-ein commented 7 months ago

One more thing I forgot to mention:

I'd like to ask a favor of whoever makes changes in future - in other PRs as well! - to avoid unnecessary re-formatting, renaming etc. because it pollutes git blame, often for no reason other than taste. git blame is a very useful tool when it comes to understanding why the code was written the way it was written. Nothing critical, just keep that in mind.

This is also what I actually mean when I type something like "the old code worked the same way, why change it?"

v-ein commented 7 months ago

A couple of words on set_decimal_point:

At the moment, it is broken for add_input_float, add_slider_float, add_drag_float (and their double counterparts). That is, it only seems to work on add_input_text with either decimal=True or scientific=True. See this comment in ImGui ticket #6719.

Do we want to add a feature to DPG in such a broken state? If so, we need to make a warning either in the release notes or in the doc (or both), and eventually update ImGui once again to pull up the fix for this.

v-ein commented 7 months ago

A note on deprecated keywords:

I've suggested DEPRECATED_REMOVE_KEYWORD_ARG in a couple of places. For all these cases, we need to document:

Not sure where to keep this doc, maybe just a comment in this PR? In the end, it should go to the release notes.

v-ein commented 6 months ago

A couple of words on declaring arguments deprecated. Right now, DPG has two options to deprecate an argument:

I'd suggest that we add one more option, where a warning will be issued but otherwise the argument will be passed into the C++ part the way it did before, with its original name. This can be used for arguments that we want to retain for backward compatibility (maybe delete later), but also want to point the user to a newer, better way to do the same thing. We can name it simply DEPRECATED_KEYWORD_ARG. It will also need an extra message coded in argument definition, so that we can say something like "use argument X instead".

v-ein commented 6 months ago

A note on key modifiers in the plot (this seems to be the only place where we can pass modifiers):

While it might look natural to pass dpg.mvKey_None to disable the corresponding modifier, mvKey_None doesn't actually work. ImPlot uses ImHasFlag to check if the modifier is pressed. The way ImHasFlag is implemented, ImHasFlag(keys, 0) will always return true, not false. To disable the modifier, one can pass -1 instead of mvKey_None, which is totally non-obvious. We probably need to document this somewhere.

It would be even better to modify the code so that mvKey_None leads to false in modifier tests, but that means making changes to ImPlot or even ImGui, which is a long way to go.

v-ein commented 6 months ago

When adding new axes now you need to specify which ones (i.e. dpg.add_plot_axis(mvXAxis2))

This breaks the old behavior of having multiple Y axes of type dpg.mvYAxis. While I'm all for the new syntax with dpg.mvYAxis2 and dpg.mvYAxis3, I think we can somewhat reduce the pain for DPG users by auto-assigning multiple axes of type dpg.mvYAxis to Y1/Y2/Y3 depending on their order in the list. Here's a fix that does just that:

https://github.com/v-ein/DearPyGui-fixes/compare/c62d78d3c60efa041e8a00e8ef41910af2ed441c...bugfix/auto-y-axes

In addition, the fix removes axesNames and axesFlags from mvPlotConfig since they actually got useless with the updated ImPlot.

Here's a script to test it all:

import dearpygui.dearpygui as dpg

dpg.create_context()
dpg.create_viewport(title=f"Test - {dpg.get_dearpygui_version()}", width=500, height=750)

with dpg.window(label="Old way"):
    with dpg.plot():
        dpg.add_plot_axis(dpg.mvXAxis)
        dpg.add_plot_axis(dpg.mvYAxis, label="Y1")
        dpg.add_plot_axis(dpg.mvYAxis)
        dpg.add_plot_axis(dpg.mvYAxis, label="Y3")

if hasattr(dpg, "mvYAxis2"):
    with dpg.window(label="New way", pos=(0, 350)):
        with dpg.plot():
            dpg.add_plot_axis(dpg.mvXAxis)
            dpg.add_plot_axis(dpg.mvYAxis, label="Y1")
            dpg.add_plot_axis(dpg.mvYAxis2)
            dpg.add_plot_axis(dpg.mvYAxis3, label="Y3")

dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()  

(The label on Y2 is omitted deliberately in order to test label assignment).

SamuMazzi commented 6 months ago

While it might look natural to pass dpg.mvKey_None to disable the corresponding modifier, mvKey_None doesn't actually work. ImPlot uses ImHasFlag to check if the modifier is pressed. The way ImHasFlag is implemented, ImHasFlag(keys, 0) will always return true, not false. To disable the modifier, one can pass -1 instead of mvKey_None, which is totally non-obvious. We probably need to document this somewhere.

So you're telling to just put in the explanation of the parameters that you can disable that feature by just putting -1? (Ignoring the alternative of modifying implot itself) Otherwise tell me if I got it wrong

v-ein commented 6 months ago

Yeah, kind of that. We can even define a new constant, like dpg.mvKey_ModDisabled, to abstract off that "-1", and make it more readable. And then maybe add a note in setup.about since we already have a bit of text about modifiers there. Like this:

setup.about = "Adds a plot which is used to hold series, and can be drawn to with draw commands. For all _mod parameters use mvKey_ModX enums, or mvKey_ModDisabled to disable the modifier.";
v-ein commented 5 months ago

I'm done with my "first pass" through the changes. Once all comments I added above get resolved in this way or that, I'm going to scan through the changes once more (faster this time) and see if we still have any issues.

v-ein commented 5 months ago

Here is a list of all the new and deprecated arguments and functions - I think we'll need to add it to Release Notes. Going to update this list right before merging the PR.

Update 2024/07/22: re-generated the list based on the latest commit. Only the New arguments section has changed.


Note: all deprecated functions and arguments are still accepted by DearPyGui API. Some of them may still work, some are ignored, but none should crash your application.

New functions

New arguments

Function Arguments
add_2d_histogram_series
col_major
add_button
repeat
add_child_window






always_auto_resize
always_use_window_padding
auto_resize_x
auto_resize_y
frame_style
resizable_x
resizable_y
add_colormap_scale


format
mirror
reverse_dir
add_combo
fit_width
add_custom_series
no_fit
add_drag_line



delayed
no_cursor
no_fit
no_inputs
add_drag_point





clamped
delayed
no_cursor
no_fit
no_inputs
offset
add_group
enabled
add_heat_series
col_major
add_histogram_series

cumulative
horizontal
add_input_text





always_overwrite
auto_select_all
ctrl_enter_for_new_line
escape_clears_all
no_horizontal_scroll
no_undo_redo
add_line_series




loop
no_clip
segments
shaded
skip_nan
add_pie_series
ignore_hidden
add_plot







max_query_rects
min_query_rects
no_frame
no_inputs
override_mod
query_color
zoom_mod
zoom_rate
add_plot_axis











auto_fit
foreground_grid
no_highlight
no_initial_fit
no_label
no_menus
no_side_switch
opposite
pan_stretch
range_fit
scale
tick_format
add_plot_legend




no_buttons
no_highlight_axis
no_highlight_item
no_menus
sort
add_scatter_series
no_clip
add_stair_series

pre_step
shaded
add_stem_series
horizontal
add_subplots
share_series
add_table_column

angled_header
no_header_label
add_text_point
offset
add_tree_node

span_full_width
span_text_width
add_window
unsaved_document
configure_app



anti_aliased_fill
anti_aliased_lines
anti_aliased_lines_use_tex
docking_shift_only

Deprecated functions

Deprecated arguments

Function Argument Explanation
add_histogram_series cumlative Deprecated because of a typo: use cumulative
add_image_button frame_padding Not supported anymore by Dear ImGui; still works in DPG but will eventually be removed. Replace it with a theme having the dpg.mvStyleVar_FramePadding style.
add_plot anti_aliased Not supported by ImPlot anymore. To enable/disable anti-aliasing, use dpg.configure_app() with the anti_aliasing parameters.
add_plot no_child Removed in ImPlot as child windows are no longer needed to capture scroll.
add_plot no_highlight Removed because not supported by ImPlot anymore. To control the highlighting of series use the same argument in add_plot_legend.
add_plot

query_button
query_mod
This refers to the old way of querying in ImPlot, now replaced with add_drag_rect().
add_plot_axis log_scale Use scale=dpg.mvPlotScale_Log10 instead.
add_plot_axis time Use scale=dpg.mvPlotScale_Time instead.
add_text_point

x_offset
y_offset
Use the offset argument instead.
SamuMazzi commented 5 months ago

Here is a list of all the new and deprecated arguments and functions - I think we'll need to add it to Release Notes. Going to update this list right before merging the PR.

Are you also gonna add other things like StackToolWindow, new stying variables and other features in the list?

v-ein commented 5 months ago

@SamuMazzi how is it going? I'm not sure if all my comments have been resolved; I only see the comment about delete_rect that's still open. Please let me know if you're done with changes on your end, and I can start my final pass through the PR.

v-ein commented 5 months ago

Are you also gonna add other things like StackToolWindow, new stying variables and other features in the list?

Sorry, didn't see your earlier comment. I think we can use your original description, just edit it a bit so it reflects the current state. My goal with those lists of new/deprecated functions was to (1) make it easier to see what changed in the API, and (2) make sure we don't miss anything. So I ran some diff/grep/etc. on the arguments and compiled those lists, to make sure we have real data obtained from the source code.

v-ein commented 5 months ago

I'd prefer to leave editing of the original description to you ;)

SamuMazzi commented 5 months ago

@v-ein I should have done everything except for delete_rect: I already did something but I'm gonna need a little bit of time more, I think. You choose if you want to start already reviewing other parts of the code or you want to wait. Actually a couple of "resolved" things are still to be commited, but these are just a few things

And for the other thing, perfect, then I'll think on how to write the final PR :)

v-ein commented 4 months ago

@SamuMazzi can you please take a look at the following discussions? Looks like they are not fully resolved (or need some answers).

  1. https://github.com/hoffstadt/DearPyGui/pull/2275#discussion_r1642278594
  2. https://github.com/hoffstadt/DearPyGui/pull/2275#discussion_r1632871096
  3. https://github.com/hoffstadt/DearPyGui/pull/2275#discussion_r1632396463
v-ein commented 4 months ago

Here's something to consider for the PR description.

ImPlot now auto-fits data by default on the first frame, whereas the old version was displaying the plot in the [0, 1] range if the user did not specify the range in any way.

I think we need to mention this in the Release Notes, and point out that no_initial_fit=True corresponds to the old behavior. I doubt that it will affect anyone (since most if not all users either specify an explicit range or do an auto-fit), it's just good to point out.

v-ein commented 4 months ago

I'm thinking on how we can make it easier for users of the old query mechanism to adapt their apps to the new approach, which looks a bit limited in certain aspects.

In the old version, the user could only have one query rect. Each time they dragged with the middle mouse button, the rect was re-created in the new location. This suits well the apps that show a zoomed-in portion of the plot in a separate window.

With the current approach, however, it's a bit difficult to implement such an app because ctrl-right-dragging creates a new drag rect and it's not clear how to handle that. Ideally, there should be a way to limit the number of query rectangles for the plot.

The following could make it easier:

This way, with min_query_rects=1 and max_query_rects=1, we'll get the old behavior of the query feature. Maybe we should make these numbers the default, too.

What do you think?

SamuMazzi commented 4 months ago

It makes totally sense. I just have a question... wouldn't make it more sense to delete the first rect, like in a FIFO queue, when max_query_rects is reached? In the default case this won't change anything.

Instead, I'll push the modifications, also the one that you suggested me (I don't remember where and I don't want to look for it) regarding the deletion of the query rect and it seems like that the old version used to work better. This one seems to always evaluate to true that hovered variable and so it deletes the last rect. Try and tell me pls.

v-ein commented 4 months ago

wouldn't make it more sense to delete the first rect, like in a FIFO queue, when max_query_rects is reached?

I also considered this approach but it's probably less obvious for the user when he draws one rect, two, three, a dozen and then the first one disappears. The user's attention will probably be on the last rectangle and not on the first one (the first one might already be scrolled away). But, well... who knows :). We could even add an option to control the behavior of the query when the max is reached, but won't that be an overkill?..

SamuMazzi commented 4 months ago

Yes but then the user won't be able, in any way, to delete all the other rects... anyway no I wouldn't add another option so I'll stick to your version

SamuMazzi commented 4 months ago

@v-ein I should have also found a way to fix issues #1847 #2363 and others related similar to those. It seems to work for what's concerning my tests, but I don't know if it should go inside another PR

v-ein commented 4 months ago

but I don't know if it should go inside another PR

Let's do it in a separate PR. This one is close to completion, let's not add any more stuff.

v-ein commented 4 months ago

Not sure what to do with the commit 1e99e3f... Can you try the following sequence?

  1. In your repo, add a tag to the current head of the porting branch (or add another temporary branch, just to keep that chain of commits in the repo). Make sure that this tag/branch gets pushed to GitHub (or you can create it right there on GitHub).
  2. In your local copy, delete the local porting branch (do not delete the remote branch).
  3. Re-create the local porting branch on commit 1c3db32. GitHub will still have remote porting branch pointing to 1e99e3f at that moment.
  4. Try to push your local porting branch. If needed, use --force (I'm sure it will be needed). If it works, this will move porting on GitHub to 1c3db32. Most probably it won't work though.

I'd recommend to do all that on a separate clone of your repo (not on the copy you use for bugfixing). Technically, steps 1-3 are absolutely safe for your GitHub repo. Step 4 is more of an experiment, but since the branch or tag added in step 1 holds a reference to 1e99e3f, the current chain of commits will not be lost. Worst case you'll get another series of commits (a duplicate) in your fork; best case porting will just jump back to 1c3db32.

SamuMazzi commented 4 months ago

It didn't work even if I managed to create the tag... can I actually just try to delete the modification (some kind of git reset) and keep the modifications locally? Then when the PR will be accepted I'll create another one with this one!

v-ein commented 4 months ago

You mean, add another commit that rolls back the changes? Yes, that's one of the ways to do it. Least preferrable, but if other ways don't work... well.

some kind of git reset

That's exactly what I wanted to do: to move the porting branch back by 1 commit so that it doesn't include these changes. Or did you mean git revert?

SamuMazzi commented 4 months ago

Did it! I had to force-push but I have the changes locally so no problem I'd say

v-ein commented 4 months ago

Replying to an earlier comment that I only now got a chance to check:

This one seems to always evaluate to true that hovered variable and so it deletes the last rect. Try and tell me pls.

With the latest commit, seems to be working fine for me. Whichever query rect I double click, that rect gets deleted, not the last rect.

v-ein commented 4 months ago

Would you please also look at this comment - it's feeling a bit forlorn: https://github.com/hoffstadt/DearPyGui/pull/2275#discussion_r1677133725

v-ein commented 3 months ago

I'm done with my final pass of code review. Several things (mentioned in recent comments) still need to be fixed. Also, we need to make sure that the PR description contains some text to be used as Release Notes.

One more thing that bothers me is that there's going to be a merge conflict when the PR gets closed. To prevent it (or, better, to help Jonathan and relieve him from the need to resolve that conflict :joy:), we can merge current master into the porting branch (resolving the conflict at this point). This guarantees that there won't be a conflict when porting gets merged back to master.

The conflict is trivial and is caused by changes to draw_rect arguments in dearpygui.py; we need to accept the version from this PR and ignore the version from master (since the PR provides a correct and up-to-date solution based on DEPRECATE_KEYWORD option).

v-ein commented 3 months ago

Hmmm... what happened that you had to do a force-push?