Skip to content

Commit 5b138da

Browse files
authored
Opentabupdatecodio-15104 (#442)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Re-titled and reorganized guide into "Open Tabs" with new Visualizer and panel settings sections. * Expanded guidance for auto-opening files, alternative Markdown directives, image drag/display behavior, and external URL previews. * Added terminal usage and automated command subsections. * Added stepwise code-highlighting setup, unique-reference guidance, and additional options; standardized headings, notes, images, and style. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent a44c875 commit 5b138da

4 files changed

Lines changed: 90 additions & 84 deletions

File tree

140 KB
Loading

source/img/guides/type_file.png

121 KB
Loading

source/img/guides/type_preview.png

15.6 KB
Loading

source/instructors/authoring/guides/settings/opentabs.rst

Lines changed: 90 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
.. _open-tabs:
55

6-
Open tabs
7-
=========
6+
Open Tabs
7+
==========
88
You can automatically perform any of the following actions when a page is shown:
99

1010
- Reconfigure the overall IDE panel layout.
@@ -14,23 +14,28 @@ You can automatically perform any of the following actions when a page is shown:
1414
- Select lines you wish to highlight within each file.
1515
- Open a :ref:`virtual machine <virtualmachine>` when set up for students.
1616

17-
You should also be aware that you can achieve the same actions from Markdown directives on a page. :ref:`click here <open-close>` for details.
17+
**Opening Files Automatically**
1818

19-
20-
Files can be opened automatically to present the student with relevant files.
19+
Files can be opened automatically to present students with relevant content. You have several options for adding files:
2120

22-
The **Add Tab** button allows you to create multiple lines into your configuration to address most scenarios you are likely to encounter.
21+
- Use the **Add Tab** button to add multiple files to your layout
22+
- Drag and drop files from your project file tree directly onto the **Open Tabs** section
23+
- Drag and drop files onto the Open Tabs area in the content
2324

24-
You can also drag and drop files in from your project file tree to the page to add them to the **Open Tabs** section so that file will be opened in a tab for the reader as well as Drag and Drop on the Open Tabs area in the content.
25+
**Alternative Method**
26+
27+
You can achieve the same functionality using Markdown directives on a page. :ref:`Click here <open-close>` for details.
28+
29+
.. note:: Image files dragged onto a page will be automatically tagged to display within the content rather than in a new panel. If you wish to have an image file open in a panel, you need to add it directly in the Open Tabs area. You can also drag and drop from the file tree. The correct path to the file will be included automatically.
2530

26-
**Please note:** image files dragged in to a page will be automatically tagged to display within the content rather than in a new panel. If you wish to have an image file open in a panel, then you would need to add it directly in the Open Tabs area. You can also drag/drop from the file tree. The correct path to the file will be included.
2731

2832
Opening Files
2933
*************
3034
To open files, select the file type from the drop down and enter the file name, including the path to the file if not in the root (`/home/codio/workspace` or `~/workspace`) of the project workspace.
3135

32-
.. image:: /img/guides/type_file.png
33-
:alt: open file
36+
.. image:: /img/guides/type_file.png
37+
:alt: open file
38+
:width: 450px
3439

3540

3641
To open multiple files in the same panel, enter in the following format:
@@ -41,81 +46,92 @@ index.html, main.css
4146

4247
Previewing
4348
**********
44-
To preview your project, select the **Preview** type from the drop down. If you wish to show a workspace or external website page, use the **Preview** option and enter the appropriate URL.
49+
To preview your project, select the **Preview** type from the dropdown. If you wish to show an external website page, use the **Preview** option and enter the appropriate URL.
4550

46-
.. image:: /img/guides/type_preview.png
47-
:alt: Preview
51+
.. image:: /img/guides/type_preview.png
52+
:alt: Preview
53+
:width: 450px
4854

4955

5056

51-
**Please note:** If the URL you are previewing does not allow embedding in an `<iframe>`, then you won't be able to use `https` addresses. You would have to use an `http` address instead, in which case it will automatically open in a new browser tab and not within Codio.
57+
.. note:: If the URL you are previewing does not allow embedding in an `<iframe>`, then you won't be able to use `https` addresses. You would have to use an `http` address instead, in which case it will automatically open in a new browser tab and not within Codio.
5258

53-
Opening the terminal and running system commands
59+
Opening the Terminal and Running System Commands
5460
************************************************
55-
To open a terminal window, select the **Terminal** type from the drop down.
5661

57-
You can also specify a terminal command to run when a section is displayed. For example, your content may run bash scripts to copy files into the root (`/home/codio/workspace` or `~/workspace`) of your project from the `/.guides` folder (which is hidden when content is running) at a certain point in your content.
62+
Opening a Terminal Window
63+
^^^^^^^^^^^^^^^^^^^^^^^^^
5864

59-
.. image:: /img/guides/type_terminal.png
60-
:alt: terminal
61-
65+
To open a terminal window, select **Terminal** from the type dropdown menu.
6266

67+
Running Commands Automatically
68+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6369

64-
You can also specify system commands in a new terminal window like so:
70+
You can specify a terminal command to run automatically when a section is displayed. This is useful for setup tasks such as:
6571

66-
.. image:: /img/guides/terminal_command.png
67-
:alt: terminal command
68-
72+
- Copying files from the hidden `/.guides` folder into the project root (`/home/codio/workspace` or `~/workspace`)
6973

74+
.. image:: /img/guides/type_terminal.png
75+
:alt: terminal
7076

71-
Highlighting lines in your code
72-
*******************************
73-
To highlight one or more lines within an auto-opened file, select the **Highlight** type from the drop down and then
77+
- Running bash scripts to prepare the environment
78+
- Executing any necessary setup commands at specific points in your content
7479

75-
1. Enter a piece of reference text, contained within your target file, into the **Reference ...** field
76-
2. Specify the number of lines, from that reference point, you want to highlight
80+
.. image:: /img/guides/terminal_command.png
81+
:alt: terminal command
7782

78-
.. image:: /img/guides/type_highlight.png
79-
:alt: Highlight
80-
8183

8284

83-
Using reference text rather than a line number means that if you insert anything into your file in the future, Codio is able to adjust the highlighted block based on the reference text. If you insert or remove lines within the block then you would need to adjust the line count.
85+
Highlighting Lines in Your Code
86+
********************************
8487

85-
If there is any potential ambiguity with this approach, simply insert a comment which is guaranteed unique and reference that.
88+
Setting Up Code Highlighting
89+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8690

87-
Any combinations are acceptable and they will be opened in the order specified.
91+
To highlight one or more lines within an auto-opened file:
8892

89-
If you wish to higlighlight code but not allow students to make any changes, you can :ref:`freeze code <freezecode>` in code files.
93+
1. Select **Highlight** from the type dropdown menu
94+
2. Enter a piece of reference text from your target file into the **Reference...** field
95+
3. Specify the number of lines to highlight from that reference point
9096

91-
.. _code-visualiser:
97+
.. image:: /img/guides/type_highlight.png
98+
:alt: Highlight
9299

93-
Visualiser
94-
**********
100+
Why Use Reference Text?
101+
^^^^^^^^^^^^^^^^^^^^^^^
95102

96-
Codio supports `Python Tutor <http://pythontutor.com>`_, allowing students to overcome a fundamental barrier to learning programming: understanding what happens as the computer executes each line of a program's source code.
97-
Select `Visualiser` and enter the path to your file.
103+
Using reference text instead of line numbers makes your highlighting more resilient to changes. If you add or remove lines elsewhere in your file, Codio automatically adjusts the highlighted block based on the reference text.
98104

99-
**Supported languages:**
105+
.. note:: If you insert or remove lines *within* the highlighted block, you'll need to adjust the line count manually.
100106

101-
- Python
102-
- Java
103-
- JavaScript
104-
- TypeScript
105-
- Ruby
106-
- C
107-
- C++
107+
Ensuring Unique References
108+
^^^^^^^^^^^^^^^^^^^^^^^^^^
108109

109-
Students can visualise what the computer is doing step-by-step as it executes those programs.
110+
If there's any potential ambiguity with your reference text, insert a unique comment in your code and reference that instead.
111+
112+
Additional Options
113+
^^^^^^^^^^^^^^^^^^
114+
115+
- Multiple highlight configurations are supported and will be applied in the order specified
116+
- To highlight code while preventing student edits, you can :ref:`freeze code <freezecode>` in code files
117+
118+
.. _code-visualizer:
119+
120+
Visualizer
121+
**********
122+
123+
Codio supports `Python Tutor <http://pythontutor.com>`_, allowing students to overcome a fundamental barrier to learning programming: understanding what happens as the computer executes each line of a program's source code.
124+
Select `Visualizer` and enter the path to your file.
110125

111-
.. image:: /img/guides/pythontutor.png
112-
:alt: python tutor
113126

127+
Students can visualize what the computer is doing step-by-step as it executes those programs.
114128

115-
Examples
116-
********
129+
.. image:: /img/guides/pythontutor.png
130+
:alt: python tutor
117131

118-
**Python**
132+
133+
Visualizer Example
134+
^^^^^^^^^^^^^^^^^^^
119135

120136
.. code:: python
121137
@@ -126,48 +142,38 @@ Examples
126142
.. image:: /img/guides/PythonVisualizerExample.png
127143
:alt: Python Visualizer Example
128144

129-
**Java**
130145

131-
.. code:: java
146+
For more information and examples see `Python Tutor <http://pythontutor.com>`_.
132147

133-
public static void countdown(int n) {
134-
if (n == 0) {
135-
System.out.println("Blastoff!");
136-
} else {
137-
System.out.println(n);
138-
countdown(n - 1);
139-
}
140-
}
148+
Open Computed VM
149+
****************
141150

151+
Select this option to automatically open the virtual machine for the students.
142152

143-
.. image:: /img/guides/JavaVisualizerExample.png
144-
:alt: Java visualizer Example
153+
.. image:: /img/guides/guides_vm.png
154+
:alt: Open VM
145155

146-
156+
.. note:: If selected but the assignment is not set up for :ref:`virtual machine <virtualmachine>`, nothing will happen for the student.
147157

158+
.. _specify-panel:
148159

149-
For more information and examples see `Python Tutor <http://pythontutor.com>`_.
150160

151-
Open Computed VM
152-
****************
153161

154-
Select this option to automatically open the virtual machine for the students.
162+
Panel Selection
163+
***************
155164

156-
.. image:: /img/guides/guides_vm.png
157-
:alt: Open VM
165+
If your :ref:`layout <page>` includes multiple panels, you can specify which panel to display the file in using the panel letter designation.
158166

159-
.. Note:: If selected but the assignment is not set up for :ref:`virtual machine <virtualmachine>` nothing will happen for the student.
167+
.. image:: /img/guides/panel.png
168+
:alt: Panel
160169

161-
.. _specify-panel:
170+
Panel Ordering
171+
^^^^^^^^^^^^^^
162172

163-
Specifying the panel number
164-
***************************
165-
If your :ref:`layout <page>` for this page involves multiple panels, then you can also specify the panel letter to display the file in.
173+
Panels are ordered from left to right, then top to bottom. The file tree is always last in the sequence.
166174

167-
.. image:: /img/guides/panel.png
168-
:alt: Panel
169-
170-
The panel order is left to right and then top to bottom and the last of all, the filetree (which you would rarely want to use).
175+
Default Panel Behavior
176+
^^^^^^^^^^^^^^^^^^^^^^
171177

172-
The Guide defaults to the right unless **Guides Left** is specified in **Page Layout**.
178+
- The Guide defaults to the right panel unless **Guides Left** is specified in **Page Layout**
173179

0 commit comments

Comments
 (0)