[ ] Make values of local variables visible to a spreadsheet author for debugging.
[ ] Offer a sync_sheets workflow that skips the translation processes, to speed up the content sync.
Why?
When authoring templates with more complex logic, it is not unusual to have local variables authored over multiple rows (to get the right concatenation) potentially using some @calc statements (e.g. parent_profile in plh_facilitator_my). It is quite annoying to debug this, since, if a collection of such rows "breaks" the app, it can take a number of syncs (yarn workflow sync_sheets followed by yarn start, which takes like ~2min) to narrow down to the problematic row - which is tedious and time consuming. What I currently do is:
if the template does show content: insert a text row below any potentially problematic set_local row to display the value of local variable set in the row above (using @calc(JSON.stringify()) if the variable is json and add some text in case the variable is boolean, since otherwise FALSE won't show), and then resync.
if the template doesn't show anything at all: use the condition column to comment out all potentially problematic rows and start uncommenting them until the template breaks.
How?
I'm happy to go with anything that's feasible technically, here are some ideas:
Showing template rows in debug mode: display also set_local (and, less importantly, set_field / set_global) rows when debug mode is enabled. Probably in the order where the rows appear in the template (so potentially between displayed rows). Probably makes most sense to show current value.
Developer console logging: currently only "set_local" actions from the action list are logged in the console, but potentially also "set_local" and set_field" rows could be logged.
What?
sync_sheets
workflow that skips the translation processes, to speed up the content sync.Why? When authoring templates with more complex logic, it is not unusual to have local variables authored over multiple rows (to get the right concatenation) potentially using some
@calc
statements (e.g. parent_profile in plh_facilitator_my). It is quite annoying to debug this, since, if a collection of such rows "breaks" the app, it can take a number of syncs (yarn workflow sync_sheets
followed byyarn start
, which takes like ~2min) to narrow down to the problematic row - which is tedious and time consuming. What I currently do is:text
row below any potentially problematicset_local
row to display the value of local variable set in the row above (using@calc(JSON.stringify())
if the variable is json and add some text in case the variable is boolean, since otherwise FALSE won't show), and then resync.condition
column to comment out all potentially problematic rows and start uncommenting them until the template breaks.How? I'm happy to go with anything that's feasible technically, here are some ideas:
set_local
(and, less importantly,set_field
/set_global
) rows when debug mode is enabled. Probably in the order where the rows appear in the template (so potentially between displayed rows). Probably makes most sense to show current value.