-
Notifications
You must be signed in to change notification settings - Fork 88
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
(DOCSP-34629): C++ SDK: Add sort documentation #3095
Conversation
Readability for Commit Hash: 3ef2633 You can see any previous Readability scores (if they exist) by looking Readability scores for changed documents:
For Grade Level, aim for 8 or below. For Reading Ease scores, aim for 60 or above:
For help improving readability, try Hemingway App. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some non-blocking suggestions
auto specificProject = projects[0]; | ||
|
||
// :snippet-start: sort-list-by-multiple-properties | ||
auto sortedListProperty = specificProject.items.sort({{"assignee", true}, {"priority", false}}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
possible to get this on multiple lines so it's easier to see the multiple sorts? something like:
auto sortedListProperty = specificProject.items.sort({{"assignee", true}, {"priority", false}}); | |
auto sortedListProperty = specificProject.items.sort( | |
{{"assignee", true}, | |
{"priority", false}} | |
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure where exactly to split them and where to put the brackets per C++ convention, so I've configured my VS Code to use the Google linter for C++. It has a default line length of 80 characters, which is the same as our docs line length limit (ostensibly - we don't apply it particularly stringently). But I don't love some of the other formatting changes it made, so I may experiment with linters going forward to find the best one.
It's a good suggestion! We should probably be setting a line length for all of our code examples across all of our SDKs. A lot of mine scroll out of the visible area. I'll add that to our sync doc for discussion.
✨ Staging URL: https://preview-mongodbmongodb.gatsbyjs.io/realm/master/ 🪵 Logs |
Pull Request Info
Jira ticket: https://jira.mongodb.org/browse/DOCSP-34629
Staged changes:
Reminder Checklist
Before merging your PR, make sure to check a few things.
Release Notes
Review Guidelines
REVIEWING.md