Open SLornieCYC opened 3 years ago
This is a really important spot. I was able to replicate it in a fresh browser; I guess the files hang around in the cache.
I completely agree that for both peace of mind & ease of use, it should at the very least be clear when the tool's fully loaded and the internet can be switched off. I love the idea of a status flag, though it's probably above my JS knowledge at the moment - I'll talk to Kaj about getting that into the tool.
Bit of a guess, but there's a chance this was a deliberate choice to reduce bandwidth usage at least until a permanent hosting solution is decided on, so I'll check with Kaj what he thinks on this, but I reckon in the end just having them load as soon as the page loads would make most sense. Twenty-something megabytes probably isn't worth complicating usability over these days.
The tool header says:
"This tool will not send data to any third party. It uses the browser as an application to locate files in your computer and run scripts on them to identify errors. Once the browser is loaded, you can locate the files and run the validation offline." (emphasis mine)
However at the moment the tool does not retrieve postcode data on first-load, but only when Validate is clicked for the first time (I assume this is session-based in the browser?). This means you cannot load the tool and then switch immediately to offline working (i.e. to ensure data security etc) but instead have to load the tool, click Validate and let the postcodes load, and only then switch to offline working.
You can click Validate without providing any files and this will load the postcode data before returning a no-uploaded-files error, but that feels like a bit of a workaround and it would be better if this were handled properly. My suggestion would be to have a separate button for "load postcode data" (maybe to the right of collection year/LA dropdowns?) with a status flag alongside it so that a user could choose to execute that separately before entering offline mode and providing data. If they don't execute separately the existing functionality could continue as normal (it already checks if postcode data exists).
The relevant line of code:
https://github.com/SocialFinanceDigitalLabs/quality-lac-data-beta/blob/bb4e6b97343d11c415e4b81b39c7be3b59f3cbec/src/components/Dashboard.tsx#L51