Skip to content

Commit

Permalink
added add notes button to criteria result, moved add criteria button …
Browse files Browse the repository at this point in the history
…styling to global
  • Loading branch information
srietkerk committed Feb 28, 2024
1 parent 59c057f commit 5905c08
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion teachertool/src/components/AddCriteriaButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const AddCriteriaButton: React.FC<IProps> = ({}) => {
);
return (
<Button
className={classList("inline", "add-criteria-button")}
className={classList("inline", "add-button")}
label={Strings.AddCriteria}
onClick={() => showModal("catalog-display")}
title={Strings.AddCriteria}
Expand Down
12 changes: 11 additions & 1 deletion teachertool/src/components/EvalResultDisplay.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import * as React from "react";
import { useContext } from "react";
import css from "./styling/EvalResultDisplay.module.scss";
import { AppStateContext } from "../state/appStateContext";
import { getCatalogCriteriaWithId } from "../state/helpers";
import { CriteriaEvaluationResult } from "../types/criteria";
import css from "./styling/EvalResultDisplay.module.scss";
import { classList } from "react-common/components/util";
import { Button } from "react-common/components/controls/Button";
import { Strings } from "../constants";


const ResultsHeader: React.FC = () => {
Expand Down Expand Up @@ -45,6 +47,13 @@ const CriteriaResult: React.FC<CriteriaResultProps> = ({ criteriaId, result, lab
{result === CriteriaEvaluationResult.Pass && (
<p className={css["positive-text"]}>{lf("Looks Good!")}</p>
)}
<Button
className={classList("inline", "add-button")}
label={Strings.AddNotes}
onClick={() => console.log("Add notes getting clicked")}
title={Strings.AddNotes}
leftIcon="fas fa-plus-circle"
/>
</div>
);
}
Expand All @@ -65,6 +74,7 @@ export const EvalResultDisplay: React.FC<{}> = () => {
{teacherTool.projectMetadata && (
<div className={css["eval-results-container"]}>
<ResultsHeader />
{teacherTool.evalResults.length === 0 && <div className={css["common-spinner"]} />}
{Object.keys(teacherTool.evalResults ?? {}).map(criteriaInstanceId => {
const label = getTemplateStringFromCriteriaInstanceId(criteriaInstanceId);
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,4 @@
flex-grow: 1;
}
}

button[class*="add-criteria-button"] {
align-self: center;
border-radius: 0.5rem;
width: auto;
padding: 0.85rem 1.4rem;
}
}
1 change: 1 addition & 0 deletions teachertool/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export namespace Strings {
export const Actions = lf("Actions");
export const AutoRun = lf("auto-run");
export const AutoRunDescription = lf("Automatically re-evaluate when the rubric or project changes");
export const AddNotes = lf("Add Notes");
}

export namespace Ticks {
Expand Down
7 changes: 7 additions & 0 deletions teachertool/src/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -158,5 +158,12 @@ code {
/****** STYLE OVERRIDES ******/
/*******************************/

button[class*="add-button"] {
align-self: center;
border-radius: 0.5rem;
width: auto;
padding: 0.85rem 1.4rem;
}

@import "./style.overrides/Button.scss";
@import "./style.overrides/Input.scss";

0 comments on commit 5905c08

Please sign in to comment.