From 8f2e85abd608b45f97c698a854b7c52db017c71c Mon Sep 17 00:00:00 2001 From: Jackson Kearl Date: Thu, 18 Feb 2021 16:07:23 -0800 Subject: [PATCH] Fix #116574: Make it easier to jump from one Getting Started section to the next --- .../gettingStarted/browser/gettingStarted.css | 4 +++- .../gettingStarted/browser/gettingStarted.ts | 15 +++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStarted.css b/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStarted.css index 11e9673c13c..2da3abd0934 100644 --- a/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStarted.css +++ b/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStarted.css @@ -178,7 +178,9 @@ display: none; } - +.monaco-workbench .part.editor > .content .gettingStartedContainer .gettingStartedSlide.detail .getting-started-task .task-description-container { + width: 100%; +} .monaco-workbench .part.editor > .content .gettingStartedContainer .gettingStartedSlide.detail .getting-started-task .task-description { padding-top: 8px; diff --git a/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStarted.ts b/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStarted.ts index 9982c636fc5..acc65fad7c8 100644 --- a/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStarted.ts +++ b/src/vs/workbench/contrib/welcome/gettingStarted/browser/gettingStarted.ts @@ -435,6 +435,13 @@ export class GettingStartedPage extends EditorPane { private buildCategorySlide(categoryID: string, selectedItem?: string) { const category = this.gettingStartedCategories.find(category => category.id === categoryID); + let foundNext = false; + const nextCategory = this.gettingStartedCategories.find(category => { + if (foundNext && category.content.type === 'items') { return true; } + if (category.id === categoryID) { foundNext = true; } + return false; + }); + if (!category) { throw Error('could not find category with ID ' + categoryID); } if (category.content.type !== 'items') { throw Error('category with ID ' + categoryID + ' is not of items type'); } @@ -473,10 +480,10 @@ export class GettingStartedPage extends EditorPane { : []), ...( arr[i + 1] - ? [ - $('button.task-next', - { 'x-dispatch': 'selectTask:' + arr[i + 1].id }, localize('next', "Next")), - ] : [] + ? [$('button.task-next', { 'x-dispatch': 'selectTask:' + arr[i + 1].id }, localize('next', "Next")),] + : nextCategory + ? [$('button.task-next', { 'x-dispatch': 'selectCategory:' + nextCategory.id }, localize('nextPage', "Next Page")),] + : [] )) ))); -- GitLab