Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Data list override does not work #1261

Closed
esmeetewinkel opened this issue Mar 1, 2022 · 2 comments
Closed

[BUG] Data list override does not work #1261

esmeetewinkel opened this issue Mar 1, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@esmeetewinkel
Copy link
Collaborator

Describe the bug
For specifying the languages that should appear on the language select page for each deployment, it should be possible to override the sheet language_data_list.

I've tried this for TZ and ZA here: language_data_list_tz and language_data_list_za, but this does not seem to work.

App version
v0.14.2

@esmeetewinkel esmeetewinkel added the bug Something isn't working label Mar 1, 2022
@esmeetewinkel esmeetewinkel changed the title [FEATURE] Data list override does not work [BUG] Data list override does not work Mar 1, 2022
@chrismclarke
Copy link
Member

chrismclarke commented Mar 3, 2022

I've just taken a look, and I can see what the issue is. Unfortunately this is a case where we are trying to use the overrides system for something that it just isn't really built for. The overrides are integrated into the templating system, and so only apply to templates.

Short term this leaves a few possible options:

  1. Keep the 3 data lists (with different names instead of overrides) and add a condition column to the language_select template to populate depending on deployment. Something like this:

image

  1. Keep the 3 data lists and provide a set of template overrides that change the data list (instead of the condition column - although involves creating a larger number of templates so possibly less worthwhile)

Longer term ideally we want a system where anything can be overwritten at runtime, however it will only make sense to implement once we have a single system that handles loading data (otherwise it means a lot of copy-paste for templates, data lists, and any other flow type). This is part of what is proposed with other issues related to integrating json instead of ts files

Additionally, because these datalists are statically defined we could also integrate a system that replaces files during compile so that only the relevant datalist ever makes it into the app. This would be quite easy to do once we've integrated pr #1210

@esmeetewinkel
Copy link
Collaborator Author

Thanks Chris, I've opted for your suggestion 2 and created issues #1266 (long term) and #1267 (bug fix) on the back of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants