#5552 (Get Actor.default_record_id to work under React frontend)
50 · by Luc Saffre · in Developers · assigned to Sharif Mehedi
Résumé
Concepts sous-jacents
Commentaires
- 2 ans, 6 mois ago by Sharif Mehedi about #5552 (Get Actor.default_record_id to work under React frontend) (1 reply) : Let's talk about it tomorrow morning.
- 2 ans, 6 mois ago by Luc Saffre about #5552 (Get Actor.default_record_id to work under React frontend) : I raised priority to remind you about this. I am quite convinced that the default_record_id should never figure in any URL because it is a property of the actor that the user cannot change.
- 2 ans, 6 mois ago by Luc Saffre about #5552 (Get Actor.default_record_id to work under React frontend) : Several doctests (docs/specs/noi/invoicing.rst, docs/specs/households.rst, ...) are currently failing because you now pass default_record_id in the URL. This seems wrong, we don't need default_record_id to be so variable.
- 2 ans, 6 mois ago by Luc Saffre about #5552 (Get Actor.default_record_id to work under React frontend) : I looked at the code and thought: can't you store the actor's default_record_id in actorData and then say in lino_react/react/components/LinoComponents.jsx:
@@ -510,8 +510,7 @@ const LinoComponents = { : <Child actorData={context.controller.static.actorData} inDetail={true}/... - 2 ans, 6 mois ago by Luc Saffre about #5552 (Get Actor.default_record_id to work under React frontend) : NB @8lurry please pull react because I made a one-line code change "trivial theoretical bugfix".
- 2 ans, 6 mois ago by Luc Saffre about #5552 (Get Actor.default_record_id to work under React frontend) : Oh! Now I realized that the current implementation works only when the default_record_id is either "myself" or "row"! That's not good.
- 2 ans, 6 mois ago by Luc Saffre about #5552 (Get Actor.default_record_id to work under React frontend) : Great! Yes, it works for My settings.
- 2 ans, 6 mois ago by Sharif Mehedi about #5552 (Get Actor.default_record_id to work under React frontend) : I think react is now good to work with the default_record_id feature. It works good with at least users.Me.
- 2 ans, 6 mois ago by Sharif Mehedi about #5552 (Get Actor.default_record_id to work under React frontend) : pm prep on noi1e raises the following exception from Appy:
... Loading data from /home/blurry/lino/env/repositories/xl/lino_xl/lib/excerpts/fixtures/demo2.py appy.pod render /home/blurry/lino/env/repositories/xl/lino_xl/lib/contacts/config/contacts/Person/TermsConditions.odt -> /home/blurry/lino/env... - 2 ans, 6 mois ago by Sharif Mehedi about #5552 (Get Actor.default_record_id to work under React frontend) (2 replies) : In "users.Me.default_record_id = 'myself'", the keyword 'myself' should be a constant, since it has a special meaning on it's own.
- 2 ans, 6 mois ago by Luc Saffre about #5552 (Get Actor.default_record_id to work under React frontend) : Hint: search for "default_record_id" in linoweb.js and in *,py.
- 2 ans, 6 mois ago by Luc Saffre about #5552 (Get Actor.default_record_id to work under React frontend) : For example the [My settings] quicklink. Currently we work around the problem by saying (in lino.modlib.users):
def get_quicklinks(self): if self.site.default_ui == "lino_react.react": yield "users.Me.my_settings" else: yield "users.Me"
I would like users.Me t... - 2 ans, 6 mois ago by Luc Saffre about #5552 (Get Actor.default_record_id to work under React frontend) : Created new Ticket #5552 (Get Actor.default_record_id to work under React frontend).