:date: 2017-04-07 ===================== Friday, April 7, 2017 ===================== I created :ticket:`1694` and decided that it is time to write a test case :mod:`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 :attr:`action_name`. - The :meth:`run_from_ui` method of certain actions now pass keyword arguments to :meth:`create_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: - :meth:`lino.core.site.Site.get_dashboard_items` - :attr:`lino.core.userprefs.UserPrefs.dahboard_items` - :xfile:`admin_main_base.html` - :meth:`lino.core.dashboard.ActorItem.render` - :meth:`lino.core.requests.BaseRequest.show` - :meth:`lino_extjs6.extjs6.ext_renderer.Renderer.show_table` I guess that we must define a :meth:`table2story` method on :class:`lino_extjs6.extjs6.ext_renderer.Renderer` which overrides the default implementation in :class:`lino.core.renderer.HtmlRenderer`. Avanti weiter ============= The seemingly innocent with of removing the :attr:`newcomer ` state from their :class:`ClientStates ` (:ticket:`1698`) turned out to be quite a challenge. I even merged the avanti demo project and specs into book (:ticket:`1626`) because . The problem here is that :class:`Coachable ` defined the :attr:`client_state` field with :attr:`newcomer` as default value, and we then removed that default value from our choicelist. The current solution is to use the choicelist's :attr:`default_value ` which has the disadvantage that we must explicitly specify ``default=''`` when using :class:`ClientStates ` as a parameter field. Besides this it had a pitfall (which I now removed): the :attr:`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 :attr:`workflows_module `). A noteworthy stumblestone was a Sphinx warning :message:`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 :ref:`avanti` had the following text in its `long_description`:: Lino Avanti is a free `Lino `_ application ... It must be:: Lino Avanti is a free `Lino `__ application ... Sphinx references ignore uppercase/lowercase, and the difference between ```foo `_`` and ```foo `__`` is that the latter inserts an "anonymous" link while the former also inserts a reference (which is built from the link text).