These are chat archives for synrc/n2o

16th
Nov 2016
Sébastien Saint-Sevin
@seb3s
Nov 16 2016 12:20
Hi namdak
there are a lot of stranges things in nitro
for ex : element_panel.erl exists but #panel records are rendered with default rendering
so it is not called
plus i'm missing a few things on panel (so in default render in that case) such as tabindex and role
can I add those to nitro ?
Andy
@m-2k
Nov 16 2016 14:32
data_fields=["tabindex", "4"] or make PR into repo
Sébastien Saint-Sevin
@seb3s
Nov 16 2016 14:35
Yes I know, i'm asking if i can do the modifications. I've got write access to the repo.
and element_panel.erl file should be removed
Namdak Tonpa
@5HT
Nov 16 2016 21:37
we use #panel in n2o-based codebase
it shouldn't break
Sébastien Saint-Sevin
@seb3s
Nov 16 2016 21:38
Hi namdak
I propose to add missing tabindex and role to default rendered tags
and to remove element_panel.erl because it is not used (panel records are rendered by default)
so It should not break anything
Namdak Tonpa
@5HT
Nov 16 2016 21:40
by element_div ?
yes you can change everything as you have master access )
Sébastien Saint-Sevin
@seb3s
Nov 16 2016 21:41
it is render by default_render(Tag, Record) in wf_render_elements.erl
Namdak Tonpa
@5HT
Nov 16 2016 21:42
ah ok
Andy
@m-2k
Nov 16 2016 21:42
он хочет panel потереть?
Sébastien Saint-Sevin
@seb3s
Nov 16 2016 21:43
the element_panel file is probably an old one migrated from legacy nitrogen i think
so If not used, It should be deleted
@m-2k english is prefered :-)
I don't speak russian, sorry for that
Namdak Tonpa
@5HT
Nov 16 2016 21:45
yes you can remove but check twice )
Andy
@m-2k
Nov 16 2016 21:46
panel must be converted to any other but not removed
use setelemet for rename tuple tag
Namdak Tonpa
@5HT
Nov 16 2016 21:47
if it is rendered by default_render than it is wasted anyway
Andy
@m-2k
Nov 16 2016 21:47
proxy all funs from element_panel to any
Namdak Tonpa
@5HT
Nov 16 2016 21:48
let me check
Andy
@m-2k
Nov 16 2016 21:48
do what you want
@5HT what is html.js in new version?
for why
Namdak Tonpa
@5HT
Nov 16 2016 21:48
this is for cgi
I suppose
Sébastien Saint-Sevin
@seb3s
Nov 16 2016 21:49
in nitro.hrl
-record(panel, ?DEFAULT_BASE_TAG(<<"div">>)).
-define(DEFAULT_BASE_TAG(Tag), {?ELEMENT_BASE(undefined,Tag,undefined)}).
Namdak Tonpa
@5HT
Nov 16 2016 21:49
yeah, panel is rudimentary
Sébastien Saint-Sevin
@seb3s
Nov 16 2016 21:50
so Module is undefined which means rendering is by default
Namdak Tonpa
@5HT
Nov 16 2016 21:50
it is too small to be real )
Sébastien Saint-Sevin
@seb3s
Nov 16 2016 23:53
A new question :
what is the best way to validate user input into forms ?
is there a preferred library to use for that that integrates well with n2o model ?
legacy nitrogen has #validate records. Is there such a thing within n2o ?