Create utility function for dashtable_v2.js file that creates the student objects array that get passed into the React Table
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, next.js, react
- Lĩnh vực
- frontend
Hướng nghiên cứu
Bắt đầu bằng cách đọc mapping rawStudentSummary trong components/dashtable_v2.js và lần theo cách pages/dashboard/v2/[id].js cung cấp studentData. Sau đó kiểm tra api_processor.js cùng các helper hoặc import hiện có trước khi kiểm tra cách bảng sử dụng email, activity, progress và details. Hoàn tất khi mapping được utility xử lý mà không thay đổi dữ liệu được hiển thị hoặc hành vi của dashboard.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
[ISSUE RESERVED FOR CTI STUDENT(S)]
Issue Background Info
This issue is a 'under the hood' issue, meaning, when the change is implemented, there will be no indication of the change in the UI. This implementation will allow for more readable code (encapsulated and abstracted).
Expected New Behavior
Although there will be no visible change for the end user(s) in the UI, this change should allow for improved code readability.
Issue Objective
Create a function in api_processor.js that handles the logic to create the array of student data objects that gets stored in the rawStudentSummary variable, which is passed into the react-table.
Context for the issue
When a teacher clicks 'View Class' they are shown a snapshot of all the students' progress in the classroom (dashboard format).
This is the GlobalDashboardTable component being rendered (component code can be found in components/dashtable_v2.js), the file that calls the GlobalDashboardTable component is [id].js (found in pages/dashboard/v2/[id].js).
A third party library called 'react-table' is used to create the dashboard. The data that is passed into the react-table is stored in the rawStudentSummary variable found in the dashtable_v2.js file.
let rawStudentSummary = props.studentData.map(studentJSON => { ....
This variable stores an array of objects where each object contains the following attributes: email, activity, progress and details.
This is what the react-table ultimately uses as the data represented in the dashboard.
const data = React.useMemo(
() => mapData(rawStudentSummary),
[rawStudentSummary]
);
Pseudocoe example:
dashtable_v2.js:
let rawStudentSummary = createArrayOfStudentDataObjectsToPassIntoReactTable(props.studentData)
api_processor.js:
function createArrayOfStudentDataObjectsToPassIntoReactTable(allStudentJSON) {
let reactTableStudentDataArrayOfObjects = allStudentJSON => { individualJSON
let dashboardDataObj = { email: '', activity '', progress: '', details: '' }
dashboardDataObj.email = individualJSON.email
dashboardDataObj.activity = getActivity(individualJSON) // create this function in api_processor.js
dashboardDataObj.progress = getProgress(indivudalJSON) // create this function in api_processor.js
dashboardDataObj.details = getDetailsPageLink(indivudalJSON) // create this function in api_processor.js
}
return reactTableStudentDataArrayOfObjects;
}
Resources
-
react-table library:
-
Next.js Pages Documentation (not necessarily needed for the task, but may provide additional context)
- Ngôn ngữ chính
- TypeScript
- Star
- 156
- Fork
- 143
- Merge trung bình
- 11 giờ 47 phút
- Pull request đã merge (30 ngày)
- 50
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của freeCodeCamp/classroom
-
Follow-ups from toolchain and local dx workCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 Hơn một tuần Mức phù hợp với người mới 15/100
freeCodeCamp/classroom#640 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Feature: Improve teacher feedback for fetch failures and empty classroomsCó thể làm lại được @NewtonLC đã nhận 161 ngày trước và không có pull request nào đang mở. Đang mở
freeCodeCamp/classroom#606 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feat(UI): Enhancement to the admin dashboard page issue - search barCó thể làm lại được @gauravi-2007 đã nhận 48 ngày trước và không có pull request nào đang mở. Đang mở
freeCodeCamp/classroom#550 · 8 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Feature Request: Enable Exporting Student Progress Data (CSV/PDF)Có thể làm lại được @gauravi-2007 đã nhận 48 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 32/100
freeCodeCamp/classroom#547 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ToS + privacyCó thể làm lại được @raisedadead đã nhận 586 ngày trước và không có pull request nào đang mở. Đang mở
freeCodeCamp/classroom#544 · 2 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của freeCodeCamp/classroom
Issue tương tự
-
Resources: New templates of Beijing SubwayCó thể đã có người làm @rmt-svc đã nhận hôm nay. Đang mởresources
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
railmapgen/rmg-templates#2726 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
homarr-labs/homarr#7729 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Buzzpy/Dev-Encyclopedia#218 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
prio:low status:done type:content
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
davidsneighbour/samui-samui.de#1925 ·