Studio: usability tests

This commit is contained in:
Pieter Vander Vennet 2023-10-20 19:04:55 +02:00
parent 0f60977b6d
commit 2041a9245d
37 changed files with 524 additions and 446 deletions

View file

@ -25,6 +25,9 @@
let initialLayerConfig: { id: string };
let newLayerId = new UIEventSource<string>("");
/**
* Also used in the input field as 'feedback', hence not a mappedStore as it must be writable
*/
let layerIdFeedback = new UIEventSource<string>(undefined);
newLayerId.addCallbackD(layerId => {
if (layerId === "") {
@ -45,15 +48,21 @@
}
async function createNewLayer() {
if(layerIdFeedback.data !== undefined){
console.warn("There is still some feedback - not starting to create a new layer")
return
}
state = "loading";
const id = newLayerId.data;
const createdBy = osmConnection.userDetails.data.name;
try {
const loaded = await studio.fetchLayer(id);
initialLayerConfig = loaded ?? {
id, credits: createdBy,
minzoom: 15,
pointRendering: [
{
location: ["point", "centroid"],