Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
crcn committed Sep 10, 2023
1 parent 56066a2 commit 41b25ca
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 29 deletions.
23 changes: 0 additions & 23 deletions libs/designer/src/components/Sidebar/sidebar.pc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public component SidebarContainer {
/**
* @bounds(x: 1329, y: -71, width: 243, height: 768)
*/

public component Sidebar {
render div root(class: class, style: style) {
style extends theme.fontDefault {
Expand Down Expand Up @@ -77,7 +76,6 @@ public component Sidebar {
/**
* @bounds(x: 1598, y: -49, width: 189, height: 369)
*/

public component SidebarPanel {
render div {
style extends panel {
Expand Down Expand Up @@ -132,7 +130,6 @@ public component SidebarSection {
/**
* @bounds(x: 325, y: 958, width: 1024, height: 768)
*/

public component SidebarPanelHeader {
render div {
style extends theme.fontHeader {
Expand Down Expand Up @@ -200,7 +197,6 @@ public component SidebarHeaderButton {
/**
* @bounds(x: 93, y: 904, width: 378, height: 267)
*/

public component SidebarPopup {
render div(style: style) {
style extends panel {
Expand Down Expand Up @@ -246,22 +242,3 @@ public component SidebarPopupPanelContent {
}
}

/**
* @bounds(x: 1069, y: 86, width: 189, height: 162)
*/

div {
style {
position: relative
}
div {
style {
background: rgba(0, 0, 0, 0.1)
position: absolute
left: 46px
top: 51px
width: 124px
height: 83px
}
}
}
19 changes: 14 additions & 5 deletions libs/proto_ext/src/ast_mutate/move_expression_to_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use paperclip_proto::{
ast::pc::Element,
ast::{
all::ExpressionWrapper,
graph_ext::Dependency,
pc::{Document, Style},
},
ast_mutate::MoveExpressionToFile,
Expand All @@ -13,17 +14,25 @@ use paperclip_proto::ast::all::visit::{MutableVisitor, VisitorResult};
use paperclip_proto::ast::get_expr::GetExpr;

impl MutableVisitor<()> for EditContext<MoveExpressionToFile> {
fn visit_dependency(&mut self, dep: &mut Dependency) -> VisitorResult<()> {
let (expr, expr_dep) =
GetExpr::get_expr_from_graph(&self.mutation.expression_id, &self.graph)
.expect("Expr must exist");

if let ExpressionWrapper::Component(component) = &expr {
println!("COMPONENT!");
let instances = dep.find_instances_of(&component.name, &expr_dep.path);
println!("{:#?}", instances);
}

VisitorResult::Continue
}
// check for Instances
fn visit_element(&mut self, _el: &mut Element) -> VisitorResult<()> {
VisitorResult::Continue
}

fn visit_document(&mut self, _doc: &mut Document) -> VisitorResult<()> {
let (expr, _dep) = GetExpr::get_expr_from_graph(&self.mutation.expression_id, &self.graph)
.expect("Expr must exist");

if let ExpressionWrapper::Component(_component) = &expr {}

VisitorResult::Continue
}

Expand Down
2 changes: 1 addition & 1 deletion libs/proto_ext/src/ast_mutate/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4236,7 +4236,7 @@ case! {
)
],
mutation::Inner::MoveExpressionToFile(MoveExpressionToFile {
expression_id: "a".to_string(),
expression_id: "98523c41-3".to_string(),
new_file_path: "/b.pc".to_string()
}).get_outer(),
[(
Expand Down

0 comments on commit 41b25ca

Please sign in to comment.