-
-
Notifications
You must be signed in to change notification settings - Fork 516
Update JS Docs #497
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
Update JS Docs #497
Conversation
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.
Various changes, questions, clarifications and such. There's probably some other stuff that will need to be caught in a second review once this initial items are addressed.
_includes/js/queries.md
Outdated
### Full Text Search | ||
|
||
Use `fullText` for efficient search capabilities. Text indexes are automatically created for you. Your strings are turned into tokens for fast searching. | ||
|
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 would put the note regarding the 'cost' of full text search ops up here instead. That way it's a disclaimer of sorts as to what kind of impact this may have, before they start seeing any examples.
_includes/js/queries.md
Outdated
|
||
For Case or Diacritic Sensitive search, please use the [REST API](http://docs.parseplatform.org/rest/guide/#queries-on-string-values). | ||
|
||
* Note: Full Text Search can be expensive operations. |
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.
*this would be the note to move up ^, and maybe with some further clarification as to 'expensive operations'.
_includes/js/queries.md
Outdated
}; | ||
|
||
// Pipeline array | ||
const pipeline = [ |
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.
Should either rename to 'pipelineArray' or change from const to var or let. In the same example you have two constants declared with the same name, and although it's just an example it should probably show correct code 😉 .
_includes/js/queries.md
Outdated
|
||
For a list of available operators please refer to [Mongo Aggregate Documentation](https://docs.mongodb.com/v3.2/reference/operator/aggregation/). | ||
|
||
* Note: Most operation in Mongo Aggregate Documentation will work with Parse-Server, but `_id` doesn't exist. Please replace with `objectId`. |
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.
typo:
Most operations in...
_includes/js/queries.md
Outdated
}); | ||
</code></pre> | ||
|
||
<pre><code class="javascript"> |
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 would add some descriptive text before this code block to detail what's in it, especially since it's only preceded by another block.
_includes/js/schemas.md
Outdated
This API allows you to access the schemas of your app. | ||
|
||
* `MasterKey` is required. | ||
* Starting with Parse-Server 2.7.1 |
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.
Parse-Server thing
_includes/rest/schemas.md
Outdated
@@ -9,7 +9,7 @@ types in the databrowser. | |||
This API allows you to access the schemas of your app. | |||
Note: This API can be only accessed using the `master key`. | |||
|
|||
* Starting with Parse-Server 3.0 Index support added. | |||
* Starting with Parse-Server 2.7.1 Index support added. |
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.
Parse-Server thing
_includes/js/schemas.md
Outdated
|
||
Schema will return an object similar to the following: | ||
|
||
<pre><code class="javascript"> |
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.
Wait a minute...this is a duplicate file of schema.md right? Is there a particular reason why this one (or that one) is being added?
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.
Oops
assets/js/bundle.js
Outdated
|
||
// Animate to the value specified | ||
.end().animate({ opacity: to }, speed, easing, callback); | ||
().end().animate({ opacity: to }, speed, easing, callback); |
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.
Reason for this?
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.
No Idea, I think when I ran bundle install
this happened or maybe my text-editor linter.
I'll change it back
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.
That's fine then, so as it's functional.
@@ -22,6 +22,7 @@ sections: | |||
- "js/analytics.md" | |||
- "common/data.md" | |||
- "common/relations.md" | |||
- "js/schema.md" |
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.
If you're just adding schema.md you might want to drop schemas.md. In the php section I have it setup to reference schema.md already, might as well be consistent.
@montymxb Thanks for the initial review. I went ahead and added some more aggregate examples. |
@flovilmart Can you look over this? |
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 agree with @montymxb comments, otherwise LGTM
@@ -9,7 +9,7 @@ types in the databrowser. | |||
This API allows you to access the schemas of your app. | |||
Note: This API can be only accessed using the `master key`. | |||
|
|||
* Starting with Parse-Server 3.0 Index support added. | |||
* Starting with Parse Server 2.7.1 Index support added. |
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.
Didn't even realize the 3.0 thing there...nice catch
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.
Alright second look over and it's pretty good! Just some nits here and there.
To note I'm not 100% sure I want to move those locations for server requirements, as I see they're already following the leading paragraph in other sections of the docs. To retract what I put down before, I would use that existing style instead, that and the blue note is fine (and don't worry about the italics). I'll update those comments shortly to reflect this.
_includes/js/geopoints.md
Outdated
@@ -57,6 +57,38 @@ query.find({ | |||
}); | |||
</code></pre> | |||
|
|||
You can query for whether an object lies within / on a polygon of `Parse.GeoPoint` (minimum 3 points): |
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.
can probably replace the / with 'or' just to be a bit more explicit.
_includes/js/geopoints.md
Outdated
}); | ||
</code></pre> | ||
|
||
You can query for whether an object `Parse.Polygon` contains a `Parse.GeoPoint`: |
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.
Stylistic
You can also query for whether...
_includes/js/queries.md
Outdated
@@ -205,6 +205,39 @@ The above example will match any `BarbecueSauce` objects where the value in the | |||
|
|||
Queries that have regular expression constraints are very expensive, especially for classes with over 100,000 records. Parse restricts how many such operations can be run on a particular app at any given time. | |||
|
|||
### Full Text Search | |||
|
|||
Use `fullText` for efficient search capabilities. Text indexes are automatically created for you. Your strings are turned into tokens for fast searching. |
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.
Stylistic
You can use
fullText
for efficient...
_includes/js/queries.md
Outdated
|
||
Use `fullText` for efficient search capabilities. Text indexes are automatically created for you. Your strings are turned into tokens for fast searching. | ||
|
||
* Note: Full Text Search can be resource expensive. As with all indexes ensure you have enough RAM. Speed comes at a cost. |
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.
Stylistic
- Note: Full Text Search can be resource intensive. Ensure the cost of using indexes is worth the benefit, see storage requirements & performance costs of text indexes.
_includes/js/queries.md
Outdated
|
||
* Note: Full Text Search can be resource expensive. As with all indexes ensure you have enough RAM. Speed comes at a cost. | ||
|
||
Requires Parse Server 2.5.0+ |
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 was wondering about these requirement labels, we should try to standardize them so they're not just dotted around. I think a solution could be to make sure this immediately follows the feature title. In this case ### Full Text Search
. Also, and this is just a thought, but maybe we should italicize this entire requirement, just to emphasize it before the reader attempts to start implementing said feature.
Make sure to lead the requirement with *
immediately following the introductory paragraph of the feature.
_includes/js/queries.md
Outdated
|
||
Queries can be made using aggregates, allowing you to retrieve objects over a set of input values. The results will not be `Parse.Object`s since you will be aggregating your own fields | ||
|
||
* Note: MasterKey is Required. Parse Server 2.7.1+ |
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.
Same thing here, we should move this statement directly below the title of Aggregate
. Should make sure it's similar to the others as well. We can keep the master key requirement in there though, makes sense to have that as well.
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.
Also I'm not set in stone on this one. Using an *
marks it with a blue + on the docs, and that might be good as is, but location should be standardized below the title.
Positioning is good here, but you could break up the masterKey & server requirement, with the server one first.
_includes/js/queries.md
Outdated
|
||
Queries can be made using distinct, allowing you find unique values for a specified field. | ||
|
||
* Note: MasterKey is required. Parse Server 2.7.1+ |
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.
same here
Could break it up.
_includes/js/schema.md
Outdated
This API allows you to access the schemas of your app. | ||
|
||
* `MasterKey` is required. | ||
* Starting with Parse Server 2.7.1 |
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.
same here.
Positioning is pretty good here, and the parts are broken up. This how the others should be done as well. Could also stand to flip the order so the server requirement is prioritized before the master key.
Just amended some of those comments in the review. |
Thanks again, changes made |
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.
Looks approved
Thanks again for putting up the PR @dplewis . Guess we'll be seeing a couple for iOS and Android pretty soon too! |
Closes: parse-community/Parse-SDK-JS#543
I'm not the best at explaining so any help would be great.
Also If there are any new JS features I missed I can add them here.
I'll use this as a base for iOS and Android Guides