codidact / qpixel

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

Add link from suggested edit to list of all pending edits #1407

Open cellio opened 1 month ago

cellio commented 1 month ago

meta:291591

From a suggested edit page, you might want to punt and return to the list to continue reviewing. There's no path from this page other than the browser "back" button or going out and navigating anew. A suggested edit is not "in" a category, but the list of pending edit suggestions is. I think we would need to add a route like /suggested-edits (in addition to /cat#//suggested-edits like today). Probably the simplest thing from the user perspective is to make it a synonym for the Q&A category -- you'll still see the list of all categories with the direct links there. Alternatively, it could be a "pure" meta-list, just the categories and their links without any of the posts; that's strictly more correct but adds clicks to the golden path. I don't have a strong opinion on which to do. Either way, we shouldn't change the existing links; this is about adding a route that represents "all the pending edits" and linking to it from the suggested edit.

trichoplax commented 1 month ago

In the Meta post I was suggesting a link to the suggested edit list that contains the link to the suggested edit currently being viewed. This would be the suggested edit list for a category, rather than a whole community.

Is the suggestion of a new route solely due to the lack of a specified category on the individual suggested edit page, or due to a separate perceived need? If it were easy to add a link back to the appropriate category's suggested edit list, would this be preferable?

trichoplax commented 1 month ago

I don't see any reason that the category information could not be included in the individual suggested edit page (I don't know the reason that it is not currently). Compare with the URL for a link to an individual question, which has the format subdomain.codidact.com/posts/id. This URL contains no information on the category in which this post id belongs, but the page displays with category information (the relevant category is highlighted at the top of the page).

Since every suggested edit relates to only one post, the category could be highlighted at the top of the page for a suggested edit too. The link back to the list of suggested edits would then simply go to the relevant category.

cellio commented 1 month ago

Is the suggestion of a new route solely due to the lack of a specified category on the individual suggested edit page, or due to a separate perceived need? If it were easy to add a link back to the appropriate category's suggested edit list, would this be preferable?

The former. I don't think the suggested edit "knows" its category, but if it does and we can link back to that category's suggested-edits list, that would be preferable. I don't know why we have the structure we do now; I assumed "hard" rather than "oversight", but you know what they say about assumptions... I'd love to be wrong on this one.

trichoplax commented 1 month ago

I've added #1408 as a potential prerequisite for this issue (depending on what approach is decided on). I personally think that issue is worthwhile independently of also being useful to this one.