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

Updated fav-icon Base URL from JupyterLab PageConfig. #7109

Merged
merged 5 commits into from
Oct 17, 2023

Conversation

jayeshsingh9767
Copy link
Contributor

We were Getting 404 because base URL of binder(different base url) was used for fetching fav-icons I have update code to use Base URL from JupyterLab PageConfig.
This closes issue #7076

@github-actions
Copy link
Contributor

Binder 👈 Launch a Binder on branch jayeshsingh9767/notebook/update-fav-base-url

@@ -422,10 +426,10 @@ const tabIcon: JupyterFrontEndPlugin<void> = {
) as HTMLLinkElement;
switch (status) {
case 'busy':
link.href = busyIcon;
link.href = baseURL + busyIcon;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this string concatenation be moved above where notebookIcon and busyIcon are defined?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also it could be combined with URLExt.join() (some example uses in this repo).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the Quick review. This will be more readable. have Updated the PR.

@jtpio jtpio added the bug label Oct 17, 2023
@jtpio jtpio added this to the 7.0.x milestone Oct 17, 2023
@jayeshsingh9767
Copy link
Contributor Author

@jtpio could u please guide me about why Build / Test Lint (pull_request) is failing?, Logs of the job are pointing to file /notebook/blob/main/notebook/app.py.

@jtpio
Copy link
Member

jtpio commented Oct 17, 2023

The lint failure looks related to an upstream change, maybe this new release? https://github.com/jupyter-server/jupyter_server/releases/tag/v2.8.0

Similar to #7104, we can fix that separately.

@jtpio jtpio mentioned this pull request Oct 17, 2023
@jtpio
Copy link
Member

jtpio commented Oct 17, 2023

FYI @jayeshsingh9767 I've updated the branch to include #7104, which should hopefully help fix the CI.

@jtpio
Copy link
Member

jtpio commented Oct 17, 2023

The new failure can likely be fixed by running jlpm prettier at the top-level (normally done automatically via the pre-commit hook though).

@@ -38,6 +38,9 @@ import { Widget } from '@lumino/widgets';

import { TrustedComponent } from './trusted';

import { PageConfig, URLExt } from '@jupyterlab/coreutils';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These imports can be grouped with the other imports above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it will update the PR.

Copy link
Member

@jtpio jtpio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Just checked with a different base URL and it seems to be working fine:

favicons-busy-baseurl.mp4

@jtpio jtpio linked an issue Oct 17, 2023 that may be closed by this pull request
@jtpio jtpio merged commit c62caff into jupyter:main Oct 17, 2023
31 checks passed
@jayeshsingh9767
Copy link
Contributor Author

Thanks @jtpio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

404 when loading notebook favicons
3 participants