kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

New icon is shown in channel when a resource was deleted.

Open cpauya opened this issue 4 years ago • 4 comments

Observed behavior

When a resource is deleted, there is a New icon shown in the channel name.

This "New" icon is removed when the Clear completed link is clicked.

kolibri-v0 13 2-b1--deleting a resource puts a New icon in a channel

Expected behaviour

Show a different icon when a resource is deleted in a channel. The New is more for new (or updated) contents.

User-facing consequences

The New icon is confusing with the delete action.

Steps to reproduce

  1. Install Kolibri v0.13.2-beta1 in Ubuntu 16.04.6 VM
  2. Use Firefox then import a channel
  3. Delete a resource within the topic tree of the channel. Follow this Gherkin scenario for an example.
  4. After the resource is deleted, DO NOT click the Clear or Clear completed buttons.
  5. Click the Back to channels link.
  6. Notice the "New" icon in the channel name.

Fix Acceptance Criteria (added by @nucleogenesis )

  • [ ] Add "Updated" label and string
  • [ ] Ensure that the label is not hidden when the task is cleared

Context

  • Kolibri version: Kolibri v0.13.2-beta1
  • Operating system: Ubuntu 16.04.6 VM (2GB RAM, 2CPUs, 64GB disk)
  • Browser: Firefox v74.0

cpauya avatar Mar 31 '20 16:03 cpauya

thanks, agreed

indirectlylit avatar Apr 07 '20 17:04 indirectlylit

When a resource is deleted from a channel by a user, is there a need to indicate it on the channel? I think the 'new' tag that appears as shown above shouldn't appear at all

riddhiavlani avatar Jul 22 '21 05:07 riddhiavlani

that sounds fine to me and the easiest change

an alternative would be a new label like 'Updated' which could apply to all updates, not just additions

indirectlylit avatar Jul 22 '21 13:07 indirectlylit

Yes, 'Updated' label for any sort of edit to the channel resources would work better: Frame 1 (4).png

riddhiavlani avatar Jul 23 '21 06:07 riddhiavlani

I think it probably is - you will need to follow the steps for replication to confirm your fix, so make sure to do it before you change any code to confirm!

rtibbles avatar Jan 26 '23 20:01 rtibbles

@nucleogenesis I've set up the codebase and started working on this issue. Kindly assign it to me

tripathics avatar Apr 01 '23 13:04 tripathics

Hi @tripathics, thank you for your interest, I'm assigning you. Please note that this is a time-sensitive issue since we'd like to have it in the next release, so it's possible that at some point one of the team members will need to resolve it.

MisRob avatar Apr 03 '23 06:04 MisRob

Hi @tripathics, thank you for your interest, I'm assigning you. Please note that this is a time-sensitive issue since we'd like to have it in the next release, so it's possible that at some point one of the team members will need to resolve it.

@MisRob what should the new icon say for removed resources? I was thinking of Resources removed but that seemed very long. I also thought of having no icon at all. Kindly let me know

tripathics avatar Apr 03 '23 06:04 tripathics

@tripathics Please do not add new strings, this issue is planned for the next release, and due to some internal process in regard to translation, we can't add new strings at this point. According to one of the comments above (https://github.com/learningequality/kolibri/issues/6730#issuecomment-885430580), it should say "Updated". We already have that string in our codebase, however, it seems to be in different plugins. There'd be more ways to approach it and I'd like to check on it with the team before we proceed here, so please wait for the reply.

MisRob avatar Apr 03 '23 07:04 MisRob

@tripathics So we decided it'd be best to simply add the new "Update" string and include this issue in some of the later releases. However, it may take us a couple of weeks to merge your pull request as we can't be merging work with new strings into develop at this point. If you don't mind, feel free to start working on it.

If you haven't done so already, please have a look at our developer documentation. For this particular issue, it may be helpful to read through the Internationalization section. This issue is to be resolved on the develop branch so please open a pull request into develop. If you have any problems running Kolibri locally or have questions, you can use the comments section on this page. As part of your pull request, you're welcome to add yourself to the list of contributors in AUTHORS.md file.

MisRob avatar Apr 04 '23 14:04 MisRob

Thank you for the feedback @MisRob .

tripathics avatar Apr 04 '23 15:04 tripathics

@tripathics You're welcome, let me know if you needed anything

MisRob avatar Apr 05 '23 10:04 MisRob

@MisRob I have my exams going this week. So I will be submitting the PR after that. If anyone is interested, please let them contribute. Else I'll be available after this week

tripathics avatar Apr 05 '23 11:04 tripathics

Sure, thank you for letting us know. No problem at all, as mentioned this would be waiting for merge anyways. Good luck with your exams.

MisRob avatar Apr 05 '23 11:04 MisRob

Is this issue still open? I would like to contribute on it.

nikkuAg avatar Sep 05 '23 06:09 nikkuAg

Sure - I'll assign you.

rtibbles avatar Sep 11 '23 15:09 rtibbles

@rtibbles Is this issue still reproducible? When i delete a resource i dont see a Back to channels link

thesujai avatar Sep 14 '23 09:09 thesujai

You're right the 'back to channels' link is no longer there - but pressing the X in the top left of the immersive page layout should have the same effect.

I have updated the issue description to reflect this!

rtibbles avatar Sep 14 '23 16:09 rtibbles

@rtibbles I am seeing no such icons: Screencast from 18-09-23 10:55:11 AM IST.webm

I dont even see new when downloading new channel

thesujai avatar Sep 18 '23 05:09 thesujai

Hi @thesujai - It does look from your screencast that the new label is missing. As a next step, you could look for where that new label is referenced in the Vue component, and check the logic, as it would need to be updated to resolve this bug. I'm guessing there is probably one or more v-if statements and some computed values that determine the conditions when this should be displayed. We do want the new label to appear when downloading a new channel, but not when deleting a resource from the channel.

Let us know if you have and more questions! Hopefully this is able to unblock you here :)

marcellamaki avatar Sep 18 '23 16:09 marcellamaki

When I run the command yarn run devserver the server is not working. It is showing uncaught referenceerror: kolibricoreappglobal is not defined, it was working before but suddenly it has started showing this error and the webpage is stuck on loading icon.

nikkuAg avatar Sep 20 '23 16:09 nikkuAg

@nikkuAg Replied in https://github.com/learningequality/kolibri/pull/11191

MisRob avatar Sep 21 '23 04:09 MisRob

Hey @marcellamaki, I tried debugging it and what is observed was the new label was dependend on prop showNewLabel. and whether that prop is true or not depends on this condition https://github.com/learningequality/kolibri/blob/release-v0.16.x/kolibri/plugins/device/assets/src/views/ManageContentPage/index.vue#L208 The taskIndex is always -1 for all the channel(new or not), so the condition always becomes false and the new label are never shown no matter the channel is new or not

thesujai avatar Oct 12 '23 12:10 thesujai

Hi @thesujai - it seems like you were able to do some great debugging! That does seem like an incorrect condition for the showNewLabel prop. Do you have any specific questions I can help with?

Otherwise, you might look into kolibri/plugins/device/assets/src/modules/manageContent/index.js, where installedChannelsWithResources is defined. There have been some changes to our tasks in the last months, so it's possible that there need to be some adjustments in how we are creating the task index. Seeing what is returned with each channel, and the various tasks and task statuses, could be a good next step.

marcellamaki avatar Oct 24 '23 19:10 marcellamaki

@marcellamaki ok looking into it

thesujai avatar Oct 25 '23 16:10 thesujai

What could be the logic to show updateBadge, i see for showing newBadge we check whether the task type is not of type DISKCONTENTEXPORT or DISKEXPORT or DELETECHANNEL. So shall i consider it to be TaskTypes.UPDATECHANNEL? Is there any documentaion to this?

thesujai avatar Nov 01 '23 21:11 thesujai

What could be the logic to show updateBadge, i see for showing newBadge we check whether the task type is not of type DISKCONTENTEXPORT or DISKEXPORT or DELETECHANNEL. So shall i consider it to be TaskTypes.UPDATECHANNEL? Is there any documentaion to this?

Hi @thesujai, I am not sure if you still need some guidance as there's already a pull request. Let us know if there's something needed.

MisRob avatar Nov 10 '23 08:11 MisRob

@thesujai @rtibbles @bjester Can this issue be closed now after https://github.com/learningequality/kolibri/pull/11484 or is there some more work?

MisRob avatar Dec 07 '23 14:12 MisRob

I think with #11484 merged this issue should now be replicable should it still exist (which I imagine it probably does). So this can still be worked on!

rtibbles avatar Dec 07 '23 14:12 rtibbles

@rtibbles how would suggest for this logic to be implemented? Currently new badge is shown based on task list, should update also follow similar pattern?

thesujai avatar Dec 07 '23 14:12 thesujai