question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how can I get something like '<div :class="hidden"></div>' ?

See original GitHub issue

How do I code from Stipple.Html.div() to get something like <div :class="hidden"></div> ?

Thanks

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
essenciarycommented, Oct 11, 2021

The thinking here has evolved quite a bit. I haven’t seen a need to support other frontend frameworks. Frankly, most of the users don’t care how stuff works, just just care that it works well and makes them productive.

But what came up frequently was the need to unify and make the API consistent. That is, one API which is consistent across all the elements. At this point we have 2 pairs of inconsistencies:

a) Stipple/StippleUI elements and Genie.Html elements having slightly different implementations (eg the annoying requirement to put an empty string as the value of Stipple inputs), Stipple/StippleUI elements not supporting array arguments for children, etc.

b) Julia/backend API vs Vue/JS/frontend APIs - I still find that a lot of Vue and JS knowledge is required for non trivial things. I would like to remove more of the need for JS code by extending the Stipple APIs and consolidate them. Ex: we have for_each to iterate in Julia and v-for to iterate in Vue.

API consolidation thus is high on the todo list now, with the objective to have one Stipple API which would include both Genie and JS features.

@AbhimanyuAryan has joined our team and we’ll work together on this. Maybe we could have a call in a couple of weeks to discuss the API design?

1reaction
hhaenselcommented, Oct 14, 2021

Yes, let’s have a call on this. I’d like to make a proposal which would be breaking but perhaps very convienient and I’d like to hear your opinion (@essenciary , @AbhimanyuAryan, BTW welcome to the Stipple team!) The syntax could be that everything that is an array goes between the brackets, anything else is a parameter.

function hh(args...; kwargs...)
    idx = collect((x -> isa(x, AbstractArray)).(args))
    xelem_pure(:hh, join(join.(args[idx])), args[.!idx]...; kwargs...)
end

which would allow for the following usage

julia> hh(@bind(:text), @click(:me), "hello", [7 8 9 10 11 12], ac = "dc", :me, :too, [" cell ", 2, " row ", 3], :visible, its = "you", [2.7])
"<hh its=\"you\" ac=\"dc\" v-model='text' v-on:click='me = true' hello me too visible>\n789101112 cell 2 row 32.7\n</hh>\n"
Read more comments on GitHub >

github_iconTop Results From Across the Web

How do you create a hidden div that doesn't create a line ...
So what you do is put a <div id="theID" style="display: none;"> where the details should go. Then, when the user clicks the triangle,...
Read more >
HTML div hidden Attribute - Dofactory
The hidden attribute hides the <div> element. You can specify either 'hidden' (without value) or 'hidden="hidden"'. Both are valid. A hidden <div> ...
Read more >
Hide and show a div - Alex Cican
Hide and show a div with CSS ... The first method, involves using only CSS. We will use the CSS pseudo-class :hover ....
Read more >
Hide or show elements in HTML using display property
The style display property is used to hide and show the content of HTML DOM by accessing the DOM element using JavaScript/jQuery.
Read more >
How to Hide and Show a <div> - W3docs
How to Hide and Show a <div> ; type · "hidden" ; name · "loc" ; value · "en_US" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found