openedx / openedx/frontend-app-authoring

Add inactive state to "add existing" modal

Open
#2,737 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
17
Forks
218
Avg merge
9d 20h
Merged PRs (30d)
20

Description

Identified in this ticket: https://github.com/openedx/wg-build-test-release/issues/556

Description
The modal shown below appears in Content Libraries for adding existing content to containers or Collections.

Image

Current Behavior
Currently, the "Add to {container}" button is active, even if there is no content selected to be added. Clicking this button closes a modal and shows a toast that appears an error has occurred. See video:

https://github.com/user-attachments/assets/29b72445-1e98-46c2-b859-b58278847a37

Desired Behavior
The add button should be inactive until at least one component is selected. If all components are deselected, the button should return to an inactive state.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Content Libraries "add existing" modal described in the issue and trace how component selection controls the "Add to {container}" button. Verify the button is inactive with no selections, becomes active after selecting content, and becomes inactive again after all content is deselected.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.