Meteor!


  • Admin

    @mwarren2 I’ll try to make some time next week to investigate together. Is this ok for you?



  • @rstoenescu Thankyou, that’s great.

    Meanwhile I will try to find out what’s happening in the build script.



  • @rstoenescu Ok, I’ve found the problem, and it’s more or less as I thought.

    I’m missing a /dist folder which the script is looking for, in fact it’s specifically looking for dist/quasar.common.js. The /dist folder was there in 0.8.2, but it’s missing in my 0.9.0 installation, I just have a /src folder.

    This should be easy to fix, I guess. Is there anything wrong with the way I tried to install quasar this time?


  • Admin

    @mwarren2 hi. You’ve installed Quasar from github and no dist folder is stored there. Now that v0.9.1 is out you can install it from npm, which will have that folder. Cheers.



  • @rstoenescu Ok, got beyond the initial hurdle! Still got a white screen though.

    Now I’ve got
    TypeError: FastClick.attach is not a function. (In ‘FastClick.attach(document.body)’, ‘FastClick.attach’ is undefined)

    I’m looking into it



  • @mwarren2 Ok, here’s what I know - using Safari’s debugger for my IPhone:

    This is the code where the error occurs:

    if (Platform.has.touch) { // 6413
    FastClick.attach(document.body); // 6414
    }

    FastClick.attach at this point is undefined.
    Whereas the FastClick variable is actually pointing to FastClick.attach

    Reading the FastClick docs, you get FastClick or FastClick.attach depending on how you instantiate it, as I am sure you know.

    Does this give you any clue?
    Meteor is all es6 these days, if that’s any help.

    P.S. I see that you fixed the drawer problem, which is great.



  • @rstoenescu I guess Meteor is proving to be a bit complicated, right?


  • Admin

    @mwarren2 hi, can’t work on it at the moment. Busy with data table component. Sorry.



  • @rstoenescu Oh ok, no problem.



  • @rstoenescu For when you get a moment:

    I may have got somewhere with this problem. (Unfortunately however it’s revealed another one!)
    Meteor is presumably considered a common.js environment and it’s calling dist/quasar.common.js

    quasar.common.js is failing at line 6413 where we have this code:

    if (Platform.has.touch) {
        FastClick.attach(document.body);
    }
    

    From the FastClick docs:
    If you’re using Browserify or another CommonJS-style module system, the FastClick.attach function will be returned when you call require(‘fastclick’). As a result, the easiest way to use FastClick with these loaders is as follows:

    var attachFastClick = require('fastclick');
    attachFastClick(document.body);
    

    So presumably, and just in the quasar.common.js code, we can do something similar:

    if (Platform.has.touch) {
        //FastClick.attach(document.body);
        var attachFastClick = FastClick;
        attachFastClick(document.body);
    }
    

    So far, so good.
    However unfortunately document.body is null here, just like in our first problem.


  • Admin

    Untested, but in order to ensure document.body is available, try this:

    var Utils = require('../utils)
    
    if (Platform.has.touch) {
       Utils.dom.ready(function () {
          var attachFastClick = FastClick;
          attachFastClick(document.body);
      })
    }
    


  • @rstoenescu It’s working… I have a result on an IPhone, which is great!
    There was no need for the require(‘utils’) line. A Utils variable was available.

    There were two places where a null document.body was causing errors and where I’ve added your code.

    Line 1220:

    function install$2(_Vue) {
       Utils.dom.ready(function () {
          var node = document.createElement('div');
          document.body.appendChild(node);
          toast = new _Vue(Toast$1).$mount(node);
      })
    }
    

    and Line 6413, which is the one we were talking about before

    if (Platform.has.touch) {
       Utils.dom.ready(function () {
          var attachFastClick = FastClick;
          attachFastClick(document.body);
      })
    }
    

  • Admin

    @mwarren2 ok, great. Will make a patch for Quasar tomorrow regarding this. Thanks for the feedback!



  • @rstoenescu Great thanks!

    Now that it’s working with Meteor, if there are other issues not actually regarding just Meteor (there’s one on IPhone in this app), would you prefer I open an issue, or carry on on this page?


  • Admin

    @mwarren2 currently carry on here until I’ll have time to fully focus on meteor. Thx for your help!



  • @rstoenescu Ok, here’s the little problem I’ve encountered:

    Everything works fine on Android, but not on IOS on my IPhone 5.
    On IOS I’m having problems with touch actions. For example the q-tabs in this code don’t respond properly. The background of the tab goes grey when you touch it but then nothing happens.
    If you hold your finger down long enough for IOS to open one of its little black menus, then touching one of the other q-tabs will work.

        <!-- Navigation Tabs -->
        <q-tabs slot="navigation">
            <q-tab icon="mail" route="/" exact>Mails</q-tab>
            <q-tab icon="alarm" route="/clockalarm" exact>Alarms</q-tab>
            <q-tab icon="help" route="/help" exact>Help</q-tab>
        </q-tabs>
    

    The same for the menu icons that open the right- and left- drawers.

            <!-- opens left-side drawer using its ref -->
            <button class="hide-on-drawer-visible" @click="$refs.leftDrawer.open()">
                <i>menu</i>
            </button>
    

    However these q-drawer-links in the drawer work fine:

            <div class="list no-border platform-delimiter">
                <q-drawer-link icon="mail" to="/" exact>
                    Mails
                </q-drawer-link>
                <q-drawer-link icon="alarm" to="/clockalarm" exact>
                    Alarm
                </q-drawer-link>
                <q-drawer-link icon="help" to="/help" exact>
                    Help
                </q-drawer-link>
            </div>

  • Admin

    @mwarren2 Known issue https://github.com/quasarframework/quasar/issues/187
    Safari iOS sux. It’s the new IE in web development. Will get this fixed soon.



  • @rstoenescu Ok, looks like a nasty problem.
    Reading around it seems Safari sux big time…



  • @rstoenescu Did you manage to do the patch?

    P.S. Looking forward trying to the DataTables component, looks good!


  • Admin

    @mwarren2 no, a week or so until I get to work on this.


Log in to reply
 

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.