Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Adrian Salceanu
@essenciary
we can set it to 128 or larger
dvasya
@dvasya

well I didn't create any tables manually so it has to have been Genie.newresource's migrations

and here I was just saying, it does seem that somehow I was able to create a table with just VARCHAR (no size) as type - as evidenced by the contents of SQLite.jl's (probably mistaken) warning

which contradicts your statement that

because it's a syntax error if you don't pass a limit

I'm confused by this apparent contradiction! :)

Adrian Salceanu
@essenciary
the pragma query shows that the varchar column has a limit of 100 doesn't it?
I suspect that the issue is actually caused by the space in VARCHAR (100) which trips sqlite.jl
but that's what comes out of sqlite itself
but also I see that column does not have a default limit either
image.png
my guess is that sqlite.jl is tripped by the VARCHAR (100) which comes from the actual definition of the table
Shum
@Shum88
I try Watchtonight, everything works fine ... Once I quit VSCode, and get back later again for development, I do not know ... How to get back previous status (" running with Julia terminal') and continue coding ???
Shum
@Shum88

I try Watchtonight, everything works fine ... Once I quit VSCode, and get back later again for development, I do not know ... How to get back previous status (" running with Julia terminal') and continue coding ???

Ok... solved ... go to /Watchtonight/bin then exec. ./repl.bat then within julia> up()

Noah from ProvocaTeach
@ProvocaTeach
Hi, I noticed there were some old docs in Genie for an asset pipeline. Can someone share with me what is the best directory in the default project to store my assets (CSS, JS libraries, etc.)?
3 replies
Noah from ProvocaTeach
@ProvocaTeach
Also, unrelated, but I get bizarre error messages whenever I include the lang and xml:lang attributes in the <html> tags of my .jl.html files.
4 replies
Noah from ProvocaTeach
@ProvocaTeach

Hi, it's me again. When I use the html rendering function, I seem to end up with either just some text that says "nothing", or all my body content in the <head>.

Here's a minimal example:

My handler function

# app/resources/pages/PagesController.jl
module PagesController
using Genie.Renderer.Html

function display_page()
  html(:pages, :view1, layout = :polyglot)
end
end

My layout file

<!-- app/layouts/polyglot.jl.html -->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
  <meta charset="utf-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1"/>

  <title>Concise and Descriptive Headline</title>
  <meta name="description" content="In less than 140 characters:
    what is on this page, and how does it differ from other pages?"/>
</head>

<body>
  <%
    yield
  %>
</body>
</html>

My view file

<!-- app/resources/pages/view1.jl.html -->
<h1>Concise and Descriptive Headline</h1>

<section>
  <h2>Topic 1</h2>

  <p>Introduce topic 1 with some prose.</p>
</section>

Browser output (cleaned up)

<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Concise and Descriptive Headline</title>
    <meta name="description" content="In less than 140 characters:
    what is on this page, and how does it differ from other pages?" />
</head>

<body>nothing</body>

</html>
Pipsy100
@Pipsy100
I have a question, I want to run Genie on Linux and Apache2. I am looking for documentation for the .conf file to run Genie as a web service. I see a lot from Nginx but not from Apache2
Ifihanagbara Olusheye
@Ifihan
Hi, I'm new to this community and I just want to start learning about Genie.
I have a question. What is the structure of the genieapp after it's being created?
Adrian Salceanu
@essenciary
@Ifihan there are a few ways to bootstrap/generate apps: basic/default which includes the minimum needed files, db support (which is specific for SearchLight.jl) and mvc. But also, starting from a basic app the db and mvc components can be added later, as needed.
and here are some docs (though I could use a few updates here and there)
I hope this helps
if you have more specific questions lmk
Yakir Luc Gagnon
@yakir12

What does v_model="name" do? Like if I have a form:

StippleUI.form([
  textfield("Your name *", :name, type = "name", "filled", v_model="name", hint="Name and surname", :lazy_rules, rules="[ val => val && val.length > 0 || 'Please type something']")
...
])

and why should/shouldn't use it? How exactly should I use it?

30 replies
Yakir Luc Gagnon
@yakir12
Also, can I specify the rules with julia-code somehow?
Yakir Luc Gagnon
@yakir12

So this is for a MVVM with Stipple and quasar. There must be a simple way to use regex to test for a valid email address etc? Right now I'm using:

rules="[ val => val && val.length > 0 || 'Please type something', val => val.includes('@') || 'must be valid email address' ]")

But I'd like to use something more robust like the regex checks detailed here: https://stackoverflow.com/questions/46155/how-to-validate-an-email-address-in-javascript

M. Schulze
@mkschulze
did you find the time to edit the recent stipple video session already @essenciary ? Or can we get hold of it unedited somehow? :D
Adrian Salceanu
@essenciary
beware that it's a bit long though :)
M. Schulze
@mkschulze
that's ok, the inbetween context might also help me
thanks!
Yakir Luc Gagnon
@yakir12

As I see it, there are 3 types of events when a user fills an input field:

  1. each character they type is an event,
  2. when they move on to interact with some other object (when the field loses focus),
  3. and when they press e.g. Submitexplicitly submitting the content of that input field (indeed of that whole page).

I want to connect a validation function to event # 2. When a user fills in a field, with event # 1 it's annoying for them to get multiple warning messages on each key press (at least until the validation passes), and with event # 3 it's also annoying for them to press Submitonly to find out that they messed up that one single field. Option # 2 seems ideal: they fill in the field in peace, and they get a warning the moment they leave that field (in case they messed up).

Any way to make that happen?

Adrian Salceanu
@essenciary
@yakir12 actually the best user experience would be #1 - you can have a cross (x) or a check box when the input is valid and you update that on the fly, as the user types. Additionally, under the input, you could show the explanation of the error so the user can fix it. A much better experience than focusing on the next input to get errors on the previous one
but, to answer you question, losing focus triggers an event called blur
so you can bind the input to a value and attache an onblur event which triggers the validation
this is achieved via the @on Stipple macro which is documented
the example in the documentation is pretty helpful
input("", @bind(:input), @on("keyup.enter", "process = true"))
here the event is pressing the <ENTER> key on the keyboard
you'd have to put blur instead of keyup.enter
and basically what that does is it updates an input field in the model with the value of the input, and on blur it changes a process value. You can listen to changes on process (or you can call it validate) to trigger validation of the form
so on blur of each field you trigger the validation - on the server side you validate the fields and set validate to false again
Yakir Luc Gagnon
@yakir12
Awesome! Thanks.
Adrian Salceanu
@essenciary
you're welcome
in time maybe we can make things easier for common operations, like validations
Yakir Luc Gagnon
@yakir12
@essenciary in case you are interested but don't get those pings (and if you do, I apologize), I PR a new example in the stipple demo repo for a registration page (implementing a couple of the things discussed here).
1 reply
bww00
@bww00
Thanks for the work. Is there an update on stipple with regard to oracle db access and genie with saml or ad authenication . Regards
5 replies
Adrian Salceanu
@essenciary
@JulianChastain (sorry, I accidentally deleted your question and there seems to be no way to undo that šŸ˜“) so re Genie + NPM - what exactly do you want to do? I did something related a few years ago when I setup an asset pipeline with Genie (with Yarn and Webpack). You can setup NPM in the app's folder, no problems. You can also use Julia's excellent ability to run commands to interact with npm via shell. And there's also a cool package (https://github.com/davidanthoff/NodeJS.jl) which allows you to configure your own node instance to manage dependencies.
please let me know if you make progress with this, I'm also interested as I will want to reintroduce an asset pipeline into Genie