Skip to content

Commit

Permalink
Updated fn_params_layout, fixed formatting errors
Browse files Browse the repository at this point in the history
Updated fn_params_layout from deprecated fn_args_layout, fixed formatting errors in fn render_rules_menu in mod.rs
  • Loading branch information
zacharybonagura committed Oct 14, 2024
1 parent 873dc46 commit efdec41
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
use_small_heuristics = "max"
fn_args_layout = "compressed"
fn_params_layout = "compressed"
max_width = 2147483647
24 changes: 12 additions & 12 deletions web-app/src/components/proof_widget/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ impl ProofWidget {
.rules()
.map(|rule| {
let pjref = Coproduct::inject(jref);

// Determine the folder for the current theme
let get_folder = || {
if theme() == "dark" {
Expand All @@ -182,12 +182,12 @@ impl ProofWidget {
}
};
let image_src = format!("{}/{}.png", get_folder(), rule.get_name());

html! {
<div class="dropdown-item-wrapper" style="position: relative;">
<button
class="dropdown-item"
type="button"
<button
class="dropdown-item"
type="button"
onclick={ ctx.link().callback(move |_| ProofWidgetMsg::LineAction(LineActionKind::SetRule { rule }, pjref)) }
onmouseover={ctx.link().callback(move |_| {
let js = format!(
Expand All @@ -212,10 +212,10 @@ impl ProofWidget {
>
{ rule.get_name() }
</button>
<img
id={format!("tooltip-img-{}", rule.get_name())}
src={image_src}
alt={rule.get_name()}
<img
id={format!("tooltip-img-{}", rule.get_name())}
src={image_src}
alt={rule.get_name()}
style="
display: none;
position: absolute;
Expand All @@ -233,9 +233,9 @@ impl ProofWidget {
}
})
.collect::<Vec<yew::virtual_dom::VNode>>();

let rules = yew::virtual_dom::VList::with_children(rules, None);

html! {
<div class="dropdown dropright dropdown-submenu">
<button class="dropdown-item dropdown-toggle" type="button" data-toggle="dropdown"> { rule_class } </button>
Expand All @@ -245,7 +245,7 @@ impl ProofWidget {
})
.collect::<Vec<yew::virtual_dom::VNode>>();
let menu = yew::virtual_dom::VList::with_children(menu, None);

html! {
<div class="dropright">
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" data-submenu="">
Expand Down

0 comments on commit efdec41

Please sign in to comment.