fix capitalization of JavaScript and CoffeeScript

Summary: i accidentally messed up phab and arcanist locally, so this diff is to fix these mistakes i made. it's the combination of D2037 and D2028.

Test Plan: tested manually

Reviewers: bengotow, evan

Differential Revision: https://phab.nylas.com/D2043
This commit is contained in:
dillon 2015-09-18 11:10:14 -07:00
parent 638843ebba
commit 89e507fe76
13 changed files with 50 additions and 50 deletions

View file

@ -13,7 +13,7 @@ For more information about the Flux pattern, check out [this diagram](https://fa
There are several core stores in the application: There are several core stores in the application:
- **{NamespaceStore}**: When the user signs in to Nylas Mail, their auth token provides one or more namespaces. The NamespaceStore manages the available Namespaces, exposes the current Namespace, and allows you to observe changes to the current namespace. - **{AccountStore}**: When the user signs in to Nylas Mail, their auth token provides one or more accounts. The AccountStore manages the available Accounts, exposes the current Account, and allows you to observe changes to the current Account.
- **{TaskQueue}**: Manages Tasks, operations queued for processing on the backend. Task objects represent individual API actions and are persisted to disk, ensuring that they are performed eventually. Each Task may depend on other tasks, and Tasks are executed in order. - **{TaskQueue}**: Manages Tasks, operations queued for processing on the backend. Task objects represent individual API actions and are persisted to disk, ensuring that they are performed eventually. Each Task may depend on other tasks, and Tasks are executed in order.
@ -26,7 +26,7 @@ There are several core stores in the application:
Most packages declare additional stores that subscribe to these Stores, as well as user Actions, and vend data to the package's React components. Most packages declare additional stores that subscribe to these Stores, as well as user Actions, and vend data to the package's React components.
###Actions ### Actions
In Flux applications, views fire {Actions}, which anyone in the application can subscribe to. Typically, `Stores` listen to actions to perform business logic and trigger updates to their corresponding views. For example, when you click "Compose" in the top left corner of Nylas Mail, the React component for the button fires {Actions::composeNewBlankDraft}. The {DraftStore} listens to this action and opens a new composer window. In Flux applications, views fire {Actions}, which anyone in the application can subscribe to. Typically, `Stores` listen to actions to perform business logic and trigger updates to their corresponding views. For example, when you click "Compose" in the top left corner of Nylas Mail, the React component for the button fires {Actions::composeNewBlankDraft}. The {DraftStore} listens to this action and opens a new composer window.

View file

@ -96,9 +96,9 @@ Drafts in Nylas Mail presented us with a unique challenge. The same draft may be
The {DatabaseStore} exposes a single method, `unpersistModel`, that allows you to purge an object from the cache. You cannot remove a model by ID alone - you must load it first. The {DatabaseStore} exposes a single method, `unpersistModel`, that allows you to purge an object from the cache. You cannot remove a model by ID alone - you must load it first.
####Advanced Model Attributes #### Advanced Model Attributes
## Attribute.JoinedData ##### Attribute.JoinedData
Joined Data attributes allow you to store certain attributes of an object in a separate table in the database. We use this attribute type for Message bodies. Storing message bodies, which can be very large, in a separate table allows us to make queries on message metadata extremely fast, and inflate Message objects without their bodies to build the thread list. Joined Data attributes allow you to store certain attributes of an object in a separate table in the database. We use this attribute type for Message bodies. Storing message bodies, which can be very large, in a separate table allows us to make queries on message metadata extremely fast, and inflate Message objects without their bodies to build the thread list.
@ -116,7 +116,7 @@ When you call `persistModel`, JoinedData attributes are automatically written to
JoinedData attributes cannot be `queryable`. JoinedData attributes cannot be `queryable`.
## Attribute.Collection ##### Attribute.Collection
Collection attributes provide basic support for one-to-many relationships. For example, {Thread}s in Nylas Mail have a collection of {Tag}s. Collection attributes provide basic support for one-to-many relationships. For example, {Thread}s in Nylas Mail have a collection of {Tag}s.

View file

@ -44,7 +44,7 @@ Order: 2
<div class="col-md-6" style="padding-right:30px;"> <div class="col-md-6" style="padding-right:30px;">
<h4><div class="letter">A</div> Explore the source</h4> <h4><div class="letter">A</div> Explore the source</h4>
<img src="/static/img/Illu-ExploreTheSource@2x.png" width="121" height="96" style="margin:auto; margin-bottom:35px; display:block;"/> <img src="/static/img/Illu-ExploreTheSource@2x.png" width="121" height="96" style="margin:auto; margin-bottom:35px; display:block;"/>
<p>Nylas is built on the modern web - packages are written in Coffeescript or Javascript. Packages are a lot like node modules, with their own source, assets, and tests. Check out yours in <span class="instruction-literal">~/.nylas/dev/packages</span>.</p> <p>Nylas is built on the modern web - packages are written in CoffeeScript or JavaScript. Packages are a lot like node modules, with their own source, assets, and tests. Check out yours in <span class="instruction-literal">~/.nylas/dev/packages</span>.</p>
</div> </div>
<div class="col-md-6" style="padding-left:30px;"> <div class="col-md-6" style="padding-left:30px;">
<h4><div class="letter">B</div> Run the specs</h4> <h4><div class="letter">B</div> Run the specs</h4>
@ -136,13 +136,13 @@ class MyMessageSidebar extends React.Component
... ...
_renderContent => _renderContent: =>
<div className="header"> <div className="header">
{md5(@state.contact.email)} {md5(@state.contact.email)}
</div> </div>
``` ```
> JSX Tip: The `{..}` syntax is used for JavaScript expressions inside HTML elements. [Learn more](https://facebook.github.io/react/docs/jsx-in-depth.html) > JSX Tip: The `{..}` syntax is used for JavaScript expressions inside HTML elements. [Learn more](https://facebook.github.io/react/docs/jsx-in-depth.html).
You should see the MD5 hash appear in the sidebar (after you reload Nylas Mail): You should see the MD5 hash appear in the sidebar (after you reload Nylas Mail):

View file

@ -77,7 +77,7 @@ module.exports =
``` ```
> Nylas Mail uses CJSX, a Coffeescript version of JSX, which makes it easy to express Virtual DOM in React `render` methods! You may want to add the [Babel](https://github.com/babel/babel-sublime) plugin to Sublime Text, or the [CJSX Language](https://atom.io/packages/language-cjsx) for syntax highlighting. > Nylas Mail uses CJSX, a CoffeeScript version of JSX, which makes it easy to express Virtual DOM in React `render` methods! You may want to add the [Babel](https://github.com/babel/babel-sublime) plugin to Sublime Text, or the [CJSX Language](https://atom.io/packages/language-cjsx) for syntax highlighting.
### Package Stylesheets ### Package Stylesheets
@ -102,7 +102,7 @@ a.src = "nylas://my-package-name/sounds/bloop.mp3"
a.play() a.play()
``` ```
###Installing a Package ### Installing a Package
Nylas Mail ships with many packages already bundled with the application. When the application launches, it looks for additional packages in `~/.nylas/dev/packages`. Each package you create belongs in its own directory inside this folder. Nylas Mail ships with many packages already bundled with the application. When the application launches, it looks for additional packages in `~/.nylas/dev/packages`. Each package you create belongs in its own directory inside this folder.

View file

@ -4,7 +4,7 @@ Section: Guides
Order: 2 Order: 2
--- ---
Nylas Mail uses [React](https://facebook.github.io/react/) to create a fast, responsive UI. Packages that want to extend the Nylas Mail interface should use React. Using React's [JSX](https://facebook.github.io/react/jsx-in-depth.html) syntax is optional, but both [JSX](https://facebook.github.io/react/jsx-in-depth.html) and [CJSX](https://github.com/jsdf/coffee-react) (Coffeescript) are available. Nylas Mail uses [React](https://facebook.github.io/react/) to create a fast, responsive UI. Packages that want to extend the Nylas Mail interface should use React. Using React's [JSX](https://facebook.github.io/react/jsx-in-depth.html) syntax is optional, but both [JSX](https://facebook.github.io/react/jsx-in-depth.html) and [CJSX](https://github.com/jsdf/coffee-react) (CoffeeScript) are available.
For a quick introduction to React, take a look at Facebook's [Getting Started with React](https://facebook.github.io/react/getting-started.html). For a quick introduction to React, take a look at Facebook's [Getting Started with React](https://facebook.github.io/react/getting-started.html).

View file

@ -20,7 +20,7 @@ Utils = require './flux/models/utils'
# Essential: Atom global for dealing with packages, themes, menus, and the window. # Essential: Atom global for dealing with packages, themes, menus, and the window.
# #
# An instance of this class is always available as the `atom` global. # The singleton of this class is always available as the `atom` global.
module.exports = module.exports =
class Atom extends Model class Atom extends Model
@version: 1 # Increment this when the serialization format changes @version: 1 # Increment this when the serialization format changes
@ -514,7 +514,7 @@ class Atom extends Model
onWindowPropsReceived: (callback) -> onWindowPropsReceived: (callback) ->
@emitter.on('window-props-received', callback) @emitter.on('window-props-received', callback)
# Extended: Returns a {Boolean} true when the current window is maximized. # Extended: Is the current window maximized?
isMaximixed: -> isMaximixed: ->
@getCurrentWindow().isMaximized() @getCurrentWindow().isMaximized()

View file

@ -17,9 +17,9 @@ class MenuItem extends React.Component
Public: React `props` supported by MenuItem: Public: React `props` supported by MenuItem:
- `divider` (optional) Pass a {Boolean} to render the menu item as a section divider. - `divider` (optional) Pass a {Boolean} to render the menu item as a section divider.
- `key` (optional) - `key` (optional) Pass a {String} to be the React key to optimize rendering lists of items.
- `selected` (optional) - `selected` (optional) Pass a {Boolean} to specify whether the item is selected.
- `checked` (optional) - `checked` (optional) Pass a {Boolean} to specify whether the item is checked.
### ###
@propTypes: @propTypes:
divider: React.PropTypes.bool divider: React.PropTypes.bool

View file

@ -41,25 +41,25 @@ RetinaImg also introduces the concept of image `modes`. Specifying an image mode
is important for theming: it describes the content of your image, allowing theme is important for theming: it describes the content of your image, allowing theme
developers to properly adjust it. The four modes are described below: developers to properly adjust it. The four modes are described below:
- `ContentPreserve`: Your image contains color or should not be adjusted by any theme. - ContentPreserve: Your image contains color or should not be adjusted by any theme.
- `ContentLight`: Your image is a grayscale image with light colors, intended to be shown - ContentLight: Your image is a grayscale image with light colors, intended to be shown
against a dark background. If a theme developer changes the background to be light, they against a dark background. If a theme developer changes the background to be light, they
can safely apply CSS filters to invert or darken this image. This mode adds the can safely apply CSS filters to invert or darken this image. This mode adds the
`content-light` CSS class to the image. `content-light` CSS class to the image.
- `ContentDark`: Your image is a grayscale image with dark colors, intended to be shown - ContentDark: Your image is a grayscale image with dark colors, intended to be shown
against a light background. If a theme developer changes the background to be dark, they against a light background. If a theme developer changes the background to be dark, they
can safely apply CSS filters to invert or brighten this image. This mode adds the can safely apply CSS filters to invert or brighten this image. This mode adds the
`content-dark` CSS class to the image. `content-dark` CSS class to the image.
- `ContentIsMask`: This image provides alpha information only, and color should - ContentIsMask: This image provides alpha information only, and color should
be based on the `background-color` of the RetinaImg. This mode adds the be based on the `background-color` of the RetinaImg. This mode adds the
`content-mask` CSS class to the image, and leverages `-webkit-mask-image`. `content-mask` CSS class to the image, and leverages `-webkit-mask-image`.
Example: Icons displayed within buttons specify ContentIsMask, and their Example: Icons displayed within buttons specify ContentIsMask, and their
color is declared via CSS to be the same as the button text color. Changing color is declared via CSS to be the same as the button text color. Changing
`@text-color-subtle` in a theme changes both button text and button icons! `@text-color-subtle` in a theme changes both button text and button icons!
```css ```css
.btn-icon { .btn-icon {

View file

@ -8,7 +8,7 @@ information about Folder on the Nylas Platform, read the [Folder API
Documentation](https://nylas.com/docs/api#folders) Documentation](https://nylas.com/docs/api#folders)
NOTE: This is different from a `Label`. A `Folder` is used for generic NOTE: This is different from a `Label`. A `Folder` is used for generic
IMAP and Exchange, while `Label`s are used for Gmail. The `Namespace` has IMAP and Exchange, while `Label`s are used for Gmail. The `Account` has
the filed `organizationUnit` which specifies if the current account uses the filed `organizationUnit` which specifies if the current account uses
either "folder" or "label". either "folder" or "label".

View file

@ -25,7 +25,7 @@ object.
`object`: {AttributeString} The model's type. This field is used by the JSON `object`: {AttributeString} The model's type. This field is used by the JSON
deserializer to create an instance of the correct class when inflating the object. deserializer to create an instance of the correct class when inflating the object.
`accountId`: {AttributeString} The string Namespace Id this model belongs to. `accountId`: {AttributeString} The string Account Id this model belongs to.
Section: Models Section: Models
### ###

View file

@ -9,11 +9,11 @@ SyncbackCategoryTask = require './syncback-category-task'
# Public: Create a new task to apply labels to a message or thread. # Public: Create a new task to apply labels to a message or thread.
# #
# Takes an options array of the form: # Takes an options object of the form:
# - `folder` The {Folder} or {Folder} IDs to move to # - folder: The {Folder} or {Folder} IDs to move to
# - `threads` An array of {Thread}s or {Thread} IDs # - threads: An array of {Thread}s or {Thread} IDs
# - `threads` An array of {Message}s or {Message} IDs # - threads: An array of {Message}s or {Message} IDs
# - `undoData` Since changing the folder is a destructive action, # - undoData: Since changing the folder is a destructive action,
# undo tasks need to store the configuration of what folders messages # undo tasks need to store the configuration of what folders messages
# were in. When creating an undo task, we fill this parameter with # were in. When creating an undo task, we fill this parameter with
# that configuration # that configuration

View file

@ -9,11 +9,11 @@ SyncbackCategoryTask = require './syncback-category-task'
# Public: Create a new task to apply labels to a message or thread. # Public: Create a new task to apply labels to a message or thread.
# #
# Takes an options array of the form: # Takes an options object of the form:
# - `labelsToAdd` An {Array} of {Label}s or {Label} ids to add # - labelsToAdd: An {Array} of {Label}s or {Label} ids to add
# - `labelsToRemove` An {Array} of {Label}s or {Label} ids to remove # - labelsToRemove: An {Array} of {Label}s or {Label} ids to remove
# - `threads` An {Array} of {Thread}s or {Thread} ids # - threads: An {Array} of {Thread}s or {Thread} ids
# - `messages` An {Array} of {Message}s or {Message} ids # - messages: An {Array} of {Message}s or {Message} ids
class ChangeLabelsTask extends ChangeMailTask class ChangeLabelsTask extends ChangeMailTask
constructor: ({@labelsToAdd, @labelsToRemove}={}) -> constructor: ({@labelsToAdd, @labelsToRemove}={}) ->

View file

@ -20,23 +20,23 @@ TaskStatus =
# tried multiple times to succeed in case of network issues. # tried multiple times to succeed in case of network issues.
# #
# performRemote must return a {Promise}, and it should always resolve with # performRemote must return a {Promise}, and it should always resolve with
# Task.Status.Finished or Task.Status.Retry. Rejections are considered # `Task.Status.Finished` or `Task.Status.Retry`. Rejections are considered
# exception cases and are logged to our server. # exception cases and are logged to our server.
# #
# Returning Task.Status.Retry will cause the TaskQueue to leave your task # Returning `Task.Status.Retry` will cause the `TaskQueue` to leave your task
# on the queue and run it again later. You should only return Task.Status.Retry # on the queue and run it again later. You should only return `Task.Status.Retry`
# if your task encountered a transient error (for example, a `0` but not a `400`). # if your task encountered a transient error (for example, a `0` but not a `400`).
# #
# - shouldWaitForTask: # - shouldWaitForTask:
# Tasks may be arbitrarily dependent on other tasks. To ensure that # Tasks may be arbitrarily dependent on other tasks. To ensure that
# performRemote is called at the right time, subclasses should implement # `performRemote` is called at the right time, subclasses should implement
# `shouldWaitForTask(other)`. For example, the `SendDraft` task is dependent # `shouldWaitForTask(other)`. For example, the `SendDraft` task is dependent
# on the draft's files' `UploadFile` tasks completing. # on the draft's files' `UploadFile` tasks completing.
# #
# Tasks may also implement shouldDequeueOtherTask(other). Returning true # Tasks may also implement `shouldDequeueOtherTask(other)`. Returning true
# will cause the other event to be removed from the queue. This is useful in # will cause the other event to be removed from the queue. This is useful in
# offline mode especially, when the user might Save,Save,Save,Save,Send. # offline mode especially, when the user might `Save`,`Save`,`Save`,`Save`,`Send`.
# Each newly queued Save can cancel the (unstarted) save task in the queue. # Each newly queued `Save` can cancel the (unstarted) save task in the queue.
# #
# Tasks that need to support undo/redo should implement `canBeUndone`, `isUndo`, # Tasks that need to support undo/redo should implement `canBeUndone`, `isUndo`,
# `createUndoTask`, and `createIdenticalTask`. # `createUndoTask`, and `createIdenticalTask`.