Giter Club home page Giter Club logo

Comments (5)

leephillips avatar leephillips commented on June 16, 2024

I’m glad you like what I did; it was fun making it. Looks like JavisNB is a new project; I glanced through the source but I would love some documentation soon! Because I want to make more of these.

Making the sliders and widgets was easy because I used PlutoUI.jl, which wraps the HTML inputs in Julia functions, and has a function for making groups of controls; the bound variable becomes a tuple. I really just copied an example from the documentation. An essential ingredient is HypertextLiteral.jl, which allows you to interpolate variables into an HTML object, and does context-aware escaping. The rest is just HTML and CSS.

The only glitch was that Javis, as you know, can’t be installed on a headless server, and the branch that addresses that (JuliaAnimators/Javis.jl#298) is too old. So I just used xvfb, which I’ve used in other projects.

You can get the notebook source at https://lee-phillips.org/plutoNotebooks/epicycles.jl

from javisnb.jl.

TheCedarPrince avatar TheCedarPrince commented on June 16, 2024

Hey @leephillips !
Thanks for the quick reply here!

Yes, JavisNB is a new member of the JuliaAnimators ecosystem mostly overseen by @gpucce !
It's whole purpose is to manage Javis and notebook interaction more easily and to enable more folks to join in to add support specifically for working with notebooks.
The documentation is here and will continue to be improved. :)
Currently, by adding JavisNB into the ecosystem, to use Javis effectively in notebooks, one must also use JavisNB after we release Javis v0.8.0 (we will make sure to include migration notes on how to deal with this if anyone was dependent on Javis + notebooks).
Frankly, if you have any thoughts about using Javis with notebooks, if you are willing, we would love to hear your thoughts!

Thanks for letting me know again about that headless server issue.
I am currently in the process of migrating GTK and other dependencies out of core Javis into a separate viewer package.
By doing that, we will be one step closer to solving that issue.
We are in the process of restructuring Javis in the JuliaAnimators ecosystem so hopefully things will become much more digestible and simpler to work with. :)

I read through the source code - wow!
That was much more straightforward than I was expecting - super impressive!
Any thoughts on it @gpucce ?

from javisnb.jl.

gpucce avatar gpucce commented on June 16, 2024

Hi @TheCedarPrince and @leephillips.

I think since PlutoUI is so well made and easy to use instead of adding widgets it is best to add examples at least for now, similar to the amazing notebook from @leephillips.

Indeed, adding something done with PlutoSliderServer to the documentation could be the next thing to do!

from javisnb.jl.

leephillips avatar leephillips commented on June 16, 2024

My first thought is that this makes sense. Note in particular that my notebook uses only a couple of the ready-made controls from PlutoUI; the layout details are done with HTML/CSS. But this just scratches the surface. Fons’ notebook at https://plutocon2021-demos.netlify.app/fonsp%20%E2%80%94%20javascript%20inside%20pluto shows how you can use JavaScript to do more. He has a video based on the notebook here: https://www.youtube.com/watch?v=SAC_RCjyRRs

After looking at the notes for JavisNB I was wondering what is different with the embed() function, as we can already embed the animation on the page with render(liveview=false).

from javisnb.jl.

gpucce avatar gpucce commented on June 16, 2024

Hi @leephillips the idea is to remove that functionality from Javis itself in its next release. This goes together with other satellite pacakages that will be added to JuliaAnimators to work together with Javis to make the core package lighter. And to add features for specific use cases in these separate packages.

I think the next one could be JavisLiveViewer or smth similar that might resolve the issue of working on headless servers, since right now I think Gtk is the issure there.

For the widgets I know very little html, CSS or javascript myself so it makes sense that I can't really figure out all the things that can be done.

from javisnb.jl.

Related Issues (7)

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.