colouring-cities / colouring-britain

Developed out of the Colouring London prototype. Collecting data on Britain's buildings and testing new core features
https://colouringbritain.org/
GNU General Public License v3.0
10 stars 2 forks source link

New Feature: Multiple numerical fields (Date of Significant Extensions) #367

Open mdsimpson42 opened 1 month ago

mdsimpson42 commented 1 month ago

Age & History -> Cladding, extensions and retrofits Date of significant extensions - add multiple? (Created separate issue)

The issue with updating the "Date of significant extensions" is that we currently don't have an interface element for entering multiple numerical values. We only do it with text strings.

I could create a new multi entry class for numbers, but I've had a quick look it's not a trivial task to convert the text one to handle numbers. If I change the field to text, then we have the problem of how to validate the values being typed in (and we're back to the issue of users entering free text).

Alternatively, we could change it to "Date of most significant extension", so it matches the "Date of last significant retrofit" field and then look into adding multiple dates in a future task.


Polly: Go ahead with this, can you connect a source to each plus?

Again, we don't do this anywhere already. We only have the ability to add multiple values, not a source for each one.


I had a quick look at copying the multi-data-entry object and modifying it to work with numbers, but that doesn't seem to be a quick fix. Implementing all this (especially if we have to include a source for each element) will be a lot of work, hence why I have spun this off as a separate issue from #362

mdsimpson42 commented 1 month ago

@matkoniecz Polly said you had some thoughts on this? I was thinking of basically copying the "MultiDataEntry" code ( building/data-components/multi-data-entry.txt) and changing it to handle numerical values, but I started working on it and couldn't work out what some of the code did. I think I can do it, but it might take a while.

That seems to be the easiest way to allow us to add multiple years to the retrofits field.

But @polly64 also asked if we could have fields that have multiple entries WITH a separate source for each entry. I don't think we're doing anything similar to that at the moment? (Now that I come to write that down, wasn't Germany working on a similar feature at one point?)