diff --git a/data/core.yaml b/data/core.yaml index c5f526039..de203c006 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -934,6 +934,7 @@ en: choose: "**Choose Playground from the list.**" add_field: "This playground doesn't have an official name, so we won't add anything in the Name field. Instead let's add some additional details about the playground to the Description field. **Open the Add Field list.**" choose_field: "**Choose Description from the list.**" + retry_add_field: "You didn't select the Description field. Let's try again." describe: "**Add a description, then click the {button} button to close the feature editor.**" play: "Good job! Try drawing a few more areas. Explore the presets and see what other kinds of areas you can add to OpenStreetMap. **When you are ready to continue to the next chapter, click '{next}'.**" lines: diff --git a/dist/locales/en.json b/dist/locales/en.json index ecfbf49e9..f01c5334a 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -796,6 +796,7 @@ "choose": "**Choose Playground from the list.**", "add_field": "This playground doesn't have an official name, so we won't add anything in the Name field. Instead let's add some additional details about the playground to the Description field. **Open the Add Field list.**", "choose_field": "**Choose Description from the list.**", + "retry_add_field": "You didn't select the Description field. Let's try again.", "describe": "**Add a description, then click the {button} button to close the feature editor.**", "play": "Good job! Try drawing a few more areas. Explore the presets and see what other kinds of areas you can add to OpenStreetMap. **When you are ready to continue to the next chapter, click '{next}'.**" }, diff --git a/modules/ui/intro/area.js b/modules/ui/intro/area.js index 300ccf614..66ecb1539 100644 --- a/modules/ui/intro/area.js +++ b/modules/ui/intro/area.js @@ -186,7 +186,12 @@ export function uiIntroArea(context, reveal) { d3.select('div.combobox') .on('click.intro', function() { - continueTo(addDescription); + timeout(function() { + if (d3.select('.form-field-description').empty()) + continueTo(retryChooseDescription); + else + continueTo(addDescription); + }, 100); }); function continueTo(nextStep) { @@ -213,6 +218,22 @@ export function uiIntroArea(context, reveal) { } + function retryChooseDescription() { + context.on('exit.intro', function() { + return chapter.restart(); + }); + + reveal('.entity-editor-pane', t('intro.areas.retry_add_field'), { + buttonText: t('intro.ok'), + buttonCallback: function() { continueTo(clickAddField); } + }); + + function continueTo(nextStep) { + nextStep(); + } + } + + function play() { dispatch.call('done'); reveal('.intro-nav-wrap .chapter-line',