From 063ff744202a9e607486388bb95bd1f1561fd822 Mon Sep 17 00:00:00 2001 From: Floris Kornelis van Dijken Date: Wed, 22 May 2024 02:45:18 +0200 Subject: [PATCH 1/7] done --- frontend/src/pages/index/components/CourseCard.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/index/components/CourseCard.tsx b/frontend/src/pages/index/components/CourseCard.tsx index 3c509b16..86b1e6e1 100644 --- a/frontend/src/pages/index/components/CourseCard.tsx +++ b/frontend/src/pages/index/components/CourseCard.tsx @@ -7,6 +7,7 @@ import { useNavigate } from "react-router-dom" import { AppRoutes } from "../../../@types/routes" import GroupProgress from "./GroupProgress" import { CourseProjectsType } from "./CourseSection" +import { Link } from "react-router-dom" const CourseCard: FC<{ courseProjects: CourseProjectsType[string], adminView?:boolean }> = ({ courseProjects,adminView }) => { const { t } = useTranslation() @@ -74,10 +75,16 @@ const CourseCard: FC<{ courseProjects: CourseProjectsType[string], adminView?:bo />, ]} > - {project.name}} /> + event.stopPropagation()}> + {project.name} + }/> )} - > + > + {courseProjects.projects.length > 0 && ...} + ) } From cea07e94dcf7ea2f992c4ab63545c18ba63366bb Mon Sep 17 00:00:00 2001 From: Floris Kornelis van Dijken Date: Wed, 22 May 2024 02:46:15 +0200 Subject: [PATCH 2/7] debug dingen veranderd --- frontend/src/pages/index/components/CourseCard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/index/components/CourseCard.tsx b/frontend/src/pages/index/components/CourseCard.tsx index 86b1e6e1..7cbda045 100644 --- a/frontend/src/pages/index/components/CourseCard.tsx +++ b/frontend/src/pages/index/components/CourseCard.tsx @@ -83,7 +83,7 @@ const CourseCard: FC<{ courseProjects: CourseProjectsType[string], adminView?:bo )} > - {courseProjects.projects.length > 0 && ...} + {courseProjects.projects.length > 3 && ...} ) From f4adc8d9f23e55f35134b2e5c277432fbb807c5d Mon Sep 17 00:00:00 2001 From: Aqua-sc <108478185+Aqua-sc@users.noreply.github.com> Date: Wed, 22 May 2024 10:01:12 +0200 Subject: [PATCH 3/7] Fix test --- .gitignore | 1 + .../pidgeon/controllers/GroupFeedbackControllerTest.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 9a182e36..87feac74 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,4 @@ docker.env startBackend.sh /.env +backend/web-bff/App/.env diff --git a/backend/app/src/test/java/com/ugent/pidgeon/controllers/GroupFeedbackControllerTest.java b/backend/app/src/test/java/com/ugent/pidgeon/controllers/GroupFeedbackControllerTest.java index df28a51d..dce45290 100644 --- a/backend/app/src/test/java/com/ugent/pidgeon/controllers/GroupFeedbackControllerTest.java +++ b/backend/app/src/test/java/com/ugent/pidgeon/controllers/GroupFeedbackControllerTest.java @@ -281,7 +281,7 @@ public void testAddGroupScore() throws Exception { when(groupFeedbackUtil.checkGroupFeedbackUpdate(groupFeedbackEntity.getGroupId(), groupFeedbackEntity.getProjectId(), getMockUser(), HttpMethod.POST)) .thenReturn(new CheckResult<>(HttpStatus.OK, "", null)); when(groupFeedbackUtil.checkGroupFeedbackUpdateJson(argThat( - json -> json.getScore() == groupFeedbackEntity.getScore() && json.getFeedback().equals(groupFeedbackEntity.getFeedback())), eq(groupFeedbackEntity.getProjectId()))) + json -> Objects.equals(json.getScore(), groupFeedbackEntity.getScore()) && json.getFeedback().equals(groupFeedbackEntity.getFeedback())), eq(groupFeedbackEntity.getProjectId()))) .thenReturn(new CheckResult<>(HttpStatus.OK, "", null)); when(groupFeedbackRepository.save(any())).thenReturn(groupFeedbackEntity); when(entityToJsonConverter.groupFeedbackEntityToJson(groupFeedbackEntity)).thenReturn(groupFeedbackJson); @@ -292,7 +292,7 @@ public void testAddGroupScore() throws Exception { .andExpect(content().contentType(MediaType.APPLICATION_JSON)) .andExpect(content().json(objectMapper.writeValueAsString(groupFeedbackJson))); verify(groupFeedbackRepository, times(1)).save(argThat( - groupFeedback -> groupFeedback.getScore() == groupFeedbackEntity.getScore() && + groupFeedback -> Objects.equals(groupFeedback.getScore(), groupFeedbackEntity.getScore()) && groupFeedback.getFeedback().equals(groupFeedbackEntity.getFeedback()) && groupFeedback.getGroupId() == groupFeedbackEntity.getGroupId() && groupFeedback.getProjectId() == groupFeedbackEntity.getProjectId())); From 8954d717782850bf968d88764cf367f5da6cdd95 Mon Sep 17 00:00:00 2001 From: Floris Kornelis van Dijken Date: Wed, 22 May 2024 11:47:33 +0200 Subject: [PATCH 4/7] added hovering, removed ellipsis --- frontend/src/pages/index/components/CourseCard.tsx | 10 ++++++++-- frontend/src/styles.css | 10 ++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/index/components/CourseCard.tsx b/frontend/src/pages/index/components/CourseCard.tsx index 7cbda045..b8adbc86 100644 --- a/frontend/src/pages/index/components/CourseCard.tsx +++ b/frontend/src/pages/index/components/CourseCard.tsx @@ -61,7 +61,13 @@ const CourseCard: FC<{ courseProjects: CourseProjectsType[string], adminView?:bo locale={{ emptyText: t("home.projects.noProjects") }} rowKey="projectId" renderItem={(project) => ( + event.stopPropagation()} + > event.stopPropagation()}> - {project.name} + {project.name} }/> + )} > - {courseProjects.projects.length > 3 && ...} ) diff --git a/frontend/src/styles.css b/frontend/src/styles.css index f5592199..9a16ddf7 100644 --- a/frontend/src/styles.css +++ b/frontend/src/styles.css @@ -256,4 +256,14 @@ html { .nav-logo { display: none; } +} + +.list-item-hover { + cursor: pointer; + transition: background-color 0.3s ease-in-out; + border-radius: 8px; +} + +.list-item-hover:hover { + background-color: #5a5a5a69; } \ No newline at end of file From 91702c141b7a47b49350ce05fce15e8be909cd00 Mon Sep 17 00:00:00 2001 From: usserwoutV2 Date: Wed, 22 May 2024 14:20:32 +0200 Subject: [PATCH 5/7] Fixed hover background for light mode --- frontend/src/pages/project/Project.tsx | 3 +-- frontend/src/styles.css | 10 +++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/frontend/src/pages/project/Project.tsx b/frontend/src/pages/project/Project.tsx index 1e9c0e1f..d1280f4b 100644 --- a/frontend/src/pages/project/Project.tsx +++ b/frontend/src/pages/project/Project.tsx @@ -7,7 +7,6 @@ import useCourse from "../../hooks/useCourse" import useProject from "../../hooks/useProject" import ScoreCard from "./components/ScoreTab" import { - CalendarOutlined, ClockCircleOutlined, DeleteOutlined, EyeInvisibleOutlined, EyeOutlined, FileDoneOutlined, @@ -25,7 +24,6 @@ import SubmissionsTab from "./components/SubmissionsTab" import MarkdownTextfield from "../../components/input/MarkdownTextfield" import useApi from "../../hooks/useApi" import i18n from "i18next"; -import useUser from "../../hooks/useUser"; // dracula, darcula,oneDark,vscDarkPlus | prism, base16AteliersulphurpoolLight, oneLight @@ -165,6 +163,7 @@ const Project = () => { return (
+ Date: Wed, 22 May 2024 14:22:05 +0200 Subject: [PATCH 6/7] Made dark theme hover background less light --- frontend/src/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/styles.css b/frontend/src/styles.css index f690a369..add7e3e0 100644 --- a/frontend/src/styles.css +++ b/frontend/src/styles.css @@ -265,7 +265,7 @@ html { } .dark-theme .list-item-hover:hover { - background-color: rgba(255 255 255 / 10%); + background-color: rgba(255 255 255 / 5%); } .light-theme .list-item-hover:hover { From 43af6cbdcd990f7f9b53b6311e93f9bd23c52abe Mon Sep 17 00:00:00 2001 From: Aqua-sc <108478185+Aqua-sc@users.noreply.github.com> Date: Wed, 22 May 2024 16:07:23 +0200 Subject: [PATCH 7/7] Full width coursecard highlight's on hover --- frontend/src/pages/index/components/CourseCard.tsx | 2 +- frontend/src/styles.css | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/index/components/CourseCard.tsx b/frontend/src/pages/index/components/CourseCard.tsx index b8adbc86..23dfa9bd 100644 --- a/frontend/src/pages/index/components/CourseCard.tsx +++ b/frontend/src/pages/index/components/CourseCard.tsx @@ -33,7 +33,7 @@ const CourseCard: FC<{ courseProjects: CourseProjectsType[string], adminView?:bo onClick={() => navigate(AppRoutes.COURSE.replace(":courseId", courseProjects.course.courseId.toString()))} type="inner" title={courseProjects.course.name} - style={{ width: 300,height:"100%" }} + style={{ width: 300, height:"100%" }} actions={[ 1? "home.projects.userCourseCount_plural": "home.projects.userCourseCount", { count: courseProjects.course.memberCount })}> diff --git a/frontend/src/styles.css b/frontend/src/styles.css index add7e3e0..81e97c2f 100644 --- a/frontend/src/styles.css +++ b/frontend/src/styles.css @@ -261,7 +261,8 @@ html { .list-item-hover { cursor: pointer; transition: background-color 0.15s ease-in-out; - border-radius: 8px; + width: 300px; + margin-left: -23px; } .dark-theme .list-item-hover:hover {