Fix #116574: Make it easier to jump from one Getting Started section to the next
This commit is contained in:
parent
8806d063fe
commit
8f2e85abd6
2 changed files with 14 additions and 5 deletions
|
@ -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;
|
||||
|
|
|
@ -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")),]
|
||||
: []
|
||||
))
|
||||
)));
|
||||
|
||||
|
|
Loading…
Reference in a new issue