Skip to content

Delete component that's used in a unit #1685

Closed
@bradenmacdonald

Description

@bradenmacdonald

This is different from:

When a component is used in a unit, it can also be viewed independently in the library or added to other units. When a user views it "elsewhere" (e.g. in the "Components" tab of the library or in another unit) and deletes it, it will be deleted from the unit as well.

Spec

When a component is used in a unit and the author browses to view it outside of the unit (e.g. in the "Components" tab or in a different unit) and deletes it:

  1. The user will see a confirmation dialog with a message like: "Warning: By deleting this component, you will also be deleting it from Unit XYZ".

    • List all units containing the component. If we're currently in a unit, the current unit doesn't have to be listed.
  2. A toast shows that the component was deleted, and allows the user to undo

  3. The library will show as having unpublished changes

  4. The unit will show as having unpublished changes

  5. The deleted component can no longer be seen in the Components tab nor in any units in the same library that used it.

  6. Courses using either the component or the unit are not immediately affected because the deletion hasn't been published.

  7. Then, when any of the following have happened:

    • The library is published ("publish all changes"),
    • The unit is published ("publish unit" -> affects all components in the unit),
    • Any other unit that contained the same component (if any) is published, or
    • The deletion of the component is published from the "Components" tab (this is theoretical; we have no UI for it but it could be implemented in the future)
  8. ... the unit will no longer show as having unpublished changes.

  9. Courses using either the component or the unit will see that an update is available, and when they sync the changes that component will disappear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions