Skip to content

Commit

Permalink
remove center panel component
Browse files Browse the repository at this point in the history
  • Loading branch information
crcn committed Nov 27, 2023
1 parent ebbdc71 commit 8176892
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 29 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
.cargo
**/node_modules

35 changes: 35 additions & 0 deletions .github/workflows/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM ubuntu:22.04

# Update default packages
RUN apt-get update

# Get Ubuntu packages
RUN apt-get install -y build-essential curl wget musl-tools unzip clang

# Update new packages
RUN apt-get update

RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"



RUN mkdir -p /tmp/protoc && cd /tmp/protoc
RUN wget -qO- https://github.com/protocolbuffers/protobuf/releases/download/v25.1/protoc-25.1-linux-x86_64.zip -O temp.zip
RUN unzip temp.zip
RUN unzip -o temp.zip -d "/usr"
RUN chmod 755 /usr/bin/protoc


COPY . /app
WORKDIR /app

ENV TARGET=x86_64-unknown-linux-musl
ENV RUSTFLAGS='-C linker=clang -C link-arg=-fuse-ld=lld -C link-arg=-lpthread -C link-arg=-lm'
# ENV TARGET_CC=x86_64-linux-musl-gcc


RUN rustup target add ${TARGET}
RUN cargo build --release --locked --target ${TARGET}

CMD echo "hello"
33 changes: 11 additions & 22 deletions libs/designer/src/ui/editor.pc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public component SplashInfo {
top: 60px
}
}
div commands {
div commandsContainer {
style {
display: flex
flex-direction: column
Expand Down Expand Up @@ -105,21 +105,6 @@ public component SplashInfo {
}
}

/**
* @bounds(x: 1209, y: -99, width: 886, height: 213)
*/
public component CenterPanels {
render div {
style {
display: flex
flex: 1
flex-direction: column
justify-content: space-between
}
toolbar.Toolbar
}
}

/**
* @bounds(x: 6874, y: 1592, width: 345, height: 71)
*/
Expand Down Expand Up @@ -198,11 +183,7 @@ public component Editor {
Canvas
}
if showSplash {
SplashInfo {
insert commands {
slot commands
}
}
SplashInfo splash
}
div editorPanels {
style {
Expand All @@ -219,7 +200,15 @@ public component Editor {
}
leftSidebar.LeftSidebar leftSidebar
if showCanvas {
CenterPanels
render div centerPanels {
style {
display: flex
flex: 1
flex-direction: column
justify-content: space-between
}
toolbar.Toolbar
}
module.SidebarContainer {
rightSidebar.RightSidebar rightPanel
}
Expand Down
4 changes: 2 additions & 2 deletions libs/designer/src/ui/logic/Editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const Editor = (Base: React.FC<styles.BaseEditorProps>) => () => {
return (
<>
<ResourceModal />
<Base leftSidebarProps={{}} rightPanelProps={{}} showCanvas={currentFile != null} showSplash={currentFile == null} commands={
<Base leftSidebarProps={{}} rightPanelProps={{}} showCanvas={currentFile != null} showSplash={currentFile == null} splashProps={{commands:
<>
{shortcuts
.filter((shortcut) =>
Expand All @@ -41,7 +41,7 @@ export const Editor = (Base: React.FC<styles.BaseEditorProps>) => () => {
/>
))}
</>
} />
}} />
</>


Expand Down
11 changes: 6 additions & 5 deletions libs/evaluator/src/html/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -695,19 +695,20 @@ add_case! {
}

// add_case! {
// previews_are_also_used_in_instances,
// previews_can_define_a_collection_of_values,
// [
// ("/entry.pc", r#"

// /**
// * @preview(showTest: true, nested: (showSomethingElse: true))
// * @preview(items: [(value: 1), (value: 2)])
// */
// component A {
// render div root {
// if showTest {
// text "blarg"
// repeat items {
// div {
// slot value
// }
// }
// B nested
// }
// }
// A
Expand Down
1 change: 1 addition & 0 deletions libs/parser/src/docco/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ fn parse_property_value(
match context.curr_token {
Some(Token::String(_)) => Ok(ast::property_value::Inner::Str(parse_string(context)?)),
Some(Token::ParenOpen) => Ok(ast::property_value::Inner::Parameters(parse_parameters(context)?)),
// Some(Token::BracketOpen) => Ok(ast::property_value::Inner::Parameters(parse_parameters(context)?)),
Some(Token::Number(_)) => Ok(ast::property_value::Inner::Num(parse_number(context)?)),
Some(Token::Boolean(_)) => Ok(ast::property_value::Inner::Bool(parse_boolean(context)?)),
_ => Err(context.new_unexpected_token_error()),
Expand Down
4 changes: 4 additions & 0 deletions libs/parser/src/docco/tokenizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ pub enum Token<'src> {
Word(&'src [u8]),
ParenOpen,
ParenClose,
BracketOpen,
BracketClose,
Boolean(bool),
Colon,
Comma,
Expand All @@ -36,6 +38,8 @@ pub fn next_token<'src>(
b'@' => Token::At,
b'(' => Token::ParenOpen,
b')' => Token::ParenClose,
b'[' => Token::BracketOpen,
b']' => Token::BracketClose,
b':' => Token::Colon,
b',' => Token::Comma,
b'-' => {
Expand Down

0 comments on commit 8176892

Please sign in to comment.