This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-17
Channels
- # alda (5)
- # bangalore-clj (1)
- # beginners (9)
- # bigdata (1)
- # boot (51)
- # carry (1)
- # cider (9)
- # cljs-dev (22)
- # clojars (39)
- # clojure (118)
- # clojure-brasil (1)
- # clojure-czech (8)
- # clojure-france (2)
- # clojure-italy (5)
- # clojure-korea (9)
- # clojure-russia (9)
- # clojure-spec (17)
- # clojure-uk (42)
- # clojurescript (48)
- # core-async (1)
- # emacs (3)
- # figwheel (1)
- # funcool (3)
- # hoplon (39)
- # klipse (51)
- # lein-figwheel (4)
- # leiningen (2)
- # luminus (5)
- # off-topic (245)
- # om (18)
- # onyx (19)
- # parinfer (1)
- # pedestal (18)
- # re-frame (47)
- # reagent (19)
- # ring-swagger (1)
- # specter (18)
- # untangled (93)
- # vim (8)
- # yada (56)
i've seen some mention of hoplon alpha17 but cant see it on https://clojars.org/hoplon. was it just a theoretical release? 🙂
hoplon/ui
objects, frames, images, and videos may be either sized implicitly by the value of their content, or set via the :fit
attribute to :fill
, :cover
, or :contain
. they all accept child elems that will appear in front of their content and are laid out just like any other element. any hoplon/ui
elem can now accept children.
@jumblerg thanks!
this new fitting attr looks great.
the :cover
option just centers the original image?
@onetom: build from master
To get alpha 17
@jumblerg new UI stuff looks great, I'll start trying it out in the morning! Btw i think I found a small bug: a really long "word"/string with no whitespace will break layout
(elem :s (r 1 1)
(elem :sh (r 1 4)
:br 1 :bc :black
(apply str (repeat 100 "test")))
(elem :sh (r 3 4)))
seems to be fixable with
(bind-in! e [elems/mid .-style .-wordBreak]
"break-all")
on the element, though I'm not 100% sure the best spot to put this in the library. I could try to come up with a PR tomorrow or open an issue if you wanti was originally going to suggest that you not create 400 letter words. 🙂 but i guess there’s a case here we should support, which is some sort of :word-break
attribute, with :normal
, :break
, and :keep
values, maybe add it to the font middleware.
cool, that'll be helpful. Yeah the 400 letter words are not something i usually enjoy haha but I was just kinda "stress testing" something which displays user input.
I tried word-wrap and a few other newly discovered css properties, but i think word-break was the one that worked alone? But I'll put some time into understanding the properties and browser support, etc before submitting anything
of course you can just have user code impose restrictions on the string size that is displayed, but peeking around at some facebook souce code i saw they they seem leave full, big word string without breaking layout, so i thought it might be good to have the option in ui 🙂
yeah, i’m sure there will be a case from time to time where someone will want to display all of pi or something.
So I started with this: https://github.com/hoplon/hoplon/wiki/Attribute-Providers but is needs to be merged with this: https://github.com/hoplon/hoplon/wiki/HTML-attributes-and-JS-events-%28on%21%2C-do%21%29
is there a way to get the index.html
file generated by hoplon from my index.cljs.hl
file to have an absolute path instead of relative path for the script tag? Right now it generates a file with this tag:
<script type="text/javascript" src="index.html.js”>
and I want this:
<script type="text/javascript" src=“/index.html.js”>
@adamfrey: what are you using to host the HTML file that the path fails?
in development mode I have a ring handler that serves index.html for all "/some-page" requests
So do you have multiple HTML pages to serve?
@adamfrey another alternative is a little task you could write to do the string replace on that file
@adamfrey: Have you looked at pushy at all? https://github.com/kibu-australia/pushy Not sure it would help here, but maybe there's some ideas in how it works that you could use. Example of it in use at https://pupeno.com/2015/08/26/no-hashes-bidirectional-routing-in-re-frame-with-bidi-and-pushy/
Yes I’m already using pushy, that handles the push state stuff. Alan’s suggestion of a small boot task that runs after the hoplon task works fine for me
Oh good, glad you found something that worked.