Fork me on GitHub
#hoplon
<
2015-12-16
>
flyboarder06:12:36

I threw that together, please have a read through and help improve simple_smile

micha06:12:50

looks awesome so far

micha06:12:34

are you able to hook them up to cells and stuff?

micha06:12:43

via "props" or attributes?

flyboarder06:12:52

yes sir! but there are bugs because of jquery

flyboarder06:12:13

i have had to do some creative formula cells

micha06:12:21

what kimd of bugs?

flyboarder06:12:44

attributes are sent through a process in jquery which normalizes them, this nolonger applies as attributes have arbitrary names and developers can use existing attribute names

micha06:12:05

ah the lowercasing situation

flyboarder06:12:43

example: select will always resolve to either selected or selected=“selected"

flyboarder06:12:12

Polymer uses this internally to select child elements to pull from shadow dom

flyboarder06:12:27

so i came up with this….

flyboarder06:12:47

use goog.dom to set the attribute on hash change

micha06:12:18

i didn't know jquery did that

micha06:12:23

that's kind of a problem

micha06:12:45

you can however use the do! multimethod here

flyboarder06:12:56

yeah there are a few other bugs but my solutions keeps being to drop jquery, i understand why you are using it tho

micha06:12:36

you can implement a do! method for :selected that will eliminate jquery

flyboarder06:12:39

yeah i think that is also caused by the same normalization that happens

flyboarder06:12:06

my problem is that i’d rather not override core framework stuff

micha06:12:18

so you can do (paper/drawer :selected true) or whatever

micha06:12:35

the do! multimethod is there for that purpose

micha06:12:54

so you can extend the basic stuff that hoplon provides

micha06:12:08

make attributes mean whatever you want them to mean

flyboarder06:12:25

i looked a bit into multimethods but maybe im misunderstanding how the overriding goes, should my index page contain the override? can I package that up in the silicone lib so it’s only there for Polymer stuff?

micha06:12:34

yeah totally

micha06:12:52

what i'd do is probably make a hoplon polymer lib

micha06:12:58

that wraps the polymer things

flyboarder06:12:06

thats what I have now

micha06:12:11

you can put the do! definitions in there

micha06:12:20

when you :require the namespace they are installed

flyboarder06:12:32

ah ok so I can put that in core then

micha06:12:36

ah i get the name now simple_smile

flyboarder06:12:49

😛 haha yeah i like plays on words XD

micha06:12:50

yep, core is fine

micha06:12:08

this is pretty cool stuff

flyboarder06:12:45

here ill take the demo out of maintenance

micha06:12:13

man this is sweet, thanks for making the wiki page

micha06:12:34

much simpler to get going than i thought

flyboarder06:12:40

yeah for sure, iv been meaning to get to it, im having a lot of fun over here with the two libs together

micha06:12:50

i mean with your library that is

micha06:12:29

does that install the polyfills too?

flyboarder06:12:20

yeah but it’s via polymer

micha06:12:52

oh right, polymer is webcomponents+polyfills right?

flyboarder06:12:05

sorta kinda lol

flyboarder06:12:21

polyfills is now entirely in webcomponents

flyboarder06:12:32

so polymer is just polymer

micha06:12:39

are you using the shadowdom polyfill?

micha06:12:14

i'm interested to know how much it affects performance

micha06:12:35

i've heard it's heavy, but people always overstate perf issues

micha06:12:49

so i'm skeptical of the claims that it's slow

flyboarder07:12:24

there is a bit of a delay for sure but I dont think the issue is real

flyboarder07:12:25

like the perf issue of it being slow, if you are building an app on this technology you are targeting it for latest browsers so the polyfills become less of an issue

micha07:12:07

only chrome though

micha07:12:34

but yeah i'm not afraid of a polyfill

micha07:12:47

like they say in carpentry

micha07:12:52

"shim without shame"

flyboarder07:12:41

hahah yeah perf issues usually mean more than a problem in the app, why are you running a browser so old? Is your new app really gonna be run on those?

micha07:12:59

lol right

micha07:12:44

and what's slow today will be fast 6 months from now

micha07:12:03

we want to compute in the future not the past

micha07:12:29

my webpage needs to run fast on a pdp-11

micha07:12:33

make it happen

micha07:12:07

unacceptable, this teletype can't render my app at 60fps

flyboarder07:12:59

yeah it’s kinda a non issue, and mozilla not implementing imports right now is a wait for it kinda thing

micha07:12:25

i have thought about implementing defelem in terms of web components

micha07:12:32

have hoplon generate them

flyboarder07:12:32

i was looking at doing a fork of hoplon and implementing a bit of lucuma there

flyboarder07:12:51

but im not sure how that all would work because of async issues in polymer

micha07:12:19

hoplon provides a similar abstraction

flyboarder07:12:19

basically we need to load the polymer library before anything else otherwise the javascript engine will halt and do nothing

flyboarder07:12:58

there are drawbacks to not be able create additional polymer elements the polymer way, such as styling requiring the classname versions instead of the mixins working

flyboarder07:12:43

that is running an old build but you can see polymer and hoplon in action

flyboarder07:12:15

@micha: click all the things!

flyboarder07:12:57

the first load takes a bit

levitanong07:12:51

First-hand user of polymer here. Used it back when it was late beta. Abandoned it in favor of react because performance 😞 Hopefully, latest polymer performs better now.

micha07:12:52

it's denying the app access to localstorage

flyboarder07:12:07

@levitanong: I dont have much complaints with 1.0 expecially if you use the latest component versions

flyboarder07:12:25

@micha: thats new, havnt seen that before

micha07:12:58

things are sliding around though!

flyboarder07:12:11

haha is the login appearing?

micha07:12:12

drawers drawering

micha07:12:21

looks great

flyboarder07:12:30

lol the build on my laptop is more complete

micha07:12:37

the polymer paper things are pretty slick

micha07:12:54

they look nice

flyboarder07:12:01

yeah that was a requirement of this app, we need to build it without hiring a designer

flyboarder07:12:29

so we picked a ui library and polymer recently hit 1.0 so its aligned up perfectly for us

flyboarder07:12:55

it handles ui bits for us so I can build the actual app

micha07:12:04

yeah that's critical

flyboarder07:12:59

I started with using material css lib and just raw hoplon but that was causing development to be slow because I needed to actually build all the complex ui elements, and things like modals are not implemented yet, getting polymer to work with hoplon has been great!!! fantastic work on both ends

flyboarder07:12:49

thats a wrap for my evening, talk to you guys tomorrow 🍻

micha07:12:28

thanks for sharing all this stuff!

micha07:12:38

i want to make a polymer app now too

flyboarder07:12:11

hahaha 😛 well I dont have the full lib implemented in silicone yet so feel free 😛

jethroksy08:12:29

is there somewhere I can go to better understand how castra works?

alandipert19:12:43

@jethroksy: @nonrecursive has a PR out on it with some docs - https://github.com/hoplon/castra/pull/14/files. you can also ask any questions here 😄

jethroksy19:12:35

@alandipert: great! a pity the javelin walkthrough didn't come through... I'm on the other side of the earth so I couldn't make it

symbit21:12:09

Going from BOOT_VERSION=2.4.2 to 2.5.0 broke the hoplon auto reload code.

symbit21:12:30

2.5.0 -> java.util.concurrent.ExecutionException: java.nio.file.AccessDeniedException: target\index.html.out\hoplon\app_pages\indexDOT_html.js

symbit21:12:16

boot.filesystem/copy! filesystem.clj: 51 boot.filesystem/patch! filesystem.clj: 82 ... boot.core/fileset-syncer/fn/iter/fn/fn/fn core.clj: 782 clojure.core/binding-conveyor-fn/fn core.clj: 1916

symbit21:12:47

Small detail: This is on Windows 7 Professional.

symbit21:12:39

Works with Boot 2.4.2 and [pandeiro/boot-http "0.7.0"] as the serve function

micha23:12:57

@symbit: can you repro this with the basic hoplon template?

micha23:12:21

or alternatively do you have a repo that demonstrates the problem?