-
Notifications
You must be signed in to change notification settings - Fork 76
feat(release-tracks): add release track preview and version tagging #903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
avwchapman
wants to merge
9
commits into
beta
Choose a base branch
from
790-release-preview-modal
base: beta
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ebbae4b
feat(release-tracks): add release preview and version tagging
avwchapman 3f1b74a
style: apply prettier formatting
avwchapman 74b7906
Merge branch 'beta' into 790-release-preview-modal
avwchapman 5164735
test(release-tracks): improve release preview coverage
avwchapman 2273c3c
fix(release-tracks): align preview flow with updated API
avwchapman a5c8284
fix(release-tracks): support multiple drafts and fix release previews
avwchapman b87d726
fix(release-tracks): notify users when release preview fails
avwchapman 1458dc4
fix(release-tracks): default initial preview version to 0.1
avwchapman 2046569
fix(release-tracks): distinguish preview conflict messages
avwchapman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
257 changes: 257 additions & 0 deletions
257
src/app/components/release-preview-dialog/release-preview-dialog.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,257 @@ | ||
| <div class="release-preview-dialog"> | ||
| <header class="release-preview-header"> | ||
| <div> | ||
| <h2 id="release-preview-dialog-title"> | ||
| Release Preview: {{ trackName }} | ||
| </h2> | ||
| <p class="release-version-summary"> | ||
| <span | ||
| >Current: <strong>{{ currentVersion }}</strong></span | ||
| > | ||
| <span | ||
| >Minor Bump: <strong>{{ minorVersion }}</strong></span | ||
| > | ||
| <span | ||
| >Major Bump: <strong>{{ majorVersion }}</strong></span | ||
| > | ||
| </p> | ||
| </div> | ||
|
|
||
| <button | ||
| mat-icon-button | ||
| type="button" | ||
| aria-label="Close draft snapshot preview" | ||
| (click)="close()"> | ||
| <mat-icon>close</mat-icon> | ||
| </button> | ||
| </header> | ||
|
|
||
| <mat-tab-group | ||
| class="release-preview-tabs" | ||
| animationDuration="0ms" | ||
| mat-stretch-tabs="false"> | ||
| <mat-tab> | ||
| <ng-template mat-tab-label> | ||
| <mat-icon aria-hidden="true">info_outline</mat-icon> | ||
| <span>Summary</span> | ||
| </ng-template> | ||
|
|
||
| <section class="release-summary" aria-label="Draft snapshot summary"> | ||
| <article class="release-stat release-stat--included"> | ||
| <strong>{{ totalIncludedCount }}</strong> | ||
| <span>Total objects included</span> | ||
| </article> | ||
| <article class="release-stat release-stat--new"> | ||
| <strong>{{ newObjectCount }}</strong> | ||
| <span>New objects</span> | ||
| </article> | ||
| <article class="release-stat release-stat--updated"> | ||
| <strong>{{ updatedMemberCount }}</strong> | ||
| <span>Updated members</span> | ||
| </article> | ||
| <article class="release-stat release-stat--unchanged"> | ||
| <strong>{{ unchangedObjectCount }}</strong> | ||
| <span>Unchanged objects</span> | ||
| </article> | ||
| <article | ||
| *ngIf="!isVirtualTrack" | ||
| class="release-stat release-stat--excluded"> | ||
| <strong>{{ excludedCandidates.length }}</strong> | ||
| <span>Candidates not included</span> | ||
| </article> | ||
| <article | ||
| *ngIf="isVirtualTrack" | ||
| class="release-stat release-stat--excluded"> | ||
| <strong>{{ removedObjectCount }}</strong> | ||
| <span>Removed objects</span> | ||
| </article> | ||
| <article | ||
| *ngIf="isVirtualTrack" | ||
| class="release-stat release-stat--excluded"> | ||
| <strong>{{ quarantinedObjectCount }}</strong> | ||
| <span>Quarantined objects</span> | ||
| </article> | ||
| </section> | ||
| </mat-tab> | ||
|
|
||
| <mat-tab> | ||
| <ng-template mat-tab-label> | ||
| <mat-icon aria-hidden="true">verified</mat-icon> | ||
| <span>Included ({{ includedObjects.length }})</span> | ||
| </ng-template> | ||
|
|
||
| <section class="release-object-list" aria-label="Included objects"> | ||
| <p *ngIf="includedObjects.length === 0" class="release-object-empty"> | ||
| No members or staged objects will be included. | ||
| </p> | ||
| <div *ngIf="includedObjects.length" class="release-table-wrapper"> | ||
| <table class="release-preview-table"> | ||
| <thead> | ||
| <tr> | ||
| <th scope="col">Name / ID</th> | ||
| <th scope="col">Type</th> | ||
| <th scope="col">Version</th> | ||
| <th scope="col">Source</th> | ||
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| <tr | ||
| *ngFor=" | ||
| let item of includedObjects; | ||
| trackBy: trackByIncludedObject | ||
| "> | ||
| <td> | ||
| <strong>{{ getObjectName(item.object) }}</strong> | ||
| <small> | ||
| {{ item.object.attack_id || item.object.object_ref }} | ||
| </small> | ||
| </td> | ||
| <td>{{ getObjectType(item.object) }}</td> | ||
| <td>{{ getObjectVersion(item.object) }}</td> | ||
| <td> | ||
| <span | ||
| class="source-chip" | ||
| [class.source-chip--staged]=" | ||
| getIncludedSource(item) === 'staged' | ||
| "> | ||
| {{ getIncludedSource(item) }} | ||
| </span> | ||
| </td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
| </div> | ||
| </section> | ||
| </mat-tab> | ||
|
|
||
| <mat-tab> | ||
| <ng-template mat-tab-label> | ||
| <mat-icon aria-hidden="true">cancel</mat-icon> | ||
| <span>Excluded ({{ excludedCandidates.length }})</span> | ||
| </ng-template> | ||
|
|
||
| <section class="release-object-list" aria-label="Excluded candidates"> | ||
| <p *ngIf="excludedCandidates.length === 0" class="release-object-empty"> | ||
| No candidates are excluded from this snapshot. | ||
| </p> | ||
| <div *ngIf="excludedCandidates.length" class="release-table-wrapper"> | ||
| <table class="release-preview-table release-preview-table--excluded"> | ||
| <thead> | ||
| <tr> | ||
| <th scope="col">Name / ID</th> | ||
| <th scope="col">Workflow State</th> | ||
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| <tr | ||
| *ngFor="let item of excludedCandidates; trackBy: trackByObject"> | ||
| <td> | ||
| <strong>{{ getObjectName(item) }}</strong> | ||
| <small>{{ item.attack_id || item.object_ref }}</small> | ||
| </td> | ||
| <td> | ||
| <span class="workflow-chip"> | ||
| {{ getWorkflowState(item) }} | ||
| </span> | ||
| </td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
| </div> | ||
| </section> | ||
| </mat-tab> | ||
|
|
||
| <mat-tab> | ||
| <ng-template mat-tab-label> | ||
| <mat-icon aria-hidden="true">swap_horiz</mat-icon> | ||
| <span>Replacements ({{ replacements.length }})</span> | ||
| </ng-template> | ||
|
|
||
| <section class="release-object-list" aria-label="Replaced members"> | ||
| <p *ngIf="replacements.length === 0" class="release-object-empty"> | ||
| No existing members will be replaced. | ||
| </p> | ||
| <div *ngIf="replacements.length" class="release-table-wrapper"> | ||
| <table | ||
| class="release-preview-table release-preview-table--replacements"> | ||
| <thead> | ||
| <tr> | ||
| <th scope="col">Name / ID</th> | ||
| <th scope="col">Current Member Version</th> | ||
| <th scope="col">Incoming Staged Version</th> | ||
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| <tr | ||
| *ngFor=" | ||
| let item of replacements; | ||
| trackBy: trackByIncludedObject | ||
| " | ||
| [class.release-table-row--invalid]="item.invalidVersionBump"> | ||
| <td> | ||
| <strong>{{ getObjectName(item.object) }}</strong> | ||
| <small> | ||
| {{ item.object.attack_id || item.object.object_ref }} | ||
| </small> | ||
| </td> | ||
| <td>{{ getObjectVersion(item.currentMember) }}</td> | ||
| <td> | ||
| <strong | ||
| class="incoming-version" | ||
| [class.incoming-version--invalid]="item.invalidVersionBump"> | ||
| {{ getObjectVersion(item.incomingStaged) }} | ||
| </strong> | ||
| <mat-icon | ||
| *ngIf="item.invalidVersionBump" | ||
| class="invalid-version-icon" | ||
| aria-label="Invalid version bump"> | ||
| warning_amber | ||
| </mat-icon> | ||
| </td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
| </div> | ||
| </section> | ||
| </mat-tab> | ||
| </mat-tab-group> | ||
|
|
||
| <footer class="release-preview-footer"> | ||
| <p | ||
| *ngIf="hasInvalidVersionBumps" | ||
| class="release-blocked-message" | ||
| role="alert"> | ||
| <mat-icon aria-hidden="true">warning_amber</mat-icon> | ||
| <span> Release is blocked by invalid incoming version bumps. </span> | ||
| </p> | ||
| <p | ||
| *ngIf="!hasInvalidVersionBumps && hasPromotionConflicts" | ||
| class="release-blocked-message" | ||
| role="alert"> | ||
| <mat-icon aria-hidden="true">warning_amber</mat-icon> | ||
| <span> Release is blocked by promotion conflicts. </span> | ||
| </p> | ||
|
|
||
| <div class="release-preview-actions"> | ||
| <button mat-stroked-button type="button" (click)="close()">Cancel</button> | ||
| <button | ||
| mat-raised-button | ||
| class="release-preview-tag-minor-button" | ||
| type="button" | ||
| color="primary" | ||
| [disabled]="isReleaseBlocked" | ||
| (click)="tagVersion('minor')"> | ||
| Tag Minor ({{ minorVersion }}) | ||
| </button> | ||
| <button | ||
| mat-raised-button | ||
| class="release-preview-tag-major-button" | ||
| type="button" | ||
| color="primary" | ||
| [disabled]="isReleaseBlocked" | ||
| (click)="tagVersion('major')"> | ||
| Tag Major ({{ majorVersion }}) | ||
| </button> | ||
| </div> | ||
| </footer> | ||
| </div> | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small wording tweak: this always mentions the release is blocked by invalid version bumps, even if it's just blocked by an API promotion conflict (e.g.
staged_to_members: abort). Could we keep this message for when there is an invalid version bump (v1.2 -> v1.4), and add a generic conflict message otherwise? Maybe like "Release is blocked by promotion conflicts."