Skip to content

Commit

Permalink
v3.24.2 (#205)
Browse files Browse the repository at this point in the history
* Fix tracking of active prac challenge

* Minor cleanup and improved console logging

* Bug fixes and challenge report tags filter.

* Fix event horizon, game center teams, enrollment report stat summary, progress widget

* Fix issue with past games not showing ongoing ones

* WIP question sets

* More question set stuff

* Improvements to OIDC experience and support for auto log in/out.

* merge from next

* Add favicon defaults. Update theme

* Fix settings link bug, more thing

* Theme stuff

* Add settings link to user menu

* Theme stuff

* Revert "Theme stuff"

This reverts commit a26c715.

* Revert "Add settings link to user menu"

This reverts commit d640ee8.

* Revert "Theme stuff"

This reverts commit c3e3b69.

* Revert "Fix settings link bug, more thing"

This reverts commit f96dc59.

* Revert "Add favicon defaults. Update theme"

This reverts commit 1b2e5a7.

* Rollback and reimplement oauth changes

* Update oidc settings to match topo

* Cleanup

* Update dev env settings

* Improvements to OIDC experience and support for auto log in/out.

* Restore ux improvements

* More retheme

* Retheming and initial work on name improvements.

* Update gh action versions

* Retheming and name mgmt

* Styling stuff

* Styling stuff

* Move challenge markdown

* Un 'fix' start practice button

* minor name fixes

* Name cleanup

* Finish merge from main

* More theming and fix to GBAPI#502

* More theming and markdown fix

* More style fixes

* Partially address GBAPI#254

* Return question example answers

* Auto-select first available uncompleted tab

* Standard challenge panel sticky enhancements

* Styling

* Roll back login experience changes

* Settings bug fix and hide rename cert

* Minor theme stuff

* Theming

* Add additional sticky panel toggle button

* Theming and console stuff

* Fix deploy UI issue

* WIP

* Fixed a bug that hid the 'settings' menu in user profile

* Fix create users sponsor bug and improve onclick directive

* WIP feedback templates

* Hide new feedback system for now.

* Enable certificate rename for practice.
  • Loading branch information
sei-bstein authored Nov 14, 2024
1 parent 3046ee0 commit c6de2b6
Show file tree
Hide file tree
Showing 22 changed files with 612 additions and 74 deletions.
3 changes: 2 additions & 1 deletion projects/gameboard-ui/src/app/admin/admin.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ import { ErrorDivComponent } from '@/standalone/core/components/error-div/error-
import { SpinnerComponent } from '@/standalone/core/components/spinner/spinner.component';
import { ToSupportCodePipe } from '@/standalone/core/pipes/to-support-code.pipe';
import { IfHasPermissionDirective } from '@/standalone/directives/if-has-permission.directive';
import { FeedbackTemplatePickerComponent } from "../feedback/components/feedback-template-picker/feedback-template-picker.component";

@NgModule({
declarations: [
Expand Down Expand Up @@ -222,14 +223,14 @@ import { IfHasPermissionDirective } from '@/standalone/directives/if-has-permiss
ScoreboardModule,
SponsorsModule,
SystemNotificationsModule,

// standalones
ErrorDivComponent,
GameInfoBubblesComponent,
IfHasPermissionDirective,
SafeUrlPipe,
SpinnerComponent,
ToSupportCodePipe,
FeedbackTemplatePickerComponent
]
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h2 class=fs-12>Settings</h2>

<div footer>
<div *ngIf="(userIds.length - invalidIds.length) > 0">
<strong class="text-info">{{userIds.length}}</strong>
<strong class="text-success">{{userIds.length}}</strong>
{{ "user" | pluralizer:userIds.length - invalidIds.length }} will be created.
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class CreateUsersModalComponent {
private usersService: UserService,
private userRolePermissions: UserRolePermissionsService) {
this.appName = config.appName;
this.placeholder = "// one ID per line, e.g.:\n\n3496da07-d19e-440d-a246-e35f7b7bfcac\n9a53d8cd-ef88-44c0-96b2-fc8766b518dd\n\n//and so on";
this.placeholder = "// one ID per line, e.g.:\n\n3496da07-d19e-440d-a246-e35f7b7bfcac\n9a53d8cd-ef88-44c0-96b2-fc8766b518dd\n// and so on";
}

async ngOnInit() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export class FeedbackEditorComponent implements OnInit {
}

protected handleAboutFeedbackClick() {

this.modalService.openConfirm({
bodyContent: `You can use this box to configure questions that will automatically be presented to players upon conclusion of a challenge or game. Enter valid YAML to set these up.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<label class="mb-0" for="hidden-toggle">Publish</label>
<div class="form-control h-auto d-flex align-items-center">
<label>Hidden</label>
<label class="btn text-info" btnCheckbox [ngModelOptions]="{updateOn: 'change'}"
<label class="btn text-success" btnCheckbox [ngModelOptions]="{updateOn: 'change'}"
id="isPublished-input" name="isPublished" [(ngModel)]="game.isPublished">
<fa-icon *ngIf="!game.isPublished" [icon]="fa.toggleOff" size="lg"></fa-icon>
<fa-icon *ngIf="game.isPublished" [icon]="fa.toggleOn" size="lg"></fa-icon>
Expand All @@ -36,7 +36,7 @@
<label class="mb-0" for="feature-toggle">Feature</label>
<div class="form-control h-auto d-flex align-items-center">
<label>Normal</label>
<label class="btn text-info" btnCheckbox [ngModelOptions]="{updateOn: 'change'}"
<label class="btn text-success" btnCheckbox [ngModelOptions]="{updateOn: 'change'}"
id="is-featured-input" name="is-featured" [(ngModel)]="game.isFeatured">
<fa-icon *ngIf="!game.isFeatured" [icon]="fa.toggleOff" size="lg"></fa-icon>
<fa-icon *ngIf="game.isFeatured" [icon]="fa.toggleOn" size="lg"></fa-icon>
Expand Down Expand Up @@ -207,9 +207,9 @@
<label class="mb-0" for="reset-toggle">Player Mode</label>
<div class="form-control h-auto d-flex align-items-center">
<label>Competition</label>
<label class="btn text-info" btnCheckbox btnCheckboxTrue="practice" btnCheckboxFalse="competition"
tabindex="0" [ngModelOptions]="{updateOn: 'change'}" id="reset-toggle" name="playerMode"
[(ngModel)]="game.playerMode">
<label class="btn text-success" btnCheckbox btnCheckboxTrue="practice"
btnCheckboxFalse="competition" tabindex="0" [ngModelOptions]="{updateOn: 'change'}"
id="reset-toggle" name="playerMode" [(ngModel)]="game.playerMode">
<fa-icon *ngIf="game.playerMode==='competition'" [icon]="fa.toggleOff" size="lg"></fa-icon>
<fa-icon *ngIf="game.playerMode==='practice'" [icon]="fa.toggleOn" size="lg"></fa-icon>
</label>
Expand All @@ -221,7 +221,7 @@
<label class="mb-0" for="sync-start-toggle">Show On Homepage When In Practice Mode</label>
<div class="form-control h-auto d-flex align-items-center">
<label>No</label>
<label class="btn text-info" btnCheckbox [btnCheckboxTrue]="true" [btnCheckboxFalse]="false"
<label class="btn text-success" btnCheckbox [btnCheckboxTrue]="true" [btnCheckboxFalse]="false"
tabindex="0" [ngModelOptions]="{updateOn: 'change'}" id="show-on-homepage-toggle"
name="showOnHomePageInPracticeMode" [(ngModel)]="game.showOnHomePageInPracticeMode">
<fa-icon *ngIf="!game.showOnHomePageInPracticeMode" [icon]="fa.toggleOff" size="lg"></fa-icon>
Expand All @@ -238,7 +238,7 @@
<label class="mb-0" for="sync-start-toggle">Require Synchronized Start</label>
<div class="form-control h-auto d-flex align-items-center">
<label>No</label>
<label class="btn text-info" btnCheckbox [btnCheckboxTrue]="true" [btnCheckboxFalse]="false"
<label class="btn text-success" btnCheckbox [btnCheckboxTrue]="true" [btnCheckboxFalse]="false"
tabindex="0" [ngModelOptions]="{updateOn: 'change'}" id="sync-start-toggle"
name="syncStartToggle" [(ngModel)]="game.requireSynchronizedStart">
<fa-icon *ngIf="!game.requireSynchronizedStart" [icon]="fa.toggleOff" size="lg"></fa-icon>
Expand Down Expand Up @@ -334,7 +334,7 @@ <h4>Execution</h4>
<label class="mb-0" for="preview-toggle">Allow Preview</label>
<div class="form-control h-auto d-flex align-items-center">
<label>Hidden</label>
<label class="btn text-info" btnCheckbox tabindex="0" [ngModelOptions]="{updateOn: 'change'}"
<label class="btn text-success" btnCheckbox tabindex="0" [ngModelOptions]="{updateOn: 'change'}"
id="preview-toggle" name="allowPreview" [(ngModel)]="game.allowPreview">
<fa-icon *ngIf="!game.allowPreview" [icon]="fa.toggleOff" size="lg"></fa-icon>
<fa-icon *ngIf="game.allowPreview" [icon]="fa.toggleOn" size="lg"></fa-icon>
Expand All @@ -348,7 +348,7 @@ <h4>Execution</h4>
<label class="mb-0" for="reset-toggle">Allow Reset</label>
<div class="form-control h-auto d-flex align-items-center">
<label>Forbidden</label>
<label class="btn text-info" btnCheckbox tabindex="0" [ngModelOptions]="{updateOn: 'change'}"
<label class="btn text-success" btnCheckbox tabindex="0" [ngModelOptions]="{updateOn: 'change'}"
id="reset-toggle" name="allowReset" [(ngModel)]="game.allowReset">
<fa-icon *ngIf="!game.allowReset" [icon]="fa.toggleOff" size="lg"></fa-icon>
<fa-icon *ngIf="game.allowReset" [icon]="fa.toggleOn" size="lg"></fa-icon>
Expand All @@ -362,7 +362,7 @@ <h4>Execution</h4>
<label class="mb-0" for="late-start-toggle">Allow Late Starts</label>
<div class="form-control h-auto d-flex align-items-center">
<label>Forbidden</label>
<label class="btn text-info" btnCheckbox tabindex="0" [ngModelOptions]="{updateOn: 'change'}"
<label class="btn text-success" btnCheckbox tabindex="0" [ngModelOptions]="{updateOn: 'change'}"
id="late-start-toggle" name="allowLateStart" [(ngModel)]="game.allowLateStart">
<fa-icon *ngIf="!game.allowLateStart" [icon]="fa.toggleOff" size="lg"></fa-icon>
<fa-icon *ngIf="game.allowLateStart" [icon]="fa.toggleOn" size="lg"></fa-icon>
Expand All @@ -376,7 +376,7 @@ <h4>Execution</h4>
<label class="mb-0" for="public-scoreboard-toggle">Allow Public Scoreboard Access</label>
<div class="form-control h-auto d-flex align-items-center">
<label>Forbidden</label>
<label class="btn text-info" btnCheckbox tabindex="0" [ngModelOptions]="{updateOn: 'change'}"
<label class="btn text-success" btnCheckbox tabindex="0" [ngModelOptions]="{updateOn: 'change'}"
id="public-scoreboard-toggle" name="allowPublicScoreboardAccess"
[(ngModel)]="game.allowPublicScoreboardAccess">
<fa-icon *ngIf="!game.allowPublicScoreboardAccess" [icon]="fa.toggleOff"
Expand Down Expand Up @@ -471,7 +471,7 @@ <h4>Registration</h4>
<label class="mb-0" for="hidden-toggle">Team Sponsorship</label>
<div class="form-control h-auto d-flex align-items-center">
<label>Open</label>
<label class="btn text-info" btnCheckbox [ngModelOptions]="{updateOn: 'change'}" tabindex="0"
<label class="btn text-success" btnCheckbox [ngModelOptions]="{updateOn: 'change'}" tabindex="0"
id="requireSponsoredTeam-input" name="requireSponsoredTeam"
[(ngModel)]="game.requireSponsoredTeam">
<fa-icon *ngIf="!game.requireSponsoredTeam" [icon]="fa.toggleOff" size="lg"></fa-icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h4>Users</h4>
</div>
<div class="filter-and-sort-container mt-3 d-flex align-items-center justify-content-center">
<div class="btn-group d-block mr-2 button-toggle-group filter" role="group" aria-label="Filter group">
<button type="button" class="btn btn-dark button-group-label text-upper fw-bold" disabled>Filter:</button>
<button type="button" class="btn btn-dark button-group-label text-upper fw-bold" disabled>Filter</button>
<button type="button"
[class]="filter ==='elevated-role' | toggleClass: 'btn-success' : 'btn-outline-success': 'btn'"
(click)="toggleFilter('elevated-role')">
Expand All @@ -35,7 +35,7 @@ <h4>Users</h4>
<div class="spacer"></div>

<div class="btn-group d-block button-toggle-group sort" me-2 role="group" aria-label="Sort group">
<button type="button" class="btn btn-dark button-group-label text-upper fw-bold" disabled>Sort:</button>
<button type="button" class="btn btn-dark button-group-label text-upper fw-bold" disabled>Sort</button>
<button type="button"
[class]="search.sort ==='name' | toggleClass: 'btn-success' : 'btn-outline-success': 'btn toggle-button'"
(click)="setSort('name')">
Expand Down Expand Up @@ -69,7 +69,7 @@ <h4>Users</h4>
</div>

<small *ngIf="source.length === 200" class="text-warning">
Results limited to 200. Refine search term if necessary.
Results limited to <strong>200</strong>. Refine search term if necessary.
</small>

<hr />
Expand All @@ -89,7 +89,9 @@ <h4>Users</h4>

<div class="d-flex align-items-center">
<div class="fs-08 mr-3 badge badge-success" *ngIf="user.role != 'member'">{{ user.role | titlecase }}</div>
<div class="btn-link fs-08" appCopyOnClick>{{ user.id | slice:0:8 }}</div>
<div class="btn-link fs-08" appCopyOnClick appCopyOnClickMessage="Copied user ID **$TEXT$** to your clipboard."
tooltip="Copy this user's ID to your clipboard">
{{ user.id | slice:0:8 }}</div>
</div>

<p *ngIf="user.lastLoginDate" class="text-muted fs-08 m-0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type UserRegistrarSort = "name" | "lastLogin" | "createdOn";
})
export class UserRegistrarComponent {
protected roles$: Observable<UserRoleKey[]>;
protected isLoading = false;
refresh$ = new BehaviorSubject<boolean>(true);
source$: Observable<ApiUser[]>;
source: ApiUser[] = [];
Expand All @@ -48,8 +49,12 @@ export class UserRegistrarComponent {
interval(60000)
).pipe(
debounceTime(500),
tap(() => this.isLoading = true),
switchMap(() => this.api.list({ ...this.search })),
tap(r => this.source = r),
tap(r => {
this.source = r;
this.isLoading = false;
}),
tap(() => this.review()),
);
}
Expand Down
9 changes: 9 additions & 0 deletions projects/gameboard-ui/src/app/api/feedback-models.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright 2021 Carnegie Mellon University. All Rights Reserved.
// Released under a MIT (SEI)-style license. See LICENSE.md in the project root for license information.

import { SimpleEntity } from "./models";

export interface Feedback {
id?: string;
userId?: string;
Expand Down Expand Up @@ -98,3 +100,10 @@ export interface FeedbackStats {
submittedCount: number;
questionStats: QuestionStats[];
}

export interface FeedbackTemplate {
id: string;
content: string;
createdByUser: SimpleEntity;
name: string;
}
Loading

0 comments on commit c6de2b6

Please sign in to comment.