syncScroll("top")} ref={topScrollbarRef} style={{ height: scrollbarSize }}
>
diff --git a/src/app/components/elements/inputs/StyledTabPicker.tsx b/src/app/components/elements/inputs/StyledTabPicker.tsx
index 9c65edbfd5..ddd922291e 100644
--- a/src/app/components/elements/inputs/StyledTabPicker.tsx
+++ b/src/app/components/elements/inputs/StyledTabPicker.tsx
@@ -4,6 +4,7 @@ import { Label, Input } from "reactstrap";
import { isDefined } from "../../../services";
import { Spacer } from "../Spacer";
import classNames from "classnames";
+import { Link } from "react-router-dom";
/**
* @typedef {Object} StyledTabPickerProps
@@ -13,20 +14,40 @@ import classNames from "classnames";
* @property {React.ChangeEventHandler
} [onInputChange] - The function to call when the tab is clicked.
* @property {ReactNode} checkboxTitle - The title of the tab.
* @property {number} [count] - The number to display on the tab.
+ * @property {"left" | "right"} [indicatorPosition] - The position of the indicator.
+ * @property {Object} [suffix] - An optional suffix to display on the tab.
+ * @property {"checkbox" | "radio" | "link"} type - The type of the tab picker.
+ * @property {string} [to] - The URL to navigate to when the tab is clicked (only for type "link").
*/
-interface StyledTabPickerProps extends React.HTMLAttributes {
+type StyledTabPickerProps = React.HTMLAttributes & {
checked?: boolean;
disabled?: boolean;
onInputChange?: React.ChangeEventHandler | undefined;
checkboxTitle: ReactNode;
count?: number;
+ indicatorPosition?: "left" | "right";
suffix?: {
icon: string;
action?: (e: React.MouseEvent) => void;
info: string;
}
-}
+} & ({
+ type?: "checkbox" | "radio";
+ to?: never;
+} | {
+ type: "link";
+ to: string;
+})
+
+const PickerContents = ({checkboxTitle, count, suffix, disabled}: Pick) => <>
+ {checkboxTitle}
+ {isDefined(count) && {count}}
+
+ {suffix && }
+>;
/**
* A StyledTabPicker component, used to render a list of selectable tabs, each with a title and optional counter (as to indicate how many options selecting that would provide).
@@ -38,13 +59,18 @@ interface StyledTabPickerProps extends React.HTMLAttributes {
export const StyledTabPicker = (props: StyledTabPickerProps): JSX.Element => {
const { checked, disabled, onInputChange, checkboxTitle, count, suffix, ...rest } = props;
const id = checkboxTitle?.toString().replace(" ", "-");
- return
+ ;
+};
diff --git a/src/app/components/pages/AssignmentProgressGroup.tsx b/src/app/components/pages/AssignmentProgressGroup.tsx
index 5862200aeb..05850525f7 100644
--- a/src/app/components/pages/AssignmentProgressGroup.tsx
+++ b/src/app/components/pages/AssignmentProgressGroup.tsx
@@ -21,7 +21,7 @@ import {RegisteredUserDTO} from '../../../IsaacApiTypes';
import {Link, useLocation} from 'react-router-dom';
import {Spacer} from '../elements/Spacer';
import {formatDate} from '../elements/DateString';
-import {Badge, Button, Card, CardBody, Col, Container, Input, Label, Row} from 'reactstrap';
+import {Badge, Button, Card, CardBody, Col, Input, Label, Row} from 'reactstrap';
import {TitleAndBreadcrumb} from '../elements/TitleAndBreadcrumb';
import {downloadLinkModal} from '../elements/modals/AssignmentProgressModalCreators';
import {InlineTabs} from '../elements/InlineTabs';
@@ -30,6 +30,8 @@ import {Loading} from '../handlers/IsaacSpinner';
import {skipToken} from '@reduxjs/toolkit/query';
import classNames from 'classnames';
import { useHistoryState } from '../../state/actions/history';
+import { PageContainer } from '../elements/layout/PageContainer';
+import { MyAdaSidebar } from '../elements/sidebar/MyAdaSidebar';
const AssignmentLikeLink = ({assignment}: {assignment: EnhancedAssignment | AppQuizAssignment}) => {
const dispatch = useAppDispatch();
@@ -109,13 +111,19 @@ export const AssignmentProgressGroup = ({user, group}: {user: RegisteredUserDTO,
const filteredAssignments = assignmentLikeListing?.filter(al => (isQuiz(al) ? al.quizSummary?.title : al.gameboard?.title)?.toLowerCase().includes(searchText.toLowerCase()));
- return
-
-
+ return
+ }
+ sidebar={siteSpecific(
+ null,
+
+ )}
+ >
{isPhy &&
Back to assignment progress
@@ -215,7 +223,7 @@ export const AssignmentProgressGroup = ({user, group}: {user: RegisteredUserDTO,
- ;
+ ;
};
diff --git a/src/app/components/pages/AssignmentProgressGroupsListing.tsx b/src/app/components/pages/AssignmentProgressGroupsListing.tsx
index 23db54df5a..a8a8c966da 100644
--- a/src/app/components/pages/AssignmentProgressGroupsListing.tsx
+++ b/src/app/components/pages/AssignmentProgressGroupsListing.tsx
@@ -1,6 +1,6 @@
import React, {useCallback, useContext, useState} from "react";
import {openActiveModal, useAppDispatch} from "../../state";
-import {Card, CardBody, Col, Container, Label, Row} from "reactstrap";
+import {Card, CardBody, Col, Label, Row} from "reactstrap";
import sortBy from "lodash/sortBy";
import {AppGroup, AssignmentProgressPageSettingsContext} from "../../../IsaacAppTypes";
import {TitleAndBreadcrumb} from "../elements/TitleAndBreadcrumb";
@@ -24,6 +24,8 @@ import {SearchInputWithIcon} from "../elements/SearchInputs";
import {StyledDropdown} from "../elements/inputs/DropdownInput";
import classNames from "classnames";
import { PageMetadata } from "../elements/PageMetadata";
+import { PageContainer } from "../elements/layout/PageContainer";
+import { MyAdaSidebar } from "../elements/sidebar/MyAdaSidebar";
export const GroupAssignmentProgress = ({group, user}: {group: AppGroup, user: RegisteredUserDTO}) => {
const dispatch = useAppDispatch();
@@ -66,11 +68,18 @@ export const AssignmentProgressGroupsListing = ({user, groups}: {user: Registere
const {groupSortOrder, setGroupSortOrder} = pageSettings ?? {};
return <>
-
-
+
+ }
+ sidebar={siteSpecific(
+ null,
+
+ )}
+ >
@@ -130,6 +139,6 @@ export const AssignmentProgressGroupsListing = ({user, groups}: {user: Registere
/>
-
+
>;
};
diff --git a/src/app/components/pages/Groups.tsx b/src/app/components/pages/Groups.tsx
index 0ce0e824ef..05e4086680 100644
--- a/src/app/components/pages/Groups.tsx
+++ b/src/app/components/pages/Groups.tsx
@@ -6,7 +6,6 @@ import {
CardBody,
CardProps,
Col,
- Container,
DropdownItem,
DropdownMenu,
DropdownToggle,
@@ -65,8 +64,9 @@ import {StyledCheckbox} from "../elements/inputs/StyledCheckbox";
import { StyledTabPicker } from "../elements/inputs/StyledTabPicker";
import { PageMetadata } from "../elements/PageMetadata";
import { GroupsSidebar } from "../elements/sidebar/GroupsSidebar";
-import { IconButton } from "../elements/AffixButton";
+import { MyAdaSidebar } from "../elements/sidebar/MyAdaSidebar";
import { PageContainer } from "../elements/layout/PageContainer";
+import { IconButton } from "../elements/AffixButton";
enum SortOrder {
Alphabetical = "Alphabetical",
@@ -619,8 +619,10 @@ export const Groups = ({user}: {user: RegisteredUserDTO}) => {
;
- const GroupsAda =
-
+ const GroupsAda = }
+ sidebar={}
+ >
{!isEmptyState ?
<>
@@ -646,13 +648,13 @@ export const Groups = ({user}: {user: RegisteredUserDTO}) => {
You need a student group before you can assign quizzes and tests in {SITE_TITLE_SHORT}.
-
}
- ;
+ ;
return siteSpecific(GroupsPhy, GroupsAda);
};
diff --git a/src/app/components/pages/MyAccount.tsx b/src/app/components/pages/MyAccount.tsx
index d0666d1dd5..9ef9eef417 100644
--- a/src/app/components/pages/MyAccount.tsx
+++ b/src/app/components/pages/MyAccount.tsx
@@ -60,8 +60,10 @@ import {ExigentAlert} from "../elements/ExigentAlert";
import {Loading} from '../handlers/IsaacSpinner';
import {UserAccessibilitySettings} from '../elements/panels/UserAccessibilitySettings';
import {showEmailChangeModal} from "../elements/modals/EmailChangeModal";
-import { MyAccountSidebar } from '../elements/sidebar/MyAccountSidebar';
import { PageContainer } from '../elements/layout/PageContainer';
+import { MyAccountSidebar } from '../elements/sidebar/MyAccountSidebar';
+import { MyAdaSidebar } from '../elements/sidebar/MyAdaSidebar';
+import { FeatureFlag, useFeatureFlag } from '../../services/featureFlag';
// Avoid loading the (large) QRCode library unless necessary:
const UserMFA = lazy(() => import("../elements/panels/UserMFA"));
@@ -317,13 +319,15 @@ export const MyAccount = ({user}: AccountPageProps) => {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [activeTab]);
+ const isInsideAdaSidebar = useFeatureFlag(FeatureFlag.ENABLE_ADA_SIDEBARS);
+
return