documentation.rst 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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. - Set screen resolution to non-hidpi (non-retina)
  88. - Set browser viewport to 1280x720 px.
  89. The Firefox Web Developer extension and Chrome Developer Tools offer
  90. device specific rendering that enables you to set this viewport resolution.
  91. - Capture the viewport, **not the full browser window**,
  92. using the capture software of your choice. **Do not include any of the
  93. desktop background**.
  94. - For PNGs, reduce their size using pngquant.
  95. For movies, upload them to the IPython/Juptyter YouTube channel
  96. and embed them in the docs with an iframe. The pngs can live in the main repository.
  97. The movies should be added to the ``jupyterlab-media`` repository.
  98. - Use `www.youtube-nocookie.com` website, which can be found by
  99. clicking on the 'privacy-enhanced' embedding option in the Share dialog on YouTube.
  100. Add the following parameters the end of the URL ``?rel=0&amp;showinfo=0``.
  101. This disables the video title and related video suggestions.
  102. - Screenshots or animations should be proceeded by a sentence
  103. describing the content, such as "To open a file, double-click on its
  104. name in the File Browser:".
  105. - We have custom CSS that will add box shadows, and proper sizing of screenshots and
  106. embedded YouTube videos. See examples in the documentation for how to embed these
  107. assets.
  108. To help us organize screenshots and animations, please name the files with a prefix
  109. that matches the names of the source file in which they are used:
  110. ::
  111. sourcefile.rst
  112. sourcefile_filebrowser.png
  113. sourcefile_editmenu.png
  114. This will help us to keep track of the images as documentation content evolves.