Comments (8)
The meaning of render-tag-if
is unclear since it could easily just be interpreted to be the same as if
. That is, render-tag-if
doesn't make it clear that only the body will render if the condition evaluates to false
. body-only-if
makes it clear that only the body content will be rendered (not the surrounding tag) if the condition evaluates to true
.
Since body-only-if
will rarely be used, I'm inclined to keep its usage as-is. What do you think?
from marko.
I think you had a good point. The meaning of body-only-if
is more clear than render-tag-if
, because, like you said, the condition is relative to the content in the tag, not to the tag itself.
from marko.
I didn't know about body-only-if
until I saw this issue, but after learning about it I would recommend keeping body-only-if
. For me, the intention is to only render the body (and less about only rendering the tag). Kind of confusing but I think it works :)
from marko.
@pedramphp, I agree with you that body-only-if
feels a little backwards, but I am not seeing a better name. Thank you for the suggestion, but let's stick with body-only-if
unless you have another idea on how this functionality could be provided in a less confusing way.
from marko.
Not really important but "body-only-if" confused me at first since it could be read as "render body, only if condition", instead of "render body only, if condition". May be changing to "only-body-if" could make it clearer...?
from marko.
Good suggestion, only-body-if
seems much clearer to me. I was also confused when I first used this feature.
from marko.
I would add to this that maybe only-body-when
or only-body-if
make sense :)
from marko.
Maybe the current wording comes off a bit strange because it intends to group the words "body only," but "only if" is already a phrase (as in "if and only if").
from marko.
Related Issues (20)
- TypeScript: Passing Attributes to Body Content Will Loose Type HOT 3
- Webpack error on Marko versions greater than 5.31.0 HOT 5
- Deprecation warnings in Chrome HOT 5
- `onInput` is not running when it is used in `component-browser.ts` HOT 1
- Static functions or arrow functions do not work on components without a class statement
- How does routing work? HOT 2
- Marko not properly tracking dependency updates in some situations when using the tags-api
- `Marko is not defined` when index.marko imports module from component.ts
- Cannot break generic parameter declarations into multiple lines HOT 3
- Specify Node Engine Constraint in package.json
- Removing a class attribute results in a "null" class HOT 5
- Out-of-order HTML streaming without JS using Declarative Shadow DOM HOT 15
- Uncaught DOMException on Marko 5.33.14 HOT 15
- Difference in dev/production builds
- `<await>` tag doesn't render correctly with `client-reorder` when inside `<table>` element HOT 3
- Unexpected rename destructed property data to input
- Marko + react
- Marko on Codepen HOT 1
- Marko load: Rank index.marko.js higher over index.js HOT 1
- Branch Coverage that can't be ignored HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from marko.