Friday, April 7, 2017¶
I created #1694 and decided that it is time to write a test
case test_workflow
. which covers the
ticket and vote workflow.
For this test case I optimized the actions API:
A subclass of Action can now define a hard-coded
action_name
.The
run_from_ui()
method of certain actions now pass keyword arguments tocreate_instance_from_request()
Relevant code changes:
2017-04-07 10:12 in lino: 7612a5e
2017-04-07 10:12 in lino_book: 2f9b430
2017-04-07 10:13 in lino_xl: dc6e3b2
2017-04-07 10:13 in lino_noi: 6c2aeb3
2017-04-07 10:14 in blog: 086b345
Lino application with mobile-friendly interface¶
Joe plans a new Lino project which requires a mobile-friendly interface. He wrote “What I have in mind is probably just changing the skin to look more “modern” and what is more important to have everything bigger - bigger buttons, windows, etc. It is possible to use the same skin as for example this example is using? I was hoping that Lino ExtJS 6 will have this skin by default. In current “old style” everything is too small.”
Hamza already answered correctly that yes you can choose which theme or skin you want to use by setting the theme_name config for your site.
Spontaneously I would add that Joes “only” problem is the dashboard (the main page). This page is indeed built using plain html and does not use the ExtJS widgets, that’s why everything looks so “small”.
I suggest that you explore how Lino builds this page:
lino.core.userprefs.UserPrefs.dahboard_items
lino.core.requests.BaseRequest.show()
lino_extjs6.extjs6.ext_renderer.Renderer.show_table()
I guess that we must define a table2story()
method on
lino_extjs6.extjs6.ext_renderer.Renderer
which overrides the
default implementation in lino.core.renderer.HtmlRenderer
.
Avanti weiter¶
The seemingly innocent with of removing the newcomer
state from
their ClientStates
(#1698)
turned out to be quite a challenge. I even merged the avanti demo
project and specs into book (#1626) because .
The problem here is that Coachable
defined the
client_state
field with newcomer
as default value, and
we then removed that default value from our choicelist. The current
solution is to use the choicelist’s default_value
which has the
disadvantage that we must explicitly specify default=''
when using
ClientStates
as a parameter field. Besides this it had a pitfall (which I now
removed): the default_value
was being evaluated
at the field’s definition time. This was too early because we want to
change them also later (e.g. during workflows_module
).
A noteworthy stumblestone was a Sphinx warning
book/docs/api/index.rst:3: WARNING: Duplicate explicit
target name: "lino"
which surprisingly appeared after merging the
avanti api into the book. This was because Lino Avanti had the
following text in its long_description:
Lino Avanti is a free `Lino <http://www.lino-framework.org/>`_
application ...
It must be:
Lino Avanti is a free `Lino <http://www.lino-framework.org/>`__
application ...
Sphinx references ignore uppercase/lowercase, and the difference
between `foo <bar.html>`_
and `foo <bar.html>`__
is that the
latter inserts an “anonymous” link while the former also inserts a
reference (which is built from the link text).