Migration 0.13 to 0.14



  • Hello, I am using 0.13 for my app, is it possible to update to 0.14 without breaking or just with some simple fixes?



  • It very much depends on what components you were using.
    You’ll have to fix a few imports and adjust your layout syntax. That’s for sure, and it can take between an hour and a few days, depending on how quickly you pickup the new layout and import concepts, and on how large/complex your app was.
    This will help you, please post any question/issue there for support (it will also be the basis of an official upgrade guide later on):
    http://forum.quasar-framework.org/topic/522/upgrade-guide-for-0-14-beta



  • I am sorry for all whom expect a migration via magic button or script able in a couple of hours to do the job or solve it with find and replace, it did not work for me at all.
    I am working in moving a large invoicing web/app from 0.13 to 0.14 and tasks are really tough, 0.14 is great but it changes a lot of ui behaviours … :astonished:
    I know a migration guide is coming but distance is much longer that one digit.
    There is a lot of work behind and in any point apps has to move forward, updated, bug fixed, etc

    A couple of things I found just beginning:

    1. You will not have src in node-modules so for every Quasar element you have to declare and import, for instance it is how things should be done. In some points I had used quasar 0.14 src to go further than current documentation.
    2. Layout has to be adjusted, one should be learn how new layout can be set and make changes. No Drawer. If target app use slots for layouts you have to change some labels and play. 0.14 layout is much easier by far in this release, so one can take this as housekeeping, and simplify code.
    3. Import Utils does not work, so all elements have to be imported individually, specially dom, format functions, etc.
    4. Buttons, changing <button to <q-btn, I am afraid it will not be enough, events can work but style has to be checked, and dynamic use of icons has to be moved to q-icon and use “name” prop for the icon.
    5. Icons and style is another point to consider, it depends on what icon set your app is using (material, fontawesome, etc.)
      In target app main.js Icon set should be imported, load style theme mode (css or styl)
    6. Toolbar, another brick in the wall, in 0.13 is a class div and in 0.14 use <q-toolbar, anycase class and style has to be reviewed.
    7. Some app css styles using classes for toolbar or button will not have effect as html objects classes are renamed with qt, so app stylesheets has to be reviewed. This is a big issue pretty normal by the way with ui updates.
    8. Autocomplete is an example of changes, in 0.13 my app use input inside autocomplete and in 0.14 this is reversed
      Despite I have my own modifications of autocomplete and data-table all elements has to be revised, because usually elements has others elements dependencies, so process will be a long cascade of changes. :fencer:

    So make your space, read carefully current 0.14 doc and then be patient and review 0.13 code, the final results will be worth, but it will take patient and time, I am still in the process.:pray:

    I have to confess that sometimes I thought if it was not better to start the whole UI of the application again. I think it would be helpful to get familiar with 0.14 in a new application and then later try to migrate others. :confused:

    Think that as in life, inevitably to go forward implies to drop some older ways of doing and learn/apply other methods … we are not in a position of judge these changes, only in a point to understand and implemented them for our target application users benefits. :ok_hand:



  • Those are great notes Jesus.

    If your 0.13 app is really complex, starting over might be an easier task. I am not sure. I am sure that 0.14 is a huge swap over to more props for better control of the components, which in the end, means a better UX, both for the dev and in the end, for the user.

    Scott



  • Also, if you initialy created your Quasar application out of the v0.13 quasar-template-default, you may find it helpful to look at the diff of the master branch compared to the beta branch. Keep in mind that only the files that changed in them template folder are relevant.

    I started migrating to v0.14 by reading through each components doc, then I applied all the fixes from the template diff and fixied all the errors that occured during build with the new version.
    Next step I would suggest is to update the layout accordingly to the layout docs. This will help, because now your application doesn’t look totally broken :cold_sweat: .
    After that the tedious part begins, where you have to go through all of your commponents, look at the Quasar components used, and update them accordingly to the docs.

    For me the most notable changes where in the following components:

    • Forms - The form components got a complete overhaul, the no longer use CSS classes, but know are components on their own. The QField component comes in really handy, if you want to dispaly helper messages and achieve consistent styling.
    • Cards - Card are now also implemented as different components
    • Lists - Also items on their own, and increased flexibility, examples come in handy.
    • Grid system - Complete overhaul, very similar to Bootsrap 4 grid

    Most of the time you do not have to change a lot in your code, only in your templates, because the API stayed the same for most components. I would suggest to use the time to refactor your code a bit, because Quasar v0.14 introduced a lot of new helpers / posibilities to clean things up by quite a bit. In the end I even managed to reduce the size of our codebase by quite a bit.
    And even if it is tedious work, in the end it is totally worth it, and I am even excited to refactor existing components to use new stuff that was added in v0.14! :)

    Also you could use the time to report possible issues with the beta, and try to improve the docs, if some things are unclear to you, so Quasar finally can get the attention it deserves. :thumbsup_tone2:



  • Thanks @jesus and @a47ae for details of your migration experience. I guess they’ll be very useful to all “migrants” and for the development of a proper upgrade guide.

    I would also like to apologize to all readers for a slight oversight in my previous post, which may have been misleading.
    A crucial word was missing from my post…

    …it can take between an hour and a few [days]


Log in to reply
 

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