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

? and ! statements spread across multiple lines #13

Closed
mikeysouthwell opened this issue Feb 2, 2024 · 1 comment
Closed

? and ! statements spread across multiple lines #13

mikeysouthwell opened this issue Feb 2, 2024 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@mikeysouthwell
Copy link

I'm trying to create a MAUI XAML block of code when clicking on a Frame.

So for example I would want the tag to be hidden if the node.type is NOT a frame.

I could put {{?node.type=frame}} before each line, but I also want it to hide all the code inside the code block.

Is there a way span the {{?node.type=frame}} statement across muliple lines to indicate when it starts and finishes?

Current approach:

{{?node.type=frame}}
{{?node.type=frame}}{{?css.height}}HeightRequest="{{css.height}}"
{{?node.type=frame}}

Ideal approach (just one of many examples):

{ {{?node.type=frame}}
{{?css.height}}HeightRequest="{{css.height}}"

}

{{?node.type=frame}}
{{?css.height}}HeightRequest="{{css.height}}"

{{?node.type=frame}}
@jake-figma jake-figma self-assigned this Feb 3, 2024
@jake-figma jake-figma added the question Further information is requested label Feb 3, 2024
@jake-figma
Copy link
Collaborator

See #14 For how I think you should handle this. Essentially, you should hardcode your frame template into your own version of this codebase if youre creating global templates like this and conditionally rendering on node.type.

Point taken though on the idea of blocks for the conditionals. I want to see how long I can go before implementing something that spans lines. One strength of the language is that each line is rendered in complete isolation which makes it a lot simpler to write and process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants