Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding test title #7484

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions notebook/templates/notebooks.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
{% endif %}
</head>
<body class="jp-ThemedContainer" data-notebook="notebooks">
<h1 id="page-title">Test</h1>

{# Copy so we do not modify the page_config with updates. #}
{% set page_config_full = page_config.copy() %}
Expand Down
20 changes: 20 additions & 0 deletions packages/notebook-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,24 @@
},
};

/**
* A plugin to add a "test" title at the top of the notebook.
*/
const addTestTitle: JupyterFrontEndPlugin<void> = {
id: '@jupyter-notebook/notebook-extension:add-test-title',
description: 'A plugin to add a "test" title at the top of the notebook.',
autoStart: true,
requires: [INotebookShell],
activate: (app: JupyterFrontEnd, shell: INotebookShell) => {
const titleWidget = new Widget({ node: document.createElement('h1') });
titleWidget.node.textContent = 'Test';
titleWidget.addClass('jp-NotebookTest-title');

app.shell.add(titleWidget, 'top', { rank: 0 });
}

Check failure on line 606 in packages/notebook-extension/src/index.ts

View workflow job for this annotation

GitHub Actions / Test Lint

Insert `,`
};

Check failure on line 607 in packages/notebook-extension/src/index.ts

View workflow job for this annotation

GitHub Actions / Test Lint

Delete `⏎`


/**
* Export the plugins as default.
*/
Expand All @@ -603,6 +621,8 @@
scrollOutput,
tabIcon,
trusted,
addTestTitle

Check failure on line 624 in packages/notebook-extension/src/index.ts

View workflow job for this annotation

GitHub Actions / Test Lint

Insert `,`
];

Check failure on line 625 in packages/notebook-extension/src/index.ts

View workflow job for this annotation

GitHub Actions / Test Lint

Delete `⏎`


export default plugins;
Loading