:date: 2016-07-01 ==================== Friday, July 1, 2016 ==================== Surf ==== I read the Wikipedia article about `Meteor `_ and read the first page of the `Todo App `_ tutorial. Yes, overwhelming. Is Meteor going to replace Django, and should I stop working on Lino and `become a Meteor partner `_? The answer is probably "no". But it might be inspiring to invest a week of work just for fun into a Meteor project. Ticket :ticket:`1009`. ExtJS 6 ======= Hamza continued on :ticket:`1001` while I was sleeping. He wrote: "I have get page navigation works but records are net refreshing after I change a page." Now I merged `his work `_ into master and continue on my turn. Side effects: - After having meditated about what I wrote yesterday, I now did :ticket:`1010` (see :attr:`lino.core.plugin.Plugin.disables_plugins`). I still didn't set :mod:`lino_extjs6.extjs6` as `default_ui` in :mod:`lino_noi.projects.team.settings.demo` because that would break the tests on Travis or Drone (as long as I don't want to include :mod:`lino_extjs6` as a required package). - The list of countries didn't show, it caused a `ValueError: invalid literal for int() with base 10: 'BE'`. This was because :mod:`lino_xl.lib.stars` called the :func:`gfk2lookup ` to add the :guilabel:`☆`/:guilabel:`★` actions. These actions don't work on countries because their primary key is a CharField (Country is actually the only model with a non-integer primary key). See also :ref:`book.specs.gfks`. My `first commit to lino_extjs6 `_ is just a few theoretic changes. Yes, the paging toolbar now displays the correct number of pages and lets me navigate between them, but the list of rows is always the same. When clicking for page 2, the request URL is: http://127.0.0.1:8000/api/tickets/Tickets?_dc=1467349247151&fmt=json&rp=ext-comp-1159&limit=7&start=0&page=2 In Extjs 3 it was: http://127.0.0.1:8000/api/tickets/Tickets?_dc=1467349311775&start=5&limit=5&fmt=json&rp=ext-comp-1154&pv=&pv=&pv=&pv=&pv=&pv=&pv=&pv=&pv=&pv=&pv=&pv= `page` is obviously a new HTTP parameter generated by the ExtJS paging toolbar. I think that we can ignore it. The problem is that `start` is 0. Why? Did they remove it? No, because `the docs `_ still say that loadPage "Internally this just causes a normal load operation, passing in calculated 'start' and 'limit' params.". The `pageSize` is now on the store, and no longer on the grid panel. The `load` event has changed between `3 `__ and `6 `__. Debugger observation: the `options` object passed to the :meth:`GridStore.load` method is not correct. The `start` and `limit` attributes must be in `options.params`, not at root. options = Object {page: 2, start: 7, limit: 7, addRecords: false} I cannot see any relevant change for the API between `3 `_ and `6 `_. Explanation: ExtJS now expects start and limit to be at the top-level, and it will forward them somehow to the AJAX call later. We did not find the exact place where this happens, but it seems obvious. The following was (AFAICS) an obvious typo bug:: Ext.define('Lino.FormPanel', { extend : 'Ext.form.FormPanel', It must be:: Ext.define('Lino.FormPanel', { extend : 'Ext.form.Panel', (though I didn't investigate why we didn't see this earlier). Another problem is that the parameter panel is not there at all. That's why the ``pv=`` are missing. .. Yes, the old `Ext.PagingToolbar `_ communicated with its `store` using two parameters `start` and `limit` (which corresponded to the SQL clauses OFFSET and LIMIT) while the new `Ext.toolbar.Paging `_ seems to just Note: why did we replace lines like this one:: for (k in p) store.setBaseParam(k,p[k]); by this one? :: for (k in p) store.getProxy().setExtraParam(k,p[k]); Answer: because there is no method :meth:`setBaseParam` any more. Above is my summary of the day, including a shared session with Hamza in the evening.