Code Monkey home page Code Monkey logo

Comments (20)

MangelMaxime avatar MangelMaxime commented on August 25, 2024 2

Ahah that's dark magic :p but at least it is working ^^

from feliz.bulma.

ajwillshire avatar ajwillshire commented on August 25, 2024 2

Well, I think we've all learned something today. If all else fails, turn it off and back on again...

from feliz.bulma.

MangelMaxime avatar MangelMaxime commented on August 25, 2024 1

Ok so that's the good news :p

I will test Feliz.Bulma only then

from feliz.bulma.

Dzoukr avatar Dzoukr commented on August 25, 2024 1

I'd like to say "anytime" but have totally no clue. 😂

from feliz.bulma.

Dzoukr avatar Dzoukr commented on August 25, 2024

Hi @ajwillshire, does it compile correctly in Fable? It's only about rendering?

from feliz.bulma.

ajwillshire avatar ajwillshire commented on August 25, 2024

Yes, it compiles fine.

from feliz.bulma.

Dzoukr avatar Dzoukr commented on August 25, 2024

Strange... I got the same error on page where I use Bulma.Checkradio.checkbox 🤔

from feliz.bulma.

ajwillshire avatar ajwillshire commented on August 25, 2024

Yes, if I comment out the Checkradio buttons, it all works again.

from feliz.bulma.

Dzoukr avatar Dzoukr commented on August 25, 2024

But why? Maybe @MangelMaxime would have a clue.

Official docs are up to date and having no issues there. 🤔

from feliz.bulma.

MangelMaxime avatar MangelMaxime commented on August 25, 2024

This morning I released a new version of Fable.React perhaps this is the culpit.

Can you please check if you are using Fable.React 6.0.0 or 5.3.6 ?

from feliz.bulma.

ajwillshire avatar ajwillshire commented on August 25, 2024

I'm on 5.3.5 at the moment.

from feliz.bulma.

Dzoukr avatar Dzoukr commented on August 25, 2024

Me on 5.3.6 by the paket.lock

from feliz.bulma.

Dzoukr avatar Dzoukr commented on August 25, 2024

I could easily fix that, if would had a clue what is wrong. :)

from feliz.bulma.

MangelMaxime avatar MangelMaxime commented on August 25, 2024

@Dzoukr Could you please provide a reproduction code?

from feliz.bulma.

Dzoukr avatar Dzoukr commented on August 25, 2024

I am trying to repro in official repo with Docs. Also you can try at https://github.com/Dzoukr/Yobo/tree/tabula-rasa, just run client without server and go to Registration page.

from feliz.bulma.

MangelMaxime avatar MangelMaxime commented on August 25, 2024

Ok, because if I add Checkradio.checkbox [ ] to Feliz docs I don't have an error. For my really quick test

from feliz.bulma.

Dzoukr avatar Dzoukr commented on August 25, 2024

I am looking at js file and if I create checkradio manually (using known classes), it renders:

function view(model, dispatch$$2) {
  var xs$$33, xs$$34;
  var children$$9 = Object(_fable_fable_library_2_4_22_List_js__WEBPACK_IMPORTED_MODULE_5__["ofArray"])([(xs$$33 = Object(_fable_fable_library_2_4_22_List_js__WEBPACK_IMPORTED_MODULE_5__["ofArray"])([Object(_fable_Feliz_Bulma_2_1_0_Operators_fs__WEBPACK_IMPORTED_MODULE_9__["op_PlusPlus"])(Object(_fable_Feliz_0_74_2_Interop_fs__WEBPACK_IMPORTED_MODULE_1__["mkAttr"])("className", "is-danger"), Object(_fable_Feliz_0_74_2_Interop_fs__WEBPACK_IMPORTED_MODULE_1__["mkAttr"])("className", "is-checkradio")), Object(_fable_Feliz_0_74_2_Interop_fs__WEBPACK_IMPORTED_MODULE_1__["mkAttr"])("id", "cbx"), Object(_fable_Feliz_0_74_2_Interop_fs__WEBPACK_IMPORTED_MODULE_1__["mkAttr"])("type", "checkbox")]), Object(_fable_Feliz_0_74_2_Interop_fs__WEBPACK_IMPORTED_MODULE_1__["reactElement"])("input", Object(_fable_fable_library_2_4_22_Util_js__WEBPACK_IMPORTED_MODULE_0__["createObj"])(xs$$33, 0))), (xs$$34 = Object(_fable_fable_library_2_4_22_List_js__WEBPACK_IMPORTED_MODULE_5__["ofArray"])([Object(_fable_Feliz_0_74_2_Interop_fs__WEBPACK_IMPORTED_MODULE_1__["mkAttr"])("htmlFor", "cbx"), Object(_fable_Feliz_0_74_2_Interop_fs__WEBPACK_IMPORTED_MODULE_1__["mkAttr"])("children", "Test")]), Object(_fable_Feliz_0_74_2_Interop_fs__WEBPACK_IMPORTED_MODULE_1__["reactElement"])("label", Object(_fable_fable_library_2_4_22_Util_js__WEBPACK_IMPORTED_MODULE_0__["createObj"])(xs$$34, 0)))]);
  return Object(_fable_Feliz_0_74_2_Interop_fs__WEBPACK_IMPORTED_MODULE_1__["reactElement"])("div", {
    children: _fable_Feliz_0_74_2_Interop_fs__WEBPACK_IMPORTED_MODULE_1__["reactApi"].Children.toArray(children$$9)
  });
}

but when I insert Checkradio.checkbox [] it creates just:

function view(model, dispatch$$2) {
  var props$$5 = new _fable_fable_library_2_4_22_Types_js__WEBPACK_IMPORTED_MODULE_6__["List"]();

  var typ = function () {
    throw 1;
  }();

  var xs$$37 = Object(_fable_fable_library_2_4_22_List_js__WEBPACK_IMPORTED_MODULE_5__["ofSeq"])(Object(_fable_fable_library_2_4_22_Seq_js__WEBPACK_IMPORTED_MODULE_2__["delay"])(function () {
    return Object(_fable_fable_library_2_4_22_Seq_js__WEBPACK_IMPORTED_MODULE_2__["append"])(props$$5, Object(_fable_fable_library_2_4_22_Seq_js__WEBPACK_IMPORTED_MODULE_2__["delay"])(function () {
      return Object(_fable_fable_library_2_4_22_Seq_js__WEBPACK_IMPORTED_MODULE_2__["append"])(Object(_fable_fable_library_2_4_22_Seq_js__WEBPACK_IMPORTED_MODULE_2__["singleton"])(typ), Object(_fable_fable_library_2_4_22_Seq_js__WEBPACK_IMPORTED_MODULE_2__["delay"])(function () {
        var x$$5, list2$$5, xs$$35, list$$17, list$$16, list$$15, list1$$5, names$$5;
        return Object(_fable_fable_library_2_4_22_Seq_js__WEBPACK_IMPORTED_MODULE_2__["singleton"])((x$$5 = (list2$$5 = (xs$$35 = props$$5, (list$$17 = (list$$16 = (list$$15 = xs$$35, (Object(_fable_fable_library_2_4_22_List_js__WEBPACK_IMPORTED_MODULE_5__["map"])(function mapping$$10(value$$28) {
          return value$$28;
        }, list$$15))), (Object(_fable_fable_library_2_4_22_List_js__WEBPACK_IMPORTED_MODULE_5__["filter"])(function predicate$$5(tupledArg$$5) {
          var v$$5 = tupledArg$$5[0];
          return v$$5 === "className";
        }, list$$16))), Object(_fable_fable_library_2_4_22_List_js__WEBPACK_IMPORTED_MODULE_5__["map"])(function mapping$$11($arg$$6) {
          var value$$29;
          var tuple$$5 = $arg$$6;
          value$$29 = tuple$$5[1];
          return String(value$$29);
        }, list$$17))), (list1$$5 = new _fable_fable_library_2_4_22_Types_js__WEBPACK_IMPORTED_MODULE_6__["List"]("is-checkradio", new _fable_fable_library_2_4_22_Types_js__WEBPACK_IMPORTED_MODULE_6__["List"]()), Object(_fable_fable_library_2_4_22_List_js__WEBPACK_IMPORTED_MODULE_5__["append"])(list1$$5, list2$$5))), (names$$5 = x$$5, Object(_fable_Feliz_0_74_2_Interop_fs__WEBPACK_IMPORTED_MODULE_1__["mkAttr"])("className", Object(_fable_fable_library_2_4_22_String_js__WEBPACK_IMPORTED_MODULE_7__["join"])(" ", names$$5)))));
      }));
    }));
  }));
  return Object(_fable_Feliz_0_74_2_Interop_fs__WEBPACK_IMPORTED_MODULE_1__["reactElement"])("input", Object(_fable_fable_library_2_4_22_Util_js__WEBPACK_IMPORTED_MODULE_0__["createObj"])(xs$$37, 0));
}

Why the var typ = function () { throw 1; }(); is generated???

from feliz.bulma.

ajwillshire avatar ajwillshire commented on August 25, 2024

I am waaay out of my comfort zone here, but I noticed that there is a reference to "typ" in the following section:

(Object(_fable_fable_library_2_4_22_Seq_js__WEBPACK_IMPORTED_MODULE_2__["singleton"])(typ), Object(

Is that a spelling error or something and it's creating a type automatically to account for it?

from feliz.bulma.

Dzoukr avatar Dzoukr commented on August 25, 2024

Ok, I have no f*** idea why, but I re-published checkradio package and after update, it works. 😄

Please @ajwillshire check if it works for you as well and close issue if ok.

from feliz.bulma.

ajwillshire avatar ajwillshire commented on August 25, 2024

After updating packages, running Femto, etc., it seems to be working now.

Thank you @Dzoukr and @MangelMaxime for your efforts! Much appreciated :-)

from feliz.bulma.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.