Skip to content

Commit a6c740f

Browse files
authored
Added missing tooltips and fixed button styling. (#1564)
1 parent f66b272 commit a6c740f

File tree

7 files changed

+37
-31
lines changed

7 files changed

+37
-31
lines changed

src/components/content/content.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<div class="flex flex-column fit">
22
<div class="flex-item flex-item-grow">
3-
<button class="btn" data-bind="click: publish">
3+
<button class="btn btn-default" data-bind="click: publish">
44
<i class="paperbits-icon paperbits-send"></i>
55
Publish website
66
</button>
77
</div>
88
<div class="flex-item">
9-
<button class="btn" data-bind="click: reset">
9+
<button class="btn btn-default" data-bind="click: reset">
1010
<i class="paperbits-icon paperbits-simple-remove"></i>
1111
Reset content
1212
</button>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { IInjectorModule, IInjector } from "@paperbits/common/injection";
22
import { ContentWorkshop } from "./content";
3-
import { ContentWorkshopSection } from "./contentSection";
3+
import { OperationsSectionToolButton } from "./operationsSection";
44
import { ResetDetailsWorkshop } from "./resetDetails";
55

66
export class ContentModule implements IInjectorModule {
77
public register(injector: IInjector): void {
88
injector.bind("contentWorkshop", ContentWorkshop);
99
injector.bind("resetDetailsWorkshop", ResetDetailsWorkshop);
10-
injector.bindToCollection("workshopSections", ContentWorkshopSection);
10+
injector.bindToCollection("workshopSections", OperationsSectionToolButton);
1111
}
12-
}
12+
}

src/components/content/contentSection.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/components/content/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export * from "./content.module";
2-
export * from "./contentSection";
2+
export * from "./operationsSection";
33
export * from "./content";
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { ToolButton, ViewManager, View } from "@paperbits/common/ui";
2+
3+
const helpText = "<h1>Operations</h1><p>Publish your portal to make the latest version available to visitors.</p><p>Reset content to roll back to portal's default state.</p>";
4+
5+
export class OperationsSectionToolButton implements ToolButton {
6+
public readonly iconClass: string = "paperbits-icon paperbits-send";
7+
public readonly title: string = "Operations";
8+
public readonly tooltip: string = helpText;
9+
10+
constructor(private readonly viewManager: ViewManager) { }
11+
12+
public onActivate(): void {
13+
this.viewManager.clearJourney();
14+
15+
const view: View = {
16+
heading: this.title,
17+
helpText: helpText,
18+
component: { name: "content-workshop" }
19+
};
20+
21+
this.viewManager.openViewAsWorkshop(view);
22+
}
23+
}

src/components/help/help.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { IInjectorModule, IInjector } from "@paperbits/common/injection";
2-
import { HelpWorkshop, HelpDetailsWorkshop, HelpWorkshopSection } from ".";
2+
import { HelpWorkshop, HelpDetailsWorkshop, HelpSectionToolButton } from ".";
33

44
export class HelpModule implements IInjectorModule {
55
public register(injector: IInjector): void {
66
injector.bind("helpWorkshop", HelpWorkshop);
77
injector.bind("helpDetailsWorkshop", HelpDetailsWorkshop);
8-
injector.bindToCollection("workshopSections", HelpWorkshopSection);
8+
injector.bindToCollection("workshopSections", HelpSectionToolButton);
99
}
1010
}

src/components/help/helpSection.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import { ToolButton, ViewManager, View } from "@paperbits/common/ui";
22

3-
export class HelpWorkshopSection implements ToolButton {
4-
public iconClass: string = "paperbits-icon paperbits-c-question";
5-
public title: string = "Help";
3+
const helpText = "<h1>Help</h1><p>Get help with configuring the developer portal.</p>";
4+
5+
export class HelpSectionToolButton implements ToolButton {
6+
public readonly iconClass: string = "paperbits-icon paperbits-c-question";
7+
public readonly title: string = "Help";
8+
public readonly tooltip: string = helpText;
69

710
constructor(private readonly viewManager: ViewManager) { }
811

0 commit comments

Comments
 (0)