Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 10:57
  • Jan 30 22:22
    bitpirate starred japgolly/scalajs-react
  • Jan 30 08:11

    japgolly on master

    Update docs for changes in 1.4.0 (compare)

  • Jan 28 08:08
    booleguo starred japgolly/scalajs-react
  • Jan 28 04:09

    japgolly on v1.4.0

    (compare)

  • Jan 28 04:05

    japgolly on master

    Towards v1.4.1 (compare)

  • Jan 28 04:04

    japgolly on master

    Prepare for v1.4.0 Upgrade React to 16.6.3 React.lazy and 85 more (compare)

  • Jan 28 04:04
    japgolly closed #521
  • Jan 28 04:04
    japgolly opened #521
  • Jan 28 04:03

    japgolly on v1.4.x

    Add note about Reusability/Reus… doc formatting Prepare to release v1.4.0 (compare)

  • Jan 28 04:02
    wiitht starred japgolly/scalajs-react
  • Jan 28 03:18

    japgolly on v1.4.x

    Test AsyncCallback.init Update Travis CI caching (compare)

  • Jan 28 03:02

    japgolly on v1.4.x

    Update Travis CI cache dirs Revise changelog (compare)

  • Jan 28 03:00
    japgolly labeled #520
  • Jan 28 03:00
    japgolly labeled #519
  • Jan 27 17:36
  • Jan 26 06:49
    japgolly commented #520
  • Jan 26 05:55
    japgolly commented #519
  • Jan 26 02:35
    cquiroz opened #520
nafg
@nafg
@jhegedus42 yes it's just a shorthand DSL for adding class names, that's all it is.
The way css-dsl works is that in the sbt build it loads the .css file (e.g. bootstrap's), parses all the class names out of it, and generates extension methods for each one.
You can either do it as an extension method of a VdomTag, or using the C singleton. The former is more useful for components, the latter for conditional classes
e.g. C.active.when(item == selectedItem)
(.when is an extension method on TagMod provided by scalajs-react)
jhegedus42
@jhegedus42
@nafg it's bootstrap
4
if that is what you were asking
jhegedus42
@jhegedus42
it's nice and simple
and i also like @nafg 's css-dsl it is kinda nice and simple too
what i cannot comprehend after one microsecond is if the two are some "related" / "compatible" ?
the facade is written by a plugin ... afai understand
OTH your code is dead simple too @littlenag
which is good news, coz i can extend it
and learn from it
jhegedus42
@jhegedus42
i mean, does it make sense to somehow make the two compatible ? @nafg 's css-dsl and @littleag 's scalajs-react-bootstrap ?
for now i stick with @nafg 's css-dsl and see how i can get by using "static" stuff
no jumbotron , etc ...
no jquery ... etc
jhegedus42
@jhegedus42
just plain css
simple is good
and css-dsl makes bootstrap (or for that matter afai understand) any css lib into a typesafe wrapped scalajs sweetness
but if the two were somehow "synergically" combined - if that even makes sense - that is what i am asking
is possible / meaningful to use the two simultaniously in the same project ?
or is it an exclusive or (XOR) ?
either css-dsl or scalajs-react-bootstrap... but not both simultaniously ? is that the case ? XOR ?
can they go hand in hand ? would that make sense to even ask such a question ?
jhegedus42
@jhegedus42
i like css-dsl for static things
but some sort of navbar thing.... with css-dsl is not immediately obvious for a "css newbie" like me
jhegedus42
@jhegedus42
@nafg I am almost there, at nirvana, with css-dsl :) but I cannot figure out one thing :
that is something which is not possible with the current approach (or at least I could not find anything like this)
I guess I should make some custom attributes ?
        <.button.btn(
          C.navbarToggler, ^.`type` := "button",
      // TODO :
      //data-toggle="collapse"        <<<< === I need to put this here in by hand.
      //data-target="#navbarCollapse" <<<< === I need to put this her in by hand.

          ^.aria.controls := "navbarCollapse",
          ^.aria.expanded := "false",
          ^.aria.label :="toggle navigation",
          <.span(C.navbarTogglerIcon)
        ),
for data-toggle="collapse"
and for data-target="#navbarCollapse"
is that the "recommended way to go ?
somehow css-dsl does not have data-toggle "attributes"
but maybe they are somehow custom and related to the jquery story, maybe that is the reason
anyway, I try now to find some way to make custom attributes in scalajs-react :)
and let's how that works
but if there is a way to do this in the "official way" then please let me know
jhegedus42
@jhegedus42
ok, that worked,
so css-dsl seems to be pretty nicely working with bootstrap
thanks again @nafg , i think i reached bootstrap nirvana
Artsiom Miklushou
@mikla

Hi,
Did anybody try react-profiling? https://gist.github.com/bvaughn/25e6233aeb1b4f0cdb8d8366e54a3977

For me it show that it's not supported

Profiling support requires either a development or production-profiling build of React v16.5+.