Skip to content

feat(Authoring Tool): Drag and drop lessons and steps#2288

Merged
hirokiterashima merged 18 commits into
developfrom
project-authoring-drag-drop-mode
Mar 23, 2026
Merged

feat(Authoring Tool): Drag and drop lessons and steps#2288
hirokiterashima merged 18 commits into
developfrom
project-authoring-drag-drop-mode

Conversation

@hirokiterashima

@hirokiterashima hirokiterashima commented Mar 11, 2026

Copy link
Copy Markdown
Member

We add a new default mode to the authoring tool unit editing view, which allows the author to move lessons and steps using drag and drop. The existing behavior (choosing lesson(s) or step(s) using the checkbox and then choosing a new location) has been moved to what we now call "batch edit mode".

Notes

Please style as you see fit. Things we discussed:

  • hiding controls (e.g., add step button) while dragging
  • indenting drop preview to make it clear that the step will be dragged in a branch path

Changes (in the unit editing view in the AT)

  • Drag and drop lessons and steps in the default view
  • Toggle "batch edit mode". This is what the edit unit view used to be
  • Disable moving a branch step. We found a bug bug(Authoring Tool): Moving branch step breaks transition #2287 while working on this PR. We'll disable moving a branching step in default mode and batch edit mode to prevent authors from breaking their units.

Test

  • The new drag and drop feature works as expected. Test all scenarios (branch, inactive lessons, inactive nodes, etc)
  • Existing batch edit mode works as before

@hirokiterashima hirokiterashima self-assigned this Mar 11, 2026
@hirokiterashima hirokiterashima added the enhancement New feature of any size or improvement (UI, performance, security) label Mar 11, 2026
@qltysh

qltysh Bot commented Mar 11, 2026

Copy link
Copy Markdown

❌ 2 blocking issues (2 total)

Tool Category Rule Count
qlty Structure Function with many parameters (count = 7): constructor 2

private moveNodesService: MoveNodesService,
private projectService: TeacherProjectService,
private route: ActivatedRoute,
private router: Router

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function with many parameters (count = 7): constructor [qlty:function-parameters]

private moveNodesService: MoveNodesService,
private projectService: TeacherProjectService,
private route: ActivatedRoute,
private router: Router

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function with many parameters (count = 7): constructor [qlty:function-parameters]

@qltysh

qltysh Bot commented Mar 11, 2026

Copy link
Copy Markdown

Qlty

Coverage Impact

Unable to calculate total coverage change because base branch coverage was not found.

Modified Files with Diff Coverage (5)

RatingFile% DiffUncovered Line #s
New file Coverage rating: B
...-location/node-icon-and-title/node-icon-and-title.component.ts88.9%42
New file Coverage rating: F
src/assets/wise5/services/moveNodesService.ts100.0%
New file Coverage rating: D
...project-authoring-lesson/project-authoring-lesson.component.ts92.3%53
New file Coverage rating: B
...ool/project-authoring-step/project-authoring-step.component.ts100.0%
New file Coverage rating: D
...authoringTool/project-authoring/project-authoring.component.ts100.0%
Total94.7%
🤖 Increase coverage with AI coding...

In the `project-authoring-drag-drop-mode` branch, add test coverage for this new code:

- `src/assets/wise5/authoringTool/choose-node-location/node-icon-and-title/node-icon-and-title.component.ts` -- Line 42
- `src/assets/wise5/authoringTool/project-authoring-lesson/project-authoring-lesson.component.ts` -- Line 53

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@hirokiterashima hirokiterashima marked this pull request as ready for review March 11, 2026 21:38
@hirokiterashima hirokiterashima requested a review from breity March 11, 2026 21:38

@breity breity left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. 👍

I changed some styles, made some UI updates, and fixed most of the dragging visual bugs. Dragging to and from the unused sections still results in visual errors. But we decided to merge as is and re-design the unused section in a subsequent PR.

There's also still an issue dragging to/from the last lesson in the unit that prevents placing a step in certain positions in other lessons. Good to merge once this is fixed.

@hirokiterashima hirokiterashima merged commit 7070047 into develop Mar 23, 2026
4 checks passed
@hirokiterashima hirokiterashima deleted the project-authoring-drag-drop-mode branch March 23, 2026 17:17
@hirokiterashima

Copy link
Copy Markdown
Member Author

🎉 This PR is included in version 5.219.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature of any size or improvement (UI, performance, security) released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants