-
Notifications
You must be signed in to change notification settings - Fork 34
Conversation
fixed bugs which appears once several TextFields are on screen.
src/rust/Cargo.toml
Outdated
@@ -29,7 +30,7 @@ members = [ | |||
] | |||
|
|||
[profile.dev] | |||
opt-level = 0 | |||
opt-level = 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check how it works with tests and CI caching.
@@ -194,7 +195,7 @@ commands.watch = command(`Start a file-watch utility and run interactive mode`) | |||
commands.watch.parallel = true | |||
commands.watch.rust = async function() { | |||
let target = '"' + `node ${paths.script.main} build --no-js --dev -- ` + subProcessArgs.join(" ") + '"' | |||
let args = ['watch','--watch','lib','-s',`${target}`] | |||
let args = ['watch','-s',`${target}`] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remember to add --npm flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now I did something simpler (as discussed via phone). All flags after --
are passed to cargo only (not to npm
anymore).
impl Default for SimulationThresholds { | ||
fn default() -> Self { | ||
Self::new(0.1,0.1) | ||
impl<T:Position,Cb> CloneRef for Simulator<T,Cb> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
derive(CloneRef) - checke every impl CloneRef in your PR if it may be replaced with derive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Not everywhere as CloneRef deriving does not work yet for structs with bounds, but done where possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix is ready and blocked by your review since Tuesday.
#323
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mwu-tow oh, I was not aware! Or I was but forgot. sorry for that!
|
||
/// Registry gathering callbacks. Each registered callback is assigned with a handle. Callback and | ||
/// handle lifetimes are strictly connected. As soon a handle is dropped, the callback is removed | ||
/// as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The doc is the same as for Registry
, there should be information about difference between them
pub on_updated : RefCell<Option<Box<dyn Fn(&NodeData)>>>, | ||
pub on_show : RefCell<Option<Box<dyn Fn()>>>, | ||
pub on_hide : RefCell<Option<Box<dyn Fn()>>>, | ||
pub on_show_with : RefCell<Option<Box<dyn Fn(&Scene)>>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Describe when exactly the "on_show_with" and "on_hinde_with" is called.
// _ => Err(BadVariant) | ||
// } | ||
// } | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented code
use ensogl::display::layout::alignment; | ||
use ensogl::system::web; | ||
use ensogl::control::callback; | ||
use ensogl::gui::component::animation; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix import order
src/rust/lib/graph/src/lib.rs
Outdated
} | ||
|
||
pub fn for_each_taken<F:Fn(Node)>(&self,f:F) { | ||
self.take().into_iter().for_each(|(_,node)| { node.upgrade().for_each(|n| f(n)) }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may use WeakValueHashMap from weak_table (imported in prelude)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, not in this PR, but Ill take a look at it, thanks!
src/rust/lib/prelude/Cargo.toml
Outdated
'WheelEvent', | ||
'DomRect', | ||
'AddEventListenerOptions' | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline
src/rust/lib/shapely/impl/Cargo.toml
Outdated
paste = "0.1" | ||
derivative = "1.0.3" | ||
shrinkwraprs = "0.3.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
paste = "0.1" | |
derivative = "1.0.3" | |
shrinkwraprs = "0.3.0" | |
paste = { version = "0.1" } | |
derivative = { version = "1.0.3" } | |
shrinkwraprs = { version = "0.3.0" } |
and align closing }
/// Specialized version of `Registry` for arguments implementing `Copy`. Passing copy-able elements | ||
/// as values is more performant than by reference. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you benchmarked it? I would say, that rust optimizer will handle such case anyway (because it know, that is "readonly refrence" and cannot be changed by other process, so it can replace reference with copy!
pub use super::Object as TRAIT_Object; | ||
pub use super::ObjectOps as TRAIT_ObjectOps; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment explaining why we're doing this should be rather here, not by the ObjectOps definition
Original commit: enso-org/ide@169b3d1
Pull Request Description
RefCell
usage. Now our codebase has much lessRefCells
! ❤️Checklist
Please include the following checklist in your PR: