diff --git a/src/features/Dashboard/DashboardPage/index.scss b/src/features/Dashboard/DashboardPage/index.scss index 8e7b51ff..ac8c6c7e 100644 --- a/src/features/Dashboard/DashboardPage/index.scss +++ b/src/features/Dashboard/DashboardPage/index.scss @@ -23,11 +23,8 @@ min-height: 426px; } -.truncated-text { - width: 250px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; +.responsive { + display: none; } .schedule-section { @@ -60,4 +57,12 @@ .instructor-assign-section { min-height: 200px; } + + .no-responsive { + display: none; + } + + .responsive { + display: block; + } } diff --git a/src/features/Dashboard/InstructorAssignSection/ClassCard.jsx b/src/features/Dashboard/InstructorAssignSection/ClassCard.jsx index a46ce254..04a2fd3d 100644 --- a/src/features/Dashboard/InstructorAssignSection/ClassCard.jsx +++ b/src/features/Dashboard/InstructorAssignSection/ClassCard.jsx @@ -3,11 +3,12 @@ import { useHistory } from 'react-router-dom'; import PropTypes from 'prop-types'; import { Button } from 'react-paragon-topaz'; -import { Tooltip, OverlayTrigger } from '@edx/paragon'; import { formatDateRange } from 'helpers'; import { useInstitutionIdQueryParam } from 'hooks'; +import ToolTip from 'features/Dashboard/InstructorAssignSection/ToolTip'; + import 'features/Dashboard/InstructorAssignSection/index.scss'; const ClassCard = ({ data }) => { @@ -18,32 +19,28 @@ const ClassCard = ({ data }) => { history.push(addQueryParam(`/manage-instructors/${encodeURIComponent(data?.masterCourseId)}/${encodeURIComponent(data?.classId)}?previous=dashboard`)); }; + const classElement = 'className'; + const courseElement = 'courseName'; + return (
- - {data?.className} - - ) - } - > -

{data?.className}

-
- - {data?.masterCourseName} - - ) - } - > -

{data?.masterCourseName}

-
+
+ {data?.className.length > 20 ? ( + + ) : ( +

{data?.className}

+ )} + {data?.masterCourseName.length > 20 ? ( + + ) : ( +

{data?.masterCourseName}

+ )} +
+
+

{data?.className}

+

{data?.masterCourseName}

+
+

{formatDateRange(data.startDate, data?.endDate)}