kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Channel > Delete a single resource - "All Resources selected" flag text is visible next to the selected single resource

Open metodimilevqa opened this issue 6 years ago • 6 comments

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.

2020-10-26_163721

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

  1. Login as a super admin user
  2. Go to Device > Channels
  3. Click the Manage button of a channel
  4. Browse down to a page with single resources
  5. Select a single resource
  6. 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)

metodimilevqa avatar Oct 27 '20 12:10 metodimilevqa

@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).

jonboiser avatar Oct 27 '20 19:10 jonboiser

Does not look like we have "Selected" alone anywhere as its own string. @metodimilevqa your suggestion of "Resource selected" seems fine to me

khangmach avatar Oct 27 '20 19:10 khangmach

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

  1. When selecting a single resource during an import or export workflow, the right hand annotation says "Resource selected"
  2. When selecting a topic, the current behavior is the same, and the the annotation says "All resources selected"

jonboiser avatar Oct 27 '20 20:10 jonboiser

This issue is still not resolved. So I would like to work on this issue.

ayu023ban avatar Mar 14 '21 06:03 ayu023ban

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

  1. When selecting a single resource during an import or export workflow, the right hand annotation says "Resource selected"
  2. 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')

kmrinal19 avatar Mar 23 '21 19:03 kmrinal19

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')

jonboiser avatar Mar 23 '21 19:03 jonboiser