Skip to content

Conversation

@michalsustr
Copy link
Collaborator

@michalsustr michalsustr commented Nov 23, 2025

Closes #166

show_dyn is a massive function with non-trivial dependencies.

This PR attempts to untangle it and make it easier to navigate and understand.

Public API changes:

  • simplified show lifetime

Removed items from the public API

-pub fn egui_plot::Plot<'a>::show<'b, R>(self, ui: &mut egui::ui::Ui, build_fn: impl core::ops::function::FnOnce(&mut egui_plot::PlotUi<'b>) -> R + 'a) -> egui_plot::PlotResponse<R>

Added items to the public API

+pub fn egui_plot::Plot<'a>::show<R>(self, ui: &mut egui::ui::Ui, build_fn: impl core::ops::function::FnOnce(&mut egui_plot::PlotUi<'a>) -> R + 'a) -> egui_plot::PlotResponse<R>

@michalsustr michalsustr added the include in changelog This change will be included in the changelog label Nov 23, 2025
@michalsustr michalsustr force-pushed the ms/refactor-plot-condensed branch 3 times, most recently from 304f0e8 to 817ed03 Compare November 23, 2025 15:42
Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

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

Code LGTM! Thanks for tackling this beast

Comment on lines +1545 to +1546
show_x: show_xy.x,
show_y: show_xy.y,
Copy link
Owner

Choose a reason for hiding this comment

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

Future improvement (can save for other PR):

Suggested change
show_x: show_xy.x,
show_y: show_xy.y,
show_xy,

@michalsustr michalsustr force-pushed the ms/refactor-plot-condensed branch from 9bc56a4 to 04a6443 Compare November 29, 2025 12:11
@michalsustr michalsustr marked this pull request as ready for review November 29, 2025 12:11
@michalsustr michalsustr force-pushed the ms/refactor-plot-condensed branch from 04a6443 to 93e7eb3 Compare November 29, 2025 12:22
@michalsustr michalsustr merged commit b551461 into main Nov 29, 2025
10 checks passed
@michalsustr michalsustr deleted the ms/refactor-plot-condensed branch November 29, 2025 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

include in changelog This change will be included in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shorten show_dyn function

3 participants