contributing.rst 6.2 KB

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