documentation.rst 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. Writing Documentation
  2. ---------------------
  3. This section provides information about writing documentation for JupyterLab.
  4. See our `Contributor
  5. Guide <https://github.com/jupyterlab/jupyterlab/blob/master/CONTRIBUTING.md>`_ for
  6. details on installation and testing.
  7. Writing Style
  8. ~~~~~~~~~~~~~
  9. - The documentation should be written in the second person, referring
  10. to the reader as "you" and not using the first person plural "we."
  11. The author of the documentation is not sitting next to the user, so
  12. using "we" can lead to frustration when things don't work as
  13. expected.
  14. - Avoid words that trivialize using JupyterLab such as "simply" or
  15. "just." Tasks that developers find simple or easy may not be for
  16. users.
  17. - Write in the active tense, so "drag the notebook cells..." rather
  18. than "notebook cells can be dragged..."
  19. - The beginning of each section should begin with a short (1-2
  20. sentence) high-level description of the topic, feature or component.
  21. - Use "enable" rather than "allow" to indicate what JupyterLab makes
  22. possible for users. Using "allow" connotes that we are giving them
  23. permission, whereas "enable" connotes empowerment.
  24. User Interface Naming Conventions
  25. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  26. Documents, Files, and Activities
  27. ''''''''''''''''''''''''''''''''
  28. Files are referrred to as either files or documents, depending on the context.
  29. Documents are more human centered. If human viewing, interpretation, interaction
  30. is an important part of the experience, it is a document in that context. For
  31. example, notebooks and markdown files will often be referring to as documents
  32. unless referring to the file-ness aspect of it (e.g., the notebook filename).
  33. Files are used in a less human-focused context. For example, we refer to files
  34. in relation to a file system or file name.
  35. Activities can be either a document or another UI panel that is not file backed,
  36. such as terminals, consoles or the inspector. An open document or file is an
  37. activity in that it is represented by a panel that you can interact with.
  38. Element Names
  39. '''''''''''''
  40. - The generic content area of a tabbed UI is a panel, but prefer to refer to the
  41. more specific name, such as “File browser.” Tab bars have tabs which toggle
  42. panels.
  43. - The menu bar contains menu items, which have their own submenus.
  44. - The main work area can be referred to as the work area when the name is unambiguous.
  45. - When describing elements in the UI, colloquial names are preferred
  46. (e.g., “File browser” instead of “Files panel”).
  47. The majority of names are written in lower case. These names include:
  48. - tab
  49. - panel
  50. - menu bar
  51. - sidebar
  52. - file
  53. - document
  54. - activity
  55. - tab bar
  56. - main work area
  57. - file browser
  58. - command palette
  59. - cell inspector
  60. - code console
  61. The following sections of the user interface should be in title case, directly
  62. quoting a word in the UI:
  63. - File menu
  64. - Files tab
  65. - Running panel
  66. - Tabs panel
  67. - Single-Document Mode
  68. The capitalized words match the label of the UI element the user is clicking on
  69. because there does not exist a good colloquial name for the tool, such as “file
  70. browser” or “command palette”.
  71. See :ref:`interface` for descriptions of elements in the UI.
  72. Keyboard Shortcuts
  73. ~~~~~~~~~~~~~~~~~~
  74. Typeset keyboard shortcuts as follows:
  75. - Monospace typeface, with spaces between individual keys:
  76. ``Shift Enter``.
  77. - For modifiers, use the platform independent word describing key:
  78. ``Shift``.
  79. - For the ``Accel`` key use the phrase: ``Command/Ctrl``.
  80. - Don’t use platform specific icons for modifier keys, as they are
  81. difficult to display in a platform specific way on Sphinx/RTD.
  82. Screenshots and Animations
  83. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  84. Our documentation should contain screenshots and animations that
  85. illustrate and demonstrate the software. Here are some guidelines for
  86. preparing them:
  87. - Make sure the screenshot does not contain copyrighted material (preferable),
  88. or the license is allowed in our documentation and clearly stated.
  89. - If taking a png screenshot, use the Firefox or Chrome developer tools to do the following:
  90. - set the browser viewport to 1280x720 pixels
  91. - set the device pixel ratio to 1:1 (i.e., non-hidpi, non-retina)
  92. - screenshot the entire *viewport* using the browser developer tools. Screenshots should
  93. not include any browser elements such as the browser address bar, browser title bar, etc.,
  94. and should not contain any desktop background.
  95. - If creating a movie, adjust the settings as above (1280x720 viewport resolution, non-hidpi)
  96. and use a screen capture utility of your choice to capture just the browser viewport.
  97. - For PNGs, reduce their size using ``pngquant --speed 1 <filename>``. The
  98. resulting filename will have ``-fs8`` appended, so make sure to rename it and
  99. use the resulting file. Commit the optimized png file to the main repository.
  100. Each png file should be no more than a few hundred kilobytes.
  101. - For movies, upload them to the IPython/Jupyter YouTube channel and add them
  102. to the `jupyterlab-media <https://github.com/jupyterlab/jupyterlab-media>`__
  103. repository. To embed a movie in the documentation, use the
  104. ``www.youtube-nocookie.com`` website, which can be found by clicking on the
  105. 'privacy-enhanced' embedding option in the Share dialog on YouTube. Add the
  106. following parameters the end of the URL ``?rel=0&amp;showinfo=0``. This
  107. disables the video title and related video suggestions.
  108. - Screenshots or animations should be preceded by a sentence
  109. describing the content, such as "To open a file, double-click on its
  110. name in the File Browser:".
  111. - We have custom CSS that will add box shadows, and proper sizing of screenshots and
  112. embedded YouTube videos. See examples in the documentation for how to embed these
  113. assets.
  114. To help us organize screenshots and animations, please name the files with a prefix
  115. that matches the names of the source file in which they are used:
  116. ::
  117. sourcefile.rst
  118. sourcefile_filebrowser.png
  119. sourcefile_editmenu.png
  120. This will help us to keep track of the images as documentation content evolves.