New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redirect to author page if query excacty pauseid #1258
Redirect to author page if query excacty pauseid #1258
Conversation
There's one problem with this: If the query is a match for a single author, but not exactly a pauseid, we get a 404. So I see two possible solutions:
@neilbowers since the idea was yours, do you have a suggestion? |
@rwstauner: I prefer your second option, as that was what I proposed: if you enter a single word, hit shift+enter, and the word is a valid PAUSE username. I'd drop the And I also realised that there's potential for someone to be searching for a module using an acronym that has also been used as a PAUSE id. Quick example: XDR is both a valid PAUSE username, module name and dist name. No-one has a username like 'XML' or 'SQL' at the moment, but we could easily end up with one. Personally, I'd still go with this, but you may want to reconsider. |
To be honest the only reason I considered this is because it's only when the "feeling lucky" feature has been used, and I don't consider that "useful" so much as a novelty. |
I've brought both of your suggestion into the code, I think I agree with @neilbowers in that user should search with all upper case and should exactly match the PAUSE id. Anyway in the case when the module name and author name are the same is something that I concern. I think how about if we change condition to match the distribution first in the case if that query exactly match module/distribution name ? Unless try to find the author instead of the distribution name. Not sure if I explained clearly. For example , (luckily I found the keyword that the name of both author and module) The key word is Win32, there's distribution named Win32 and author named WIN32. My offered solutions are
This solution is a bit more expensive than the previous one because we have to send query to api twice if query isn't exactly match distribution name but I think it a smart solution (as far as I can come up with ;) ) I personally like to add more feature the app even though it won't be used or it will get good or bad feed back. This issue not a time consumed task anyway. I'm ready to roll it back it if people don't like it. Even If it got many complains at least I know that many people are using it so than I can know what should I priotize and trying to find better thing (I'll appreciate if got suggestion with the complain too) :D Any comment ? |
How about this approach: If a shift+enter search matches /^[A-Z0-9]+$/ then it's a potential user match
|
Sorry, @oiami, I didn't realize you had pushed another commit to this. I'm not inclined to disable the lucky feature for the "search was ambiguous" case, because that's pretty much always been true (search is likely ambiguous, but hey, you said you were "feeling lucky"). So, any last comments? Otherwise I'm prepared to merge this. |
I think this is done as my intention if there're any more tweak on this could be another issue. I'll just rebase is since this branch is a bit outdated. |
Lovely, thanks! On Sun, Sep 14, 2014 at 8:52 PM, Pattawan Kaewduangdee <
|
7074a5d
to
fadd09f
Compare
Thanks, @oiami. |
fadd09f
to
407ea90
Compare
@rwstauner changed double quotes to single quotes and squashed the commit, should be fixed now. |
…lucky_if_pauseid_found Redirect to author page if query exactly pauseid
LGTM. Thanks! |
I think this is useful and make sense feature when user search with the PAUSE ID and click on feeling lucky, they should get author instead of distribution page.