Channel > Delete a single resource - "All Resources selected" flag text is visible next to the selected single resource
Observed behavior
There's some kind of discrepancy when the user tries to delete a single resource from a channel - the "All resources selected" flag text appears for the selected single resource which is not very relevant.
Expected behavior
When the user selects a single resource the flag text must be relevant to that selection. For example: "1 resource selected" or "Resource selected".
User-facing consequences
…
Errors and logs
…
Steps to reproduce
Preconditions: Resources imported
- Login as a super admin user
- Go to Device > Channels
- Click the Manage button of a channel
- Browse down to a page with single resources
- Select a single resource
- See the flag text next to the selected resource
Context
Kolibri 0.14.3 Raspberry Pi 4 OS: Raspbian GNU, Linux 10 Chrome (latest) + Firefox (latest)
@jtamiace Do you have any suggestions for what that label should say? I was thinking something like just "Selected" (Context: "Label for a single resource that is selected for a quiz, lesson, or other collection") would work for single resources (this would require adding a new user string).
Does not look like we have "Selected" alone anywhere as its own string. @metodimilevqa your suggestion of "Resource selected" seems fine to me
The main changes will need to be done in this module:
https://github.com/learningequality/kolibri/blob/42012dfb5423a09558758425ce3e1c97da8e379e/kolibri/plugins/device/assets/src/views/SelectContentPage/treeViewUtils.js#L7
The requirement is that
- When selecting a single resource during an import or export workflow, the right hand annotation says "Resource selected"
- When selecting a topic, the current behavior is the same, and the the annotation says "All resources selected"
This issue is still not resolved. So I would like to work on this issue.
The main changes will need to be done in this module:
https://github.com/learningequality/kolibri/blob/42012dfb5423a09558758425ce3e1c97da8e379e/kolibri/plugins/device/assets/src/views/SelectContentPage/treeViewUtils.js#L7
The requirement is that
- When selecting a single resource during an import or export workflow, the right hand annotation says "Resource selected"
- When selecting a topic, the current behavior is the same, and the the annotation says "All resources selected"
@jonboiser I think that we make use of existing strings by displaying the right hand annotation as "1 resource selected" when selecting single resource. This can be achieved by modifying the message attribute in return object of fullySelectedNode function in treeViewUtils.js module as:
message: node.is_leaf ? translator.$tr('resourcesSelected', { total: 1 }) : translator.$tr('allResourcesSelected')
I think the designers want the message "Resource selected" (no "1" in the message). So you can simply add a new message
resourceSelected: "Resource selected"
to that translator class, and then replace the annotation
message: node.is_leaf ? translator.$tr('resourceSelected') : translator.$tr('allResourcesSelected')