dotnet-api-docs icon indicating copy to clipboard operation
dotnet-api-docs copied to clipboard

Sort the list w.r.t Error codes

Open satishc-dev opened this issue 8 years ago • 11 comments

Kindly sort the list using error code value instead of name. Its much more helpful as the error codes are grouped like 2xx, 4xx, 5xx. Folks tend to search the field name in corresponding groups.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

satishc-dev avatar Nov 30 '18 08:11 satishc-dev

I think that is reasonable. @mairaw anything against such change? @satishc2437 would you be willing to put up a PR?

karelz avatar Nov 30 '18 17:11 karelz

This would have to be discussed with the engineering team @karelz since this part is auto-generated and it currently sorts field names alphabetically. I'll port to the Microsoftdocs/feedback repo for discussion.

mairaw avatar Nov 30 '18 17:11 mairaw

And this would impact all enumeration types, not just this one.

mairaw avatar Nov 30 '18 17:11 mairaw

I found this from a while back and we decided against changing the sorting order: https://github.com/MicrosoftDocs/feedback/issues/351

So I'll be closing this.

mairaw avatar Nov 30 '18 18:11 mairaw

@mairaw Can you please re-open this issue and not close is as won't fix. The link that you mentioned for duplicate is not correct. These two issues are worlds apart.

Let's not use engineering constraints to degrade customer experiences. Below are some popular documentations on HttpStatusCode and all sort on values - https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

Are you saying, we should make it hard for the user to find the correct status code, not align with popular pattern used in this area, just because we have auto-generated documentation?

satishc-dev avatar Nov 30 '18 19:11 satishc-dev

I can reopen this but yes it's the same issue. The only way to fix this would be to add remarks that would list the error codes in order duplicating the enum field list. But the list under https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netframework-4.7.2#fields is auto-generated and it was the point of discussion on the bug I posted. And that we decided not to change.

mairaw avatar Nov 30 '18 19:11 mairaw

I am speaking purely in respect to customer experience which is quite contextual in this case. In the current form of documentation, it is really painful to figure-out which all 4xx or 5xx status codes are supported. Mostly, folks visiting HttpStatusCode documentation wish to figure out which is best status code in case of 2xx, 4xx, 5xx scenarios and thus expect them to be grouped together.

I believe this one needs a special treatment. Hence, kindly re-open the issue.

If this is triaged as Won't Fix, I will strongly advice to refer to few of the other popular documentation on this topic and why do they meet the desired customer expectation and we don't wish to.

satishc-dev avatar Nov 30 '18 19:11 satishc-dev

I already reopened this and suggested how we could go about this special case.

mairaw avatar Nov 30 '18 19:11 mairaw

May I suggest that you change the source template to combine the first 2 lines into one, making the numeric code come first (thus primary sort field). As example instead of "Accepted | 202 | Equivalent to HTTP status 202. Accepted indicates that the request has been accepted for further processing." The doc template should read "202 Accepted | Indicates that the request has been accepted for further processing."

This should mean the existing rendering can be used unchanged and the UX will be improved as Satish originally requested ( and I +1)

DickInKent avatar Dec 05 '18 12:12 DickInKent

Maybe a preferable solution would be that enums that document both the field name and value should (on the web interface) present this in a table that allows sorting by either column. I'd say this is a web UI issue rather than a documentation issue.

PaulGarnerUk avatar Jan 07 '19 11:01 PaulGarnerUk

This is a great suggestion @PaulGarnerUk since it would satisfy both needs. Would you mind opening an issue at https://aka.ms/sitefeedback for that?

mairaw avatar Oct 11 '19 18:10 mairaw