objecthub-io / ObjectHub

ObjectHub is an open repository for software objects and a development platform.
2 stars 1 forks source link

Pin button could toggle if object is pinned or not #269

Open panditthecoder opened 7 years ago

panditthecoder commented 7 years ago

when you click on the 'pin' icon on the edit pane, it causes the object to be listed in the 'pin' tab. all well and good as that what it is supposed to do. However, if you click on the 'pin' icon again, it will add another entry for the same object in the 'pin' tab. should validate if the object is already listed and if so, then do not add it again (unless, the design is that it should be there multiple times and i am missing something :-) ) inage attached. micro_app_fork_pin_issue

panditthecoder commented 7 years ago

unfortunately there's more. once an object is listed multiple times in the pin tab,

(BTW, why is it icon/button named 'delete' ? on the other screen it is 'trash' - should be consistant but i am not opening a new bug for this - in case you do need a bug to track the change, let me know or just open another one)

panditthecoder commented 7 years ago

OK. during the time i was typing up the bug, the screen seems to have refreshed itself and the deleted app no longer show up in the 'My Objects' and 'recent' tab. so you can mark that off as a slow refresh issue.

so bottom line

objecthub-io commented 7 years ago

Thank you for reporting this issue.

The [Delete] button in Pins should only remove the object from the pins. So we will see if we can rename it. Also there comes a popup before deletion, which should not appear.

panditthecoder commented 7 years ago

ok - so a suggestion and a question

objecthub-io commented 7 years ago

That sounds like a good idea!

So you are saying that once you remove an object from the pins, it is removed from My Objects and Recent. Just tested it and for me it seems to only be removed from the pins!

panditthecoder commented 7 years ago

it did for me (removed the objects from the other tabs. retried it and it only removed from pins!!! not sure how i got the earlier result - tried various combinations to recreate it but was not able to do so.

objecthub-io commented 7 years ago

Okay, thank you for checking!

The button description in the pins tab should now be changed and no popup appear upon deletion of a pin.

panditthecoder commented 7 years ago

checked and yes, the label name has been changed (thx) and no popup appears. However, the original issue "clicking on 'pin' multiple times causes object to be listed multiple times in the 'pin' tab " has not been fixed as yet. Also, while checking the changes, i noticed that even though an object figures in the 'pinned' list, when i try to edit the object, the pin icon in the edit section is not highlighted. Can you ensure that the state of the pin in the edit section (where it has the links 'pin' 'fork' 'help') reflects whether the object is listed in the pin tab of the browser ? then you can use that as the toggle for whether to add an object to the pinned list or not.

objecthub-io commented 7 years ago

Thank you for checking!

Yes, the object being listed multiple times is not changed and probably won't be changed. I think it is an interesting idea to have the pin button as a toggle to add/remove objects to the pinboard. However, one might pin an object let's say in February and then want to pin it again in September. If the object wasn't 'unpinned' in February, it would still show up as being pinned - but it would probably take a long time to scroll through all the objects pinned since the object was originally pinned, if that makes sense. So the user would need to unpin and then repin the object in order to use it.

panditthecoder commented 7 years ago

that makes sense. However, will check how it works if i deleted the object (in your above example) in Sept - after pinning it the second time. what happens if i scroll down to the version i had pinned in Feb ?

panditthecoder commented 7 years ago

As anticipated, when i create a new object, pin it multiple times (and as you said, this could be over a longish period) and then 'trash' the object, the references to the pins are not removed. So i could, after deleting the object, get the code to the edit window by clicking on the object in the pin tab - and run normal operations (modify code, preview, deploy etc). Not a big issue as the problems associated with trashing objects have been resolved and now 'trash' is just another folder/path and does not actually remove either the code or the binaries so i would be ok leaving things as they are. BTW, not entirely satisfied with the way 'trash' works. would you like to rename the 'Trash' button as 'Archive'? archive moves it out of the active list and reduces the amount of clutter on the browser window but does nothing else (which is what the trash functionality is doing currently)