jupyterlab / jupyterlab/extension-examples

Add custom logo in top right corner ?

Open
#199 5 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
516
Forks
187
PR merge metrics
No merged PRs in 30d

Description

This is what I try to achieve - with a sample logo:

![Screenshot from 2022-06-30 00-07-27](https://user-images.githubusercontent.com/2219383/176553882-b3aac4bc-d05b-4f8d-bb67-dbe5e884012c.png)

To do that manually, I open the console and paste:
```js
var svgStr = `

`;

var parser = new DOMParser();
var doc = parser.parseFromString(svgStr, "image/svg+xml");
var svgElt = doc.documentElement;
svgElt.setAttribute("id", "viewer");
svgElt.setAttribute("width", "165px");
svgElt.setAttribute("height", "");

var wrapper = document.createElement("div");
wrapper.setAttribute(
"style",
"width: 100%; margin: 2px; display: flex; justify-content: end"
);
wrapper.appendChild(svgElt);

var anchor = document.querySelector("#jp-top-panel");
anchor.appendChild(wrapper);
```

My questions are:
+ What is the recommended way to do that ?
+ via an extension ? then what is the most relevant example in this [repo](https://github.com/jupyterlab/extension-examples) ?
+ Is there a placeholder that I can/should use ?
+ Which Jupyterlab [tokens](https://jupyterlab.readthedocs.io/en/stable/extension/extension_points.html#id6), if any, are relevant ?
+ If I wanted to hack it outside the Jupyter framework, which global event should I listen to trigger the code above ?

I would be grateful for any hint/pointer.

Contributor guide

No contributing guide indexed for this repository

Research direction

No file or test is named in the issue. Start by locating the JupyterLab extension entry point that renders the top-right interface and inspect the existing header or toolbar structure. Done means the requested custom logo appears in the top-right corner in a running JupyterLab instance without obscuring existing controls.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.