GJS: Node.js Like Runtime for Gnome

(gjs.guide)

44 points | by AbuAssar 2 days ago ago

15 comments

  • wg0 a day ago

    This only wants me to go back to gnome and try/create apps as I see fit. Alternative is using C with Glade designer[0] but I guess this covers almost everything already.

    [0]. https://help.gnome.org/users/glade3/3.8/glade3.html

  • maurice2k a day ago

    Just from the headline, this reminds me of Microsoft Windows in the 1990s that came with it's on interpretation of JavaScript (aka "we have implemented some JavaScript like stuff that seems to work like Netscape but in fact doesn't")

    In general this sounds pretty cool: GJS is built on the SpiderMonkey JavaScript engine. It utilizes GObject Introspection to provide access to the GNOME APIs using ECMAScript 2021 JavaScript.

    Just don't compare it with Node.js; it's something else. No, your code might not run in that environment; APIs are most likely not compatible.

  • grizzles a day ago

    I want to be able to use HTML/JS to design my desktop and call APIs. Can I do that with gjs or is it this GTK namespace and GTK-CSS like language only? It would be really cool to design the background from the Ubuntu crown to a bunch of widgets of information I use daily.

  • MadcapJake 19 hours ago

    I wish the new class format didn't require all that boilerplate. Seems like that could all be determined by the engine, unless I am missing something.

  • a day ago
    [deleted]
  • a day ago
    [deleted]
  • znpy a day ago

    You go to the demo page (https://gjs.guide/showcase/) and look at the audio recorder thing (https://gjs.guide/showcase/gnome-sound-recorder.png) ... why so much wasted blank space?

    • pavlov a day ago

      You can put physical Post-It notes in the empty space, so you know what Recording 1, Recording 2 etc. actually are.

    • c0balt a day ago

      This looks like the UI just scales well to fill an empty screen? In my experience Gnome Apps are always generous with padding however they scale down gracefully with window size.

      • diggan a day ago

        > however they scale down gracefully with window size

        Can confirm. Screenshot of the minimum width, the paddings all disappear: https://i.imgur.com/iv7frHI.png

      • robinsonb5 a day ago

        Really? To my eyes it's a UI that doesn't scale well, and doggedly maintains an aspect ratio that doesn't match the window dimensions.

        I can see some value in not spreading the buttons across a vast horizontal swathe of window - much as one doesn't fill a widescreen monitor with a single column of text - but there's no excuse for the waveform not making full use of the available screen width.

        • jitl 19 hours ago

          I disagree here. For this, a memo application, I think the metadata (date, length, name, etc) is the true content here you’d want to scan, not the actual waveform itself. There’s some content like images that should scale to full bleed just fine, but for something like a table row, as-narrow-as-sensible is better for usability even if there’s a lot of unused horizontal space, because there’s not advantage to making the eye scan across a wider distance.

          The same goes for the width of paragraph text in general. A paragraph stretched to full screen width is much harder to read than a paragraph wrapped at paperback book width. If wide paragraphs were better, books would have a different aspect ratio.

        • thrw42A8N a day ago

          So it'd fill out of the card? So weird. I really don't see an issue with the ui.

          • robinsonb5 a day ago

            It shouldn't spill out of the card - my problem is with the card itself. Or at least, the fact that the card hasn't expanded to make use of the window which contains it.

            But then I'm coming at it from the angle of someone who views VCD files in GtkWave, and thus expects to see as much useful information as possible in a waveform view.

            If it's just superficial decoration then I guess it's fine.

    • aniviacat a day ago

      Because it's pretty