Add per-course xSpacing/ySpacing for scaffold reset layout#115
Conversation
|
@copilot please resolve the merge conflicts. |
…for-spacing # Conflicts: # frontend/src/main/components/Courses/TabComponent/ScaffoldTabComponent.jsx # frontend/src/stories/components/Courses/TabComponents/ScaffoldTabComponent.stories.jsx # frontend/src/tests/components/Courses/TabComponent/ScaffoldTabComponent.test.jsx
Resolved in 97d79b9 — merged origin/main. The reset-scaffold button/mutation removed from ScaffoldTabComponent by the "move to footer" PR was dropped from this branch too (it's dead code here now); kept the spacing fields and updated their story/test mocks accordingly. Verified full frontend ( |
|
@copilot please take care of the ci/ci failures |
Fixed in 400d3... (pitest mutation coverage was 99%; a surviving mutant on the |
POST /api/course/scaffold/resetlaid out top-level concepts using hardcoded pixel spacing (350 horizontal, 300 vertical), with no way for instructors to adjust it.Backend
xSpacing/ySpacingint columns toCourse, defaulting toConceptGraphService.MIN_HORIZONTAL_SEPARATION/VERTICAL_LEVEL_SEPARATION(350/300) — the same constants the layout algorithm already used042-add-spacing-to-course.jsonbackfilling existing courses with those defaultsConceptGraphService.reset(...)with an overload taking explicit xSpacing/ySpacing (existing overloads untouched, so default-spacing callers/tests are unaffected)POST /api/course/scaffold/resetnow reads the course's spacing and passes it through instead of using the constants directlyPUT /api/course/scaffold/spacing(courseId,xSpacing,ySpacing) to update these values, rejecting non-positive inputxSpacing/ySpacingonInstructorCourseViewso the frontend can show current valuesFrontend
ScaffoldTabComponentnow fetches the course and renders editable X/Y Spacing fields with an "Update Spacing" button