Giter Club home page Giter Club logo

cobweb.jl's People

Contributors

joshday avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cobweb.jl's Issues

HTMX addition

I want to integrate HTMX closely with Cobweb.jl.

I will do this anyway for my own needs - in one way or another - but I think it can be nice to have this in a public repo so other Julia users can benefit from it.

HTMX can already be used with Cobweb.jl (it is just a matter of adding attributes). However, I would like to add some dedicated types and functions to make the process smoother.

Would you consider a PR (given I don't touch the already implemented functionality)?

Or should I do it as a standalone extension wrapping the Cobweb.jl?

More about HTMX here: https://htmx.org/docs/

Failed to precompile on 1.6

I was trying to test a package that depends on Cobweb (through PlotlyLight) and I seem to get an error on precompilation on Julia 1.6 (ubuntu).

Here is the error:

ERROR: The following 1 direct dependency failed to precompile:

Cobweb [ec354790-cf28-43e8-bb59-b484409b7bad]

Failed to precompile Cobweb [ec354790-cf28-43e8-bb59-b484409b7bad] to /home/amengali/.julia/compiled/v1.6/Cobweb/jl_AJQdNs.
ERROR: LoadError: UndefVarError: Pairs not defined
Stacktrace:
 [1] getproperty(x::Module, f::Symbol)
   @ Base ./Base.jl:26
 [2] top-level scope
   @ ~/.julia/packages/Cobweb/3Q4pp/src/Cobweb.jl:47
 [3] include
   @ ./Base.jl:384 [inlined]
 [4] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
   @ Base ./loading.jl:1235
 [5] top-level scope
   @ none:1
 [6] eval
   @ ./boot.jl:360 [inlined]
 [7] eval(x::Expr)
   @ Base.MainInclude ./client.jl:446
 [8] top-level scope
   @ none:1
in expression starting at /home/amengali/.julia/packages/Cobweb/3Q4pp/src/Cobweb.jl:1

(jl_1NOzag) pkg> st
      Status `/tmp/jl_1NOzag/Project.toml`
  [ec354790] Cobweb v0.5.1

It should be because in 1.6 Base.Pairs was not defined. Probably it would be safer to use Base.Iterators.Pairs as that seems defined also in 1.6

attributes of `Node` are not callable

I am not able to reference the field of a Node. So using the example

using Cobweb: h, Page

page = h.html(
    h.head(
        h.meta(charset="UTF-8"),
        h.meta(name="viewport", content="width=device-width, initial-scale=1.0"),
        h.title("Page Title")
    ),
    h.body(
        h.h1("This is my page title."),
        h.p("This is a paragraph."),
        h.button("Click Me for an alert!", onclick="buttonClicked()"),
        Cobweb.Javascript("const buttonClicked = () => alert('This button was clicked!')"),
    )
)

I cannot for example perform

julia> for c in page.children
       println(c)
       end
ERROR: KeyError: key "children" not found
Stacktrace:
 [1] getindex
   @ ./dict.jl:484 [inlined]
 [2] getproperty(node::Cobweb.Node, name::Symbol)
   @ Cobweb ~/.julia/packages/Cobweb/29HXS/src/Cobweb.jl:51
 [3] top-level scope
   @ ./REPL[115]:1

However the following code works

julia> for c in getfield(page, :children)
       println(c)
       end
<head><meta charset="UTF-8"></meta><meta name="viewport" content="width=device-width, initial-scale=1.0"></meta><title>Page Title</title></head>
<body><h1>This is my page title.</h1><p>This is a paragraph.</p><button onclick="buttonClicked()">Click Me for an alert!</button><script>const buttonClicked = () => alert('This button was clicked!')</script></body>

CSS next?

Hyperscript.jl makes styles available one way. CSSUtil.jl, which is older and unattended afaik, does it another way. Cobweb should do it in whatever way is consonant with your approach to making JavaScript/TypeScript available. Just to make the project easier overall, following a pervasive logic.

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.