Browse Source

Fix a few typos

Jason Grout 5 years ago
parent
commit
ca926856a1

+ 6 - 6
docs/source/developer/ui_helpers.rst

@@ -1,8 +1,8 @@
 User Interface Helpers
 ----------------------
 
-JupyterLab comes with helpers to show or request simple information to user.
-Those speed up development and ensure a common look & feel.
+JupyterLab comes with helpers to show or request simple information from a user.
+Those speed up development and ensure a common look and feel.
 
 Dialogs
 ~~~~~~~
@@ -11,9 +11,9 @@ Message Dialogs
 '''''''''''''''
 
 Helper functions to show a message to the user are available in the ``apputils`` package.
-Those dialog return a ``Promise`` resolving when the user dismisses the dialog.
+These dialogs return a ``Promise`` resolving when the user dismisses the dialog.
 
-There are one helper:
+There is one helper:
 
 * ``showErrorMessage`` : show an error message dialog.
 
@@ -21,7 +21,7 @@ There are one helper:
 Input Dialogs
 '''''''''''''
 
-Helper functions to request an single input from the user are available in the ``apputils``
+Helper functions to request a single input from the user are available in the ``apputils``
 package within the ``InputDialog`` namespace. There are four helpers:
 
 * ``getBoolean`` : request a boolean through a checkbox.
@@ -29,7 +29,7 @@ package within the ``InputDialog`` namespace. There are four helpers:
 * ``getNumber`` : request a number; if the user input is not a valid number, NaN is returned.
 * ``getText`` : request a short text.
 
-All dialog are built on the standard ``Dialog``. There for the helper function are returning
+All dialogs are built on the standard ``Dialog``. Therefore the helper functions each return
 a ``Promise`` resolving in a ``Dialog.IResult`` object.
 
 .. code:: typescript

+ 5 - 5
packages/apputils/src/inputdialog.ts

@@ -39,7 +39,7 @@ export namespace InputDialog {
   }
 
   /**
-   * Constructor options for number input dialogs
+   * Constructor options for boolean input dialogs
    */
   export interface IBooleanOptions extends IOptions {
     /**
@@ -56,7 +56,7 @@ export namespace InputDialog {
    * @returns A promise that resolves with whether the dialog was accepted
    */
   export function getBoolean(
-    options: InputDialog.IBooleanOptions
+    options: IBooleanOptions
   ): Promise<Dialog.IResult<boolean>> {
     return showDialog({
       ...options,
@@ -84,7 +84,7 @@ export namespace InputDialog {
    * @returns A promise that resolves with whether the dialog was accepted
    */
   export function getNumber(
-    options: InputDialog.INumberOptions
+    options: INumberOptions
   ): Promise<Dialog.IResult<number>> {
     return showDialog({
       ...options,
@@ -127,7 +127,7 @@ export namespace InputDialog {
    * @returns A promise that resolves with whether the dialog was accepted
    */
   export function getItem(
-    options: InputDialog.IItemOptions
+    options: IItemOptions
   ): Promise<Dialog.IResult<string>> {
     return showDialog({
       ...options,
@@ -159,7 +159,7 @@ export namespace InputDialog {
    * @returns A promise that resolves with whether the dialog was accepted
    */
   export function getText(
-    options: InputDialog.ITextOptions
+    options: ITextOptions
   ): Promise<Dialog.IResult<string>> {
     return showDialog({
       ...options,

+ 2 - 2
tests/test-apputils/src/inputdialog.spec.ts

@@ -12,7 +12,7 @@ import {
 describe('@jupyterlab/apputils', () => {
   describe('InputDialog', () => {
     describe('getBoolean()', () => {
-      it('should accept at least argument', async () => {
+      it('should accept at least the title argument', async () => {
         const dialog = InputDialog.getBoolean({
           title: 'Check or not'
         });
@@ -21,7 +21,7 @@ describe('@jupyterlab/apputils', () => {
         expect((await dialog).button.accept).toBe(false);
       });
 
-      it('should be false be default', async () => {
+      it('should be false by default', async () => {
         const dialog = InputDialog.getBoolean({
           title: 'Check or not'
         });