This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-24
Channels
- # beginners (61)
- # boot (1)
- # cider (55)
- # cljs-dev (17)
- # cljsrn (1)
- # clojure (31)
- # clojure-india (5)
- # clojure-spec (9)
- # clojure-uk (42)
- # cursive (3)
- # datomic (29)
- # editors (3)
- # fulcro (23)
- # hoplon (2)
- # lumo (12)
- # off-topic (8)
- # pedestal (6)
- # re-frame (3)
- # reagent (8)
- # reitit (23)
- # shadow-cljs (82)
- # specter (14)
- # tools-deps (8)
hello friends, I am not sure if it’s the right channel but anyway
> do you have any idea how can I simulate different device viewport with fulcro
(local css) & devcard
If someone does that I would be glad to read from you 🙂
Has anyone written about using Fulcro with Datomic Ions? I feel like there should be nothing special in composing them (which is awesome) but having not gone to production with either, its only theoretical guess.
You're right, it seems wonderfully straightforward in concept; but I'm curious as to others thoughts as well.
@baptiste-from-paris I don't know of a way built-in to Fulcro, but I'm just learning so maybe there's a way. Is chrome's "device mode" not adequate? That's what I'm using to test responsive layouts in my Fulcro app
I was more thinking of a devcard SPA where you can simulate device width all at once but with your computer screen (while working) without reseting everything
oh i see, that would be nice. seems like it would be hard to make sure it was "simulating" correctly without having the browser involved somehow
fwiw, using device mode i am able to change the simulated viewport size without resetting my app
yes i know, but I had in mind a view with all the viewport size for a given UX component
I have to work on this
it should be faisable
@baptiste-from-paris I use an iframe (React lets you render into one without loading the js into the iframe itself)
This is a macro I wrote for wrapping bootstrap examples in the book: https://github.com/fulcrologic/fulcro/blob/develop/src/book/book/bootstrap/helpers.cljs
I use it all the time, actually. Works really well, except for a somewhat limited use-case: If you use an external js lib that tries to use the js/document (for things like events to close full-screen modals) then things don’t always work right…but for pure Fulcro stuff it works very well.
The iframe thing is just a rendering artifact for the most part, so other than the event thing it is just a rendering container that obeys the size you give it, isolates CSS, and can have more than one on a page.
Here’s an example use of that macro from the fulcro bootstrap docs: https://github.com/fulcrologic/fulcro/blob/develop/src/book/book/bootstrap/alerts.cljs
If you were to drop that component in a defcard-fulcro
, it would behave as a free-standing, CSS separated, fully-functional app.
@tony.kay thanks a lot for your time and this great response
I thought about iframe but did not want to go that way ^^
I am going to rgtry