Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fix backend and deserialize object_info correctly for querying … #30

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

vgarleanu
Copy link
Member

…available nodes

@vgarleanu vgarleanu force-pushed the feat/backend-api-fixes branch from 70c9ffa to f7a3d02 Compare May 26, 2024 21:26
@vgarleanu vgarleanu requested a review from IGI-111 May 26, 2024 21:26
@@ -50,6 +70,8 @@ impl Mediator {

populate_available_nodes(&mut model);

model.spawn_client(tx.clone());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why isn't this part of Backend::new?

Comment on lines +234 to +237
let _ = value.parse().map(|x| state.set_int(x));
}
TY_FLOAT => {
let _ = value.parse().map(|x| state.set_float(x));
Copy link
Collaborator

Choose a reason for hiding this comment

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

use if-let instead of map if you don't care about the resulting value.

_ => {}
}
}
Render => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This needs a better name, it's too easy to confuse with UI rendering.

Comment on lines +252 to +253
println!("\n");
println!("{:#?}", &wf);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
println!("\n");
println!("{:#?}", &wf);
println!("\n\n{:#?}", &wf);

ui.global::<ui::NodeLogic>().on_move_node({
move |node_idx, x, y| {
tx.send(Event::SetNodePosition(node_idx as usize, x, y))
// TODO: Make me a macro!
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't.

@@ -0,0 +1 @@

Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove this file.

@@ -0,0 +1,4 @@
imports_granularity = "Item"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hot garbage. Use this and no less.

Suggested change
imports_granularity = "Item"
imports_granularity = "Crate"

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.

2 participants