documentation.rst 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. Writing Documentation
  2. ---------------------
  3. This section provide information about writing documentation for
  4. JupyterLab. See our [Contributor Guide](https://github.com/jupyterlab/jupyterlab/blob/master/CONTRIBUTING.md) for details on installation and testing.
  5. Writing Style
  6. ~~~~~~~~~~~~~
  7. - The documentation should be written in the second person, referring
  8. to the reader as "you" and not using the first person plural "we."
  9. The author of the documentation is not sitting next to the user, so
  10. using "we" can lead to frustration when things don't work as
  11. expected.
  12. - Avoid words that trivialize using JupyterLab such as "simply" or
  13. "just." Tasks that developers find simple or easy may not be for
  14. users.
  15. - Write in the active tense, so "drag the notebook cells..." rather
  16. than "notebook cells can be dragged..."
  17. - The beginning of each section should begin with a short (1-2
  18. sentence) high-level description of the topic, feature or component.
  19. User Interface Naming Conventions
  20. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  21. Documents, Files, and Activities
  22. ''''''''''''''''''''''''''''''''
  23. Files are referrred to as either files or documents, depending on the context.
  24. Documents are more human centered.
  25. If human viewing, interpretation, interaction is an important part of the experience, it is a document in that context.
  26. For example, notebooks and markdown files will often be referring to as documents unless referring to the file-ness aspect of it (e.g., the notebook filename).
  27. Files are used in a less human-focused context.
  28. For example, we refer to files in relation to a file system or file name.
  29. Activities can be either a document or another UI panel that is not file backed, such as terminals, consoles or the inspector.
  30. An open document or file is an activity in that it is represented by a panel that you can interact with.
  31. Element Names
  32. '''''''''''''
  33. - The generic content area of a tabbed UI is a panel, but prefer to refer to the more specific name, such as “File browser.” Tab bars have tabs which toggle panels.
  34. - The menu bar contains menu items, which have their own submenus.
  35. - The main work area can be referred to as work area when the name is unambiguous.
  36. - When describing elements in the UI, colloquial names are preferred (e.g., “File browser” instead of “Files panel”).
  37. The majority of names are written in lower case. These names include:
  38. - tab
  39. - panel
  40. - menu bar
  41. - sidebar
  42. - file
  43. - document
  44. - activity
  45. - tab bar
  46. - main work area
  47. - file browser
  48. - command palette
  49. - cell inspector
  50. - code console
  51. The following sections of the user interface should be in title case, directly quoting a word in the UI:
  52. - File menu
  53. - Files tab
  54. - Running panel
  55. - Tabs panel
  56. - Single-Document Mode
  57. The capitalized words match the label of the UI element the user is clicking on
  58. because there does not exist a good colloquial name for the tool,
  59. such as “file browser” or “command palette”.
  60. See :ref:`interface` for descriptions of elements in the UI.
  61. Keyboard Shortcuts
  62. ~~~~~~~~~~~~~~~~~~
  63. Typeset keyboard shortcuts as follows:
  64. - Monospace typeface, with no spaces between individual keys:
  65. ``Shift Enter``.
  66. - For modifiers, use the platform independent word describing key:
  67. ``Shift``.
  68. - For the ``Accel`` key use the phrase: ``Command/Ctrl``.
  69. - Don’t use platform specific icons for modifier keys, as they are
  70. difficult to display in a platform specific way on Sphinx/RTD.
  71. Screenshots and Animations
  72. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  73. Our documentation should contain screenshots and animations that
  74. illustrate and demonstrate the software. Here are some guidelines for
  75. preparing them:
  76. - Set screen resolution to non-hidpi (non-retina)
  77. - Set browser viewport to 1280x720 px.
  78. Firefox Web Developer extension is useful for doing this
  79. - Capture the viewport, **not the full browser window**,
  80. using the capture software of your choice.
  81. - For PNGs, reduce their size using pngqant.
  82. For movies, upload them to the IPython/Juptyter YouTube channel
  83. and embed them in the docs with an iframe. The pngs can live in the main repository.
  84. The movies should be added to the ``jupyterlab-media`` repository.
  85. - Use `www.youtube-nocookie.com` website, which can be found by
  86. clicking on the 'privacy-enhanced' embedding option in the Share dialog on YouTube.
  87. Add the following parameters the end of the URL ``?rel=0&showinfo=0``.
  88. This disables the video title and related video suggestions.
  89. - It is often helpful to have a colored background to highlight the
  90. content of an animation or screenshot. If a colored background is
  91. needed, use Material Design Grey 500 (``#9e9e9e``).
  92. - Screenshots or animations should be proceeded by a sentence
  93. describing the content, such as "To open a file, double-click on its
  94. name in the File Browser:".
  95. - Ideally each screenshot or animation should have a drop shadow, but
  96. it is unclear if we should do that beforehand or in CSS (the xkcd
  97. extension tutorial has images with shadowns already - let's think
  98. through this.)
  99. To help us organize them, let's name the files like this:
  100. ::
  101. sourcefile.md
  102. sourcefile_filebrowser.png
  103. sourcefile_editmenu.png
  104. This will help us track the images next to the content they are used
  105. in.