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 #1009.
ExtJS 6¶
Hamza continued on #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 #1010 (see
lino.core.plugin.Plugin.disables_plugins
).I still didn’t set
lino_extjs6.extjs6
as default_ui inlino_noi.projects.team.settings.demo
because that would break the tests on Travis or Drone (as long as I don’t want to includelino_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
lino_xl.lib.stars
called thegfk2lookup
to add the ☆/★ 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 gfks : Utilites for Generic Foreign Keys.
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:
In Extjs 3 it was:
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
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.
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 setBaseParam()
any more.
Above is my summary of the day, including a shared session with Hamza in the evening.