fedora-infra / fedora-tagger

Small tagger app for Fedora Community
https://apps.fedoraproject.org/tagger/
15 stars 23 forks source link

Links to Tagger doesn't display requested package #65

Closed kparal closed 11 years ago

kparal commented 11 years ago

https://fedorahosted.org/fedoracommunity/ticket/409

I visited ​https://apps.fedoraproject.org/packages/gajim . Then I clicked "Tagger" link to continue to ​https://apps.fedoraproject.org/tagger/gajim . But Tagger showed me a completely different package instead. After refreshing a several times, it seems I receive random packages instead of "gajim".

Some links work, like this one: ​https://apps.fedoraproject.org/tagger/pidgin

A lot of other links, like the one above, doesn't.

ralphbean commented 11 years ago

Ah ha.. this is indeed a bug.

There is logic in tagger that goes like this: "If the user is anonymous, they can vote on existing tags, but they may not add new tags". It followed from that that "If the user is anonymous, do not present them with packages that have no existing tags. If we try to present them with a package that has no tags, then instead, show them some other random package that does have tags (so they can vote on those)."

If you log in, you should be able to view the gajim package.

This whole thing doesn't make sense now that you can link directly to tagger packages from the /packages webapp. The flow should probably be, "If the user is anonymous and they have requested to view a package with no tags, instead redirect them to the login page (instead of to a different random package)".

kparal commented 11 years ago

I suggest a different route:

Always display the correct package. If the package has no tags, put there a note

This package has no tags yet. [link]Please help us add some! (login required)[/link]

The link will work for authenticated users and it will redirect to a login page for anonymous users. This has the benefit that the user knows exactly what is happening and why.

Also, the anonymous user doesn't have to click the link, but he might click left or right arrows, which can switch him to a different packages (that already has some tags). This way we can give an impulse to the anonymous user to help us out (on some different packages, but that doesn't matter), without forcing him to go through the login procedure. He can do that later on, if he wishes.

ralphbean commented 11 years ago

:+1:

ralphbean commented 11 years ago

This is almost done since the rewrite has been completed. We still just need the following text when there are no tags:

This package has no tags yet. [link]Please help us add some! (login required)[/link]