crossing todos (#4283)
This commit is contained in:
Родитель
d02bcaa64f
Коммит
ba2ecd3b82
|
@ -11,7 +11,7 @@ import {GateDict} from './chromedash-gate-chip.js';
|
|||
|
||||
interface ActiveStagesAndGates {
|
||||
stage: StageDict;
|
||||
gates: GateDict[]; // TODO(markxiong0122): Add Gate type when PR#4060 is merged.
|
||||
gates: GateDict[];
|
||||
}
|
||||
|
||||
@customElement('chromedash-feature-row')
|
||||
|
|
|
@ -6,15 +6,14 @@ import {ref} from 'lit/directives/ref.js';
|
|||
import {ChromedashApp} from './chromedash-app';
|
||||
import './chromedash-textarea';
|
||||
import {ALL_FIELDS, resolveFieldForFeature} from './form-field-specs';
|
||||
import {getFieldValueFromFeature, showToastMessage} from './utils.js';
|
||||
import {
|
||||
FieldInfo,
|
||||
getFieldValueFromFeature,
|
||||
showToastMessage,
|
||||
} from './utils.js';
|
||||
import {Feature, StageDict} from '../js-src/cs-client';
|
||||
import {FormattedFeature} from './form-definition';
|
||||
|
||||
interface FormFieldValue {
|
||||
name: string;
|
||||
value: any;
|
||||
stageId?: number;
|
||||
}
|
||||
interface getFieldValue {
|
||||
(fieldName: string, stageOrId: any): any;
|
||||
feature?: Feature;
|
||||
|
@ -27,7 +26,7 @@ export class ChromedashFormField extends LitElement {
|
|||
@property({type: Number}) // Represents which field this is on the form.
|
||||
index = -1;
|
||||
@property({type: Object}) // All other field value objects in current form.
|
||||
fieldValues!: FormFieldValue[] & {feature: Feature}; //TODO(markxiong0122): change Type to FieldInfo in utils.ts
|
||||
fieldValues!: FieldInfo[] & {feature: Feature};
|
||||
@property({type: Object, attribute: false})
|
||||
feature!: FormattedFeature;
|
||||
@property({type: String}) // Optional override of default label.
|
||||
|
@ -456,7 +455,7 @@ export class ChromedashFormField extends LitElement {
|
|||
function getFieldValueWithStage(
|
||||
fieldName: string,
|
||||
stageOrId: number | StageDict | undefined,
|
||||
formFieldValues: FormFieldValue[] & {feature?: Feature}
|
||||
formFieldValues: FieldInfo[] & {feature?: Feature}
|
||||
) {
|
||||
// Iterate through formFieldValues looking for element with name==fieldName
|
||||
// and stage == stageId, if there is a non-null stageId
|
||||
|
|
|
@ -3,6 +3,7 @@ import {LitElement, html, nothing} from 'lit';
|
|||
import {customElement, property} from 'lit/decorators.js';
|
||||
import {createRef, ref} from 'lit/directives/ref.js';
|
||||
import {ROADMAP_MILESTONE_CARD_CSS} from '../css/elements/chromedash-roadmap-milestone-card-css.js';
|
||||
import {Channels, ReleaseInfo} from '../js-src/cs-client.js';
|
||||
|
||||
const REMOVED_STATUS = ['Removed'];
|
||||
const DEPRECATED_STATUS = ['Deprecated', 'No longer pursuing'];
|
||||
|
@ -31,7 +32,7 @@ class ChromedashRoadmapMilestoneCard extends LitElement {
|
|||
@property({attribute: false})
|
||||
templateContent!: TemplateContent;
|
||||
@property({attribute: false})
|
||||
channel; //TODO(markxiong0122): Type this as Channel when PR#4085 is merged
|
||||
channel!: ReleaseInfo;
|
||||
@property({type: Boolean})
|
||||
showDates = false;
|
||||
@property({type: Boolean})
|
||||
|
|
|
@ -2,11 +2,10 @@ import '@polymer/iron-icon';
|
|||
import {LitElement, css, html} from 'lit';
|
||||
import {customElement, property, state} from 'lit/decorators.js';
|
||||
import {SHARED_STYLES} from '../css/shared-css.js';
|
||||
import {Feature} from '../js-src/cs-client.js';
|
||||
import {Channels, Feature} from '../js-src/cs-client.js';
|
||||
import {TemplateContent} from './chromedash-roadmap-milestone-card.js';
|
||||
import {showToastMessage} from './utils.js';
|
||||
|
||||
//TODO(markxiong0122): move this to cs-client.js after converting it to TypeScript
|
||||
interface MilestoneDetails {
|
||||
branch_point: string;
|
||||
earliest_beta: string;
|
||||
|
@ -105,7 +104,7 @@ export class ChromedashRoadmap extends LitElement {
|
|||
@property({type: Number, attribute: false})
|
||||
cardWidth = 0;
|
||||
@state()
|
||||
channels; //TODO(markxiong0122): Type this as Channel when PR#4085 is merged
|
||||
channels: Channels = {};
|
||||
@state()
|
||||
starredFeatures = new Set<number>();
|
||||
/**
|
||||
|
@ -314,7 +313,7 @@ export class ChromedashRoadmap extends LitElement {
|
|||
milestone => html`
|
||||
<chromedash-roadmap-milestone-card
|
||||
style="width:${this.cardWidth}px;"
|
||||
.channel=${this.milestoneInfo?.[milestone]}
|
||||
.channel=${this.milestoneInfo[milestone]}
|
||||
.templateContent=${TEMPLATE_CONTENT['stable_minus_one']}
|
||||
?showdates=${SHOW_DATES}
|
||||
.starredFeatures=${this.starredFeatures}
|
||||
|
@ -330,7 +329,7 @@ export class ChromedashRoadmap extends LitElement {
|
|||
type => html`
|
||||
<chromedash-roadmap-milestone-card
|
||||
style="width:${this.cardWidth}px;"
|
||||
.channel=${this.channels?.[type]}
|
||||
.channel=${this.channels[type]}
|
||||
.templateContent=${TEMPLATE_CONTENT[type]}
|
||||
?showdates=${SHOW_DATES}
|
||||
.starredFeatures=${this.starredFeatures}
|
||||
|
@ -346,7 +345,7 @@ export class ChromedashRoadmap extends LitElement {
|
|||
milestone => html`
|
||||
<chromedash-roadmap-milestone-card
|
||||
style="width:${this.cardWidth}px;"
|
||||
.channel=${this.milestoneInfo?.[milestone]}
|
||||
.channel=${this.milestoneInfo[milestone]}
|
||||
.templateContent=${TEMPLATE_CONTENT['dev_plus_one']}
|
||||
?showdates=${SHOW_DATES}
|
||||
.starredFeatures=${this.starredFeatures}
|
||||
|
|
|
@ -4,6 +4,13 @@ import {customElement, property, state} from 'lit/decorators.js';
|
|||
import {SHARED_STYLES} from '../css/shared-css.js';
|
||||
import './chromedash-x-meter';
|
||||
|
||||
interface StackRankItem {
|
||||
property_name: string;
|
||||
percentage: number;
|
||||
bucket_id: number;
|
||||
obsolete?: boolean;
|
||||
}
|
||||
|
||||
@customElement('chromedash-stack-rank')
|
||||
class ChromedashStackRank extends LitElement {
|
||||
@property({type: String, attribute: false})
|
||||
|
@ -11,9 +18,9 @@ class ChromedashStackRank extends LitElement {
|
|||
@property({type: String, attribute: false})
|
||||
view = '';
|
||||
@property({type: Array, attribute: false})
|
||||
viewList: any[] = []; //TODO(markxiong0122) Type this
|
||||
viewList: StackRankItem[] = [];
|
||||
@property({type: Array, attribute: false})
|
||||
tempList: any[] = [];
|
||||
tempList: StackRankItem[] = [];
|
||||
@state()
|
||||
maxPercentage = 100;
|
||||
@state()
|
||||
|
|
|
@ -292,6 +292,8 @@
|
|||
* @property {string} [mstone] (optional).
|
||||
* @property {string | null} [stable_date] (optional).
|
||||
* @property {string | null} [latest_beta] - The latest beta release date (optional).
|
||||
* @property {string | null} [final_beta]
|
||||
* @property {Feature} features
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче