codidact / qpixel

Q&A-based community knowledge-sharing software
https://codidact.com
GNU Affero General Public License v3.0
385 stars 69 forks source link

Ask question from the search-results page #1252

Open cellio opened 9 months ago

cellio commented 9 months ago

meta:289118

A user searches to see if we already have an answer. Not finding helpful search results, the instinct is to click "ask question" -- which isn't available on the search-results page.

It's not available because that page isn't "in" a category, and the button is defined per-category. If we add the button (in the usual location) on that page, then clicking it would require you to answer a "what category?" prompt before taking you to the correct posting page. We have a similar situation already if you're in a category that supports more than one type of top-level post; try asking a question on Collab to see a demonstration. I'm imagining something like that. (Yes, that would not be great UX if you ask from the search page for a category that has more than one type of top-level post, but I hope that's rare.)

An alternative approach would be text, maybe at the bottom of the search results, like "didn't find what you were looking for? you can ask in Q&A, Code Review, or Meta" -- with each of those being a link to the right "create post" page. That would mean knowing the list of categories at page-creation time for the search results. (I assume that's not a problem?)

ws909 commented 9 months ago

Would it be feasible to auto-select the category if the search is constrained to one?