|
1 | 1 | import {LitElement, css, html, nothing} from 'lit';
|
2 |
| -import {getFieldValueFromFeature, hasFieldValue, isDefinedValue, renderHTMLIf} from './utils'; |
| 2 | +import {getFieldValueFromFeature, hasFieldValue, isDefinedValue} from './utils'; |
3 | 3 | import {openAddStageDialog} from './chromedash-add-stage-dialog';
|
4 | 4 | import {
|
5 | 5 | openPrereqsDialog,
|
@@ -184,6 +184,17 @@ class ChromedashFeatureDetail extends LitElement {
|
184 | 184 | border: var(--spot-card-border);
|
185 | 185 | box-shadow: var(--spot-card-box-shadow);
|
186 | 186 | }
|
| 187 | +
|
| 188 | + #new-stage { |
| 189 | + margin-left: 8px; |
| 190 | + margin-bottom: 4px; |
| 191 | + } |
| 192 | +
|
| 193 | + #footnote { |
| 194 | + margin-left: 8px; |
| 195 | + margin-bottom: 4px; |
| 196 | + margin-top: 4px; |
| 197 | + } |
187 | 198 | `];
|
188 | 199 | }
|
189 | 200 |
|
@@ -632,6 +643,19 @@ class ChromedashFeatureDetail extends LitElement {
|
632 | 643 | stageGates.length < 6);
|
633 | 644 | }
|
634 | 645 |
|
| 646 | + renderFootnote() { |
| 647 | + return html` |
| 648 | + <section id="footnote"> |
| 649 | + Please see the |
| 650 | + <a href="https://www.chromium.org/blink/launching-features" |
| 651 | + target="_blank" rel="noopener"> |
| 652 | + Launching features |
| 653 | + </a> |
| 654 | + page for process instructions. |
| 655 | + </section> |
| 656 | + `; |
| 657 | + } |
| 658 | + |
635 | 659 | renderStageMenu(feStage) {
|
636 | 660 | const items = [];
|
637 | 661 | if (this.offerAddXfnGates(feStage)) {
|
@@ -660,22 +684,32 @@ class ChromedashFeatureDetail extends LitElement {
|
660 | 684 | const text = this.feature.is_enterprise_feature ? 'Add Step': 'Add Stage';
|
661 | 685 |
|
662 | 686 | return html`
|
663 |
| - <sl-button size="small" @click="${ |
| 687 | + <sl-button id="new-stage" size="small" @click="${ |
664 | 688 | () => openAddStageDialog(this.feature.id, this.feature.feature_type_int)}">
|
665 | 689 | ${text}
|
666 | 690 | </sl-button>`;
|
667 | 691 | }
|
668 | 692 |
|
| 693 | + renderSectionHeader() { |
| 694 | + const text = this.feature.is_enterprise_feature ? 'Rollout steps' : 'Development stages'; |
| 695 | + return html` |
| 696 | + <span>${text} |
| 697 | + <sl-icon-button name="info-circle" href="https://www.chromium.org/blink/launching-features" |
| 698 | + style="font-size: 0.8rem;" target="_blank" label="Launching feature guide"> |
| 699 | + </sl-icon-button> |
| 700 | + </span>`; |
| 701 | + } |
| 702 | + |
669 | 703 | render() {
|
670 | 704 | return html`
|
671 | 705 | ${this.renderMetadataSection()}
|
672 | 706 | <h2>
|
673 |
| - ${renderHTMLIf(!this.feature.is_enterprise_feature, html`<span>Development stages</span>`)} |
674 |
| - ${renderHTMLIf(this.feature.is_enterprise_feature, html`<span>Rollout steps</span>`)} |
| 707 | + ${this.renderSectionHeader()} |
675 | 708 | ${this.renderControls()}
|
676 | 709 | </h2>
|
677 | 710 | ${this.feature.stages.map(feStage => this.renderProcessStage(feStage))}
|
678 | 711 | ${this.renderAddStageButton()}
|
| 712 | + ${this.renderFootnote()} |
679 | 713 | `;
|
680 | 714 | }
|
681 | 715 | }
|
|
0 commit comments