navigation_panel.rst (8148B)
1 ================ 2 Navigation Panel 3 ================ 4 5 The navigation panel provides various features for the current file. 6 7 .. image:: img/navigation-panel.png 8 :class: border 9 :alt: The navigation panel 10 :width: 288px 11 12 In the directory listing and some other cases, the navigation panel is collapsed by default. 13 Clicking the triangle icon at the left end expands/collapses the navigation panel. 14 15 .. image:: img/navigation-panel-collapsed.png 16 :class: border 17 :alt: The navigation panel in a closed state 18 :width: 193px 19 20 If the window width is less than 1024px, the panle is collapsed by default also in the source listing. 21 This behavior can be configured in the `settings page <https://searchfox.org/firefox-main/pages/settings.html>`_. 22 23 Header 24 ------ 25 26 The navigation panel provides various features for the current file. 27 28 .. image:: img/navigation-panel-header.png 29 :class: border 30 :alt: The navigation panel header 31 :width: 320px 32 33 Toggle button 34 Expand/collapse the navigation panel. 35 36 Help button 37 Open this documentation. 38 39 Settings button 40 Open the `settings page <https://searchfox.org/firefox-main/pages/settings.html>`_. 41 42 43 Enable keyboard shortcuts 44 Enable the keyboard shortcuts for the panel items. 45 46 Source code 47 ----------- 48 49 This section provides feature related to the current file. 50 51 Go to header file/Go to source file 52 Open the corresponding source or header file. 53 54 This item is shown if the current file is C++ source (``.cpp``, ``.cc``, ``.cxx``) or header file (``.h``, ``.hh``, ``.hpp``, ``.hxx``) and there's corresponding source or header file exists. 55 56 File a bug in ... 57 Open the Bugzilla new bug page for the associated Bugzilla component. 58 59 This item is shown whwn the current file/directory has an associated Bugzilla component. 60 61 Revision control 62 ---------------- 63 64 This section provides feature related to the VCS. 65 66 Permalink 67 Convert the current document's URL into a revision-specific URL. 68 69 This item is shown when opening a revision-agnostic URL. 70 71 For example, if you click the item while you're on ``https://searchfox.org/firefox-main/source/js/src/jsapi.h``, It converts the current URL into ``https://searchfox.org/firefox-main/rev/3f22e78e34249196edab0a5b756394169533b8a1/js/src/jsapi.h`` (the revision ID part depends on the latest revision at that point.) 72 73 The former URL shows the file content of the latest revision at the point of opening the page, and the latter URL shows the file content of the given revision. 74 75 Searchfox index is updated twice a day for the main branches, and this means the file content can change twice a day. This URL is handy for sharing the code in bug comments or in chat, where people can open the link later. 76 77 This item has associated shortcut key :kbd:`Y`, and hitting the :kbd:`Y` key also does the same. 78 79 Clicking the "Copy to clipboard" button next to this copies the permalink into your clipboard. 80 81 See the :ref:`searchfox-copy-as-markdown` section below for more info about sharing code or reference. 82 83 Remove the Permalink 84 Convert the current document's URL into a revision agnostic URL. 85 This is the opposite operation of the "Permalink" above. 86 87 This item is shown when opening a revision-specific URL, where the revision is the latest revision. 88 89 Go to latest version 90 Opens the revision-agnostic URL of the current file. 91 92 This item is shown when opning a revision-specific URL, where the revision is not the latest revision. 93 94 Git log 95 Open the log of the current file on GitHub. 96 97 This item is shown when the current repository is hosted on GitHub. 98 99 Mercurial log 100 Open the log of the current file on ``hg.mozilla.org``. 101 Hitting the :kbd:`L` key also does the same. 102 103 This item is shown when the current repository is hosted on ``hg.mozilla.org``. 104 105 Raw 106 Open the raw file of the current file. 107 108 This is shown when the repository has a raw file link. 109 110 Blame 111 This is just a placeholder. 112 The blame information is shown in the :ref:`Blame strip <searchfox-blame-strip>`. 113 114 Show changeset 115 Open the changeset information for the current diff, hosted on Searchfox. 116 117 This item is shown on the annotated diff view. 118 (See :ref:`Blame <searchfox-blame>` for the link for the annotated diff view.) 119 120 121 Show file without diff 122 Open a revision-specific URL of the current file before the current diff is applied. 123 124 This item is shown on the annotated diff view. 125 (See :ref:`Blame <searchfox-blame>` for the link for the annotated diff view.) 126 127 Symbol 128 ------ 129 130 .. image:: img/navigation-panel-symbol.png 131 :class: border 132 :alt: The navigation panel Symbol section 133 :width: 362px 134 135 This is behind the alpha feature gate "Fancy Bar". 136 137 This section shows the currently-selected symbol's qualified name. 138 139 This provides a button to copy the qualified name to clipboard. 140 141 .. _searchfox-copy-as-markdown: 142 143 Copy as Markdown 144 ---------------- 145 146 This section provides a feature to copy the selected file/symbol/code as Markdown. 147 This is handy for sharing the reference in bug comments or in chat. 148 149 Filename Link 150 Copy the current file's revision-specific URL, with the filename, as Markdown. 151 Hitting the :kbd:`F` key also does the same. 152 153 154 For example, if you're on ``https://searchfox.org/firefox-main/source/js/src/jsapi.h#107``, clicking this copies the following text to clipboard. 155 156 .. code-block:: 157 158 [jsapi.h](https://searchfox.org/firefox-main/rev/3f22e78e34249196edab0a5b756394169533b8a1/js/src/jsapi.h#107) 159 160 The link includes the currently-selected lines. 161 162 Symbol Link 163 Copy the current file's revision-specific URL, with the currently-selected symbol, as Markdown. 164 Hitting the :kbd:`S` key also does the same. 165 166 For example, if you're on ``https://searchfox.org/firefox-main/source/js/src/jsapi.h#128`` where the line has ``JS::InformalValueTypeName`` function declaration, clicking this copies the following text to clipboard. 167 168 .. code-block:: 169 170 [JS::InformalValueTypeName](https://searchfox.org/firefox-main/rev/3f22e78e34249196edab0a5b756394169533b8a1/js/src/jsapi.h#128) 171 172 The link includes the currently-selected lines. 173 174 Code Block 175 Copy the currently-selected lines as a Markdown code block. 176 Hitting the :kbd:`C` key also does the same. 177 178 This is handy for sharing the code in a bug comment, while explaining the execution flow. 179 180 For example, if you're on ``https://searchfox.org/firefox-main/source/js/src/vm/JSObject.cpp#115-119,136-141`` page, where multiple lines are selected, clicking this copies the following text to clipboard. 181 182 .. code-block:: 183 184 https://searchfox.org/firefox-main/rev/3f22e78e34249196edab0a5b756394169533b8a1/js/src/vm/JSObject.cpp#115-119,136-141 185 ```cpp 186 JS_PUBLIC_API const char* JS::InformalValueTypeName(const Value& v) { 187 switch (v.type()) { 188 case ValueType::Double: 189 case ValueType::Int32: 190 return "number"; 191 ... 192 case ValueType::PrivateGCThing: 193 break; 194 } 195 196 MOZ_CRASH("unexpected type"); 197 } 198 ``` 199 200 Other Tools 201 ----------- 202 203 This section shows links to externsion tools. 204 205 HG Web 206 Open the the current file on ``hg.mozilla.org``. 207 208 This item is shown when the current repository is hosted on ``hg.mozilla.org``. 209 210 Code Coverage 211 Open the code coverage result of this file. 212 213 This item is shown when the current file has code coverage result. 214 215 Source Docs 216 Open the rendered view of the current file on ``https://firefox-source-docs.mozilla.org/``. 217 218 This item is shown when the current file is a document file (``.md`` or ``.rst``) for Firefox Source Docs. 219 220 GitHub Rendered view 221 Open the rendered view of the current file on GitHub. 222 223 This item is shown when the current file is a document file. 224 225 Debug 226 ----- 227 228 This section is behind the "Show debugging UI" setting. 229 230 Raw analysis records 231 Open a raw analysis file for the current file. 232 233 This item is shown when opening a file. 234 235 Show debug log/Hide debug log 236 Show/hide the debug log of the current query. 237 238 This item is shown in the query endpoint. 239 240 Show results JSON/Hide results JSON 241 Show/hide the raw JSON of the current query result. 242 243 This item is shown in the query endpoint.