diff --git a/src/app/components/elements/ContentPropertyTags.tsx b/src/app/components/elements/ContentPropertyTags.tsx index cdefe57329..5e31600b8c 100644 --- a/src/app/components/elements/ContentPropertyTags.tsx +++ b/src/app/components/elements/ContentPropertyTags.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { isStaff, isTeacherOrAbove } from "../../services"; +import { isPhy, isStaff, isTeacherOrAbove } from "../../services"; import { selectors, useAppSelector } from "../../state"; import classNames from "classnames"; import {v4 as uuid_v4} from "uuid"; @@ -16,7 +16,7 @@ export const QuestionPropertyTags = ({ supersededBy, tags, ...rest }: QuestionPr const accessibilitySettings = useAccessibilitySettings(); return
- {accessibilitySettings?.SHOW_INACCESSIBLE_WARNING && getAccessibilityTags(tags)?.map(tag => { + {isPhy && accessibilitySettings?.SHOW_INACCESSIBLE_WARNING && getAccessibilityTags(tags)?.map(tag => { const id = `access-warn-${uuid_v4()}`; // must be globally unique. making refs in a loop was too painful. return diff --git a/src/app/components/elements/GameboardBuilderRow.tsx b/src/app/components/elements/GameboardBuilderRow.tsx index ffcf912c6c..ccd9099220 100644 --- a/src/app/components/elements/GameboardBuilderRow.tsx +++ b/src/app/components/elements/GameboardBuilderRow.tsx @@ -116,8 +116,7 @@ const GameboardBuilderRow = (
- {isPhy && } - + {question.subtitle && <> {question.subtitle} } diff --git a/src/app/components/elements/LLMFreeTextQuestionIndicator.tsx b/src/app/components/elements/LLMFreeTextQuestionIndicator.tsx index c01ec45239..de2e0ccc5d 100644 --- a/src/app/components/elements/LLMFreeTextQuestionIndicator.tsx +++ b/src/app/components/elements/LLMFreeTextQuestionIndicator.tsx @@ -3,7 +3,7 @@ import React from "react"; import { isAda } from "../../services"; export function LLMFreeTextQuestionIndicator({small, symbol, className}: {small?: boolean, symbol?: boolean, className?: string}) { - return
+ return
{!symbol && `LLM marked question`}
; diff --git a/src/app/components/elements/PageTitle.tsx b/src/app/components/elements/PageTitle.tsx index 295866074c..3cc63b4c75 100644 --- a/src/app/components/elements/PageTitle.tsx +++ b/src/app/components/elements/PageTitle.tsx @@ -67,6 +67,8 @@ export interface TitleIconProps extends PhyHexIconProps { type: "img" | "hex" | "placeholder"; height?: string; width?: string; + alt?: string; + label?: string; } export interface PageTitleProps { @@ -97,7 +99,7 @@ export const PageTitle = ({currentPageTitle, displayTitleOverride, subTitle, dis return

{isPhy && icon && ( - icon.type === "img" ? + icon.type === "img" ? {icon.alt : icon.type === "hex" ? : icon.type === "placeholder" ?
: undefined diff --git a/src/app/components/elements/StageAndDifficultySummaryIcons.tsx b/src/app/components/elements/StageAndDifficultySummaryIcons.tsx index 6f29d387b3..24f111a44f 100644 --- a/src/app/components/elements/StageAndDifficultySummaryIcons.tsx +++ b/src/app/components/elements/StageAndDifficultySummaryIcons.tsx @@ -30,7 +30,7 @@ export const StageAndDifficultySummaryIcons = (props: StageAndDifficultySummaryI )}
, -
+
{difficulties.length > 0 && <>
diff --git a/src/app/components/elements/layout/SidebarLayout.tsx b/src/app/components/elements/layout/SidebarLayout.tsx index 8cea0a9fa5..3af3c975fb 100644 --- a/src/app/components/elements/layout/SidebarLayout.tsx +++ b/src/app/components/elements/layout/SidebarLayout.tsx @@ -31,7 +31,6 @@ import { EventsPageQueryParams } from "../../pages/Events"; import { StyledDropdown } from "../inputs/DropdownInput"; import { CollapsibleList } from "../CollapsibleList"; import { extendUrl } from "../../pages/subjectLandingPageComponents"; -import { getProgressIcon } from "../../pages/Gameboard"; import { tags as tagsService } from "../../../services"; import { Markup } from "../markup"; import { History } from "history"; @@ -69,11 +68,18 @@ const QuestionLink = (props: React.HTMLAttributes & QuestionLinkP const audienceFields = filterAudienceViewsByProperties(determineAudienceViews(question.audience), AUDIENCE_DISPLAY_FIELDS); const link = isDefined(gameboardId) ? `/questions/${question.id}?board=${gameboardId}` : `/questions/${question.id}`; + const progressIcon = question.state && (question.state === CompletionState.ALL_CORRECT + ? "icon icon-raw icon-correct" + : [CompletionState.ALL_INCORRECT, CompletionState.ALL_ATTEMPTED].includes(question.state) + ? "icon icon-raw icon-attempted" + : question.state === CompletionState.IN_PROGRESS + ? "icon icon-raw icon-in-progress" + : "icon icon-raw icon-not-started"); + return
  • {(isDefined(gameboardId) || question.state !== CompletionState.NOT_ATTEMPTED) - ? - + ? : }
    diff --git a/src/app/components/elements/list-groups/AbstractListViewItem.tsx b/src/app/components/elements/list-groups/AbstractListViewItem.tsx index c01958ec69..701fefa5be 100644 --- a/src/app/components/elements/list-groups/AbstractListViewItem.tsx +++ b/src/app/components/elements/list-groups/AbstractListViewItem.tsx @@ -5,7 +5,7 @@ import { ViewingContext} from "../../../../IsaacAppTypes"; import classNames from "classnames"; import { Badge, Button, Col, ListGroupItem } from "reactstrap"; import { CompletionState, GameboardDTO } from "../../../../IsaacApiTypes"; -import { below, isDefined, isPhy, isTeacherOrAbove, siteSpecific, Subject, useDeviceSize } from "../../../services"; +import { above, below, isAda, isDefined, isPhy, isTeacherOrAbove, siteSpecific, Subject, useDeviceSize } from "../../../services"; import { PhyHexIcon } from "../svg/PhyHexIcon"; import { TitleIconProps } from "../PageTitle"; import { Markup } from "../markup"; @@ -161,9 +161,10 @@ export type AbstractListViewItemProps = { url?: string; state?: AbstractListViewItemState; className?: string; + hasCaret?: boolean; } & ALVIType & ALVILayout; -export const AbstractListViewItem = ({title, icon, subject, subtitle, breadcrumb, tags, fullWidth, url, state, className, ...typedProps}: AbstractListViewItemProps) => { +export const AbstractListViewItem = ({title, icon, subject, subtitle, breadcrumb, tags, fullWidth, url, state, className, hasCaret, ...typedProps}: AbstractListViewItemProps) => { const deviceSize = useDeviceSize(); const user = useAppSelector(selectors.user.orNull); @@ -176,19 +177,20 @@ export const AbstractListViewItem = ({title, icon, subject, subtitle, breadcrumb fullWidth = fullWidth || below["sm"](deviceSize) || (isItem && !(typedProps.status || typedProps.audienceViews)); const cardBody =
    -
    - {icon && ( - icon.type === "img" ? +
    + {icon &&
    + {icon.type === "img" ? {icon.alt : icon.type === "hex" ? : icon.type === "placeholder" ?
    - : undefined - )} - {isItem && typedProps.status && typedProps.status === CompletionState.ALL_CORRECT &&
    + : undefined} + {icon.label && above['sm'](deviceSize) &&
    {icon.label}
    } +
    } + {isPhy && isItem && typedProps.status && typedProps.status === CompletionState.ALL_CORRECT &&
    } {isGameboard && typedProps.board?.contents && }
    -
    +
    {url && !isDisabled ? (url.startsWith("http") @@ -205,7 +207,7 @@ export const AbstractListViewItem = ({title, icon, subject, subtitle, breadcrumb } {isItem && <> {typedProps.quizTag && {typedProps.quizTag}} - {isPhy && } + }
    {subtitle &&
    @@ -217,10 +219,10 @@ export const AbstractListViewItem = ({title, icon, subject, subtitle, breadcrumb {isItem && fullWidth && typedProps.audienceViews &&
    } - {tags?.includes("llm_question_page") &&
    + {tags?.includes("llm_question_page") &&
    } - {isItem && fullWidth && typedProps.status && typedProps.status !== CompletionState.ALL_CORRECT && + {isPhy && isItem && fullWidth && typedProps.status && typedProps.status !== CompletionState.ALL_CORRECT && } {isGameboard && fullWidth && isTeacherOrAbove(user) &&
    @@ -236,9 +238,9 @@ export const AbstractListViewItem = ({title, icon, subject, subtitle, breadcrumb {!fullWidth && <> - {isItem && typedProps.status && typedProps.status !== CompletionState.ALL_CORRECT && } + {isPhy && isItem && typedProps.status && typedProps.status !== CompletionState.ALL_CORRECT && } {isItem && typedProps.audienceViews &&
    0})}> - +
    } {isGameboard && isTeacherOrAbove(user) && @@ -248,6 +250,9 @@ export const AbstractListViewItem = ({title, icon, subject, subtitle, breadcrumb } } + {hasCaret &&