Skip to content

Conversation

@jtpio
Copy link
Member

@jtpio jtpio commented Jan 31, 2022

References

Fixes #11728

Code changes

  • Check for PageConfig.Extension.isDisabled(data.name)) before loading the styles coming from federated extensions.
  • Document this behavior?

User-facing changes

For example with a federated extension that adds the following CSS:

#jp-topbar-spacer {
  background: blue;
}

Before

image

After

image

Backwards-incompatible changes

This is a change of behavior that some deployments that have been depending on.

A new entry in this section of the docs could then be useful for reference purposes: https://jupyterlab.readthedocs.io/en/latest/extension/extension_migration.html#extension-development-changes

@jtpio jtpio added this to the 4.0 milestone Jan 31, 2022
@jupyterlab-probot
Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

@krassowski
Copy link
Member

Is this still a draft?

@jtpio
Copy link
Member Author

jtpio commented Oct 26, 2022

I think it was left as a draft to double check if there was any side-effect to this.

I'll rebase, fix the conflict and mark as ready.

@jtpio jtpio force-pushed the skip-css-for-disabled-extensions branch from e01ffba to 237ba69 Compare October 26, 2022 07:52
@fcollonval fcollonval marked this pull request as ready for review October 26, 2022 11:29
Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

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

Thanks @jtpio

@fcollonval fcollonval merged commit 731a40e into jupyterlab:master Nov 4, 2022
@jtpio jtpio deleted the skip-css-for-disabled-extensions branch November 14, 2022 07:36
@mlucool
Copy link
Contributor

mlucool commented Dec 16, 2022

Can we backport this to 3.6? Maybe under a flag (which would be more code than the fix)?

@krassowski
Copy link
Member

@meeseeksdev please backport to 3.6.x

@lumberbot-app
Copy link

lumberbot-app bot commented Dec 18, 2022

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 3.6.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 731a40e220ea21d59ca0cfa443d41d7095e5600f
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #11962: Do not load CSS of disabled federated extensions'
  1. Push to a named branch:
git push YOURFORK 3.6.x:auto-backport-of-pr-11962-on-3.6.x
  1. Create a PR against branch 3.6.x, I would have named this PR:

"Backport PR #11962 on branch 3.6.x (Do not load CSS of disabled federated extensions)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

krassowski pushed a commit to krassowski/jupyterlab that referenced this pull request Dec 18, 2022
* Do not load CSS of disabled federated extensions
* Add note to extension migration docs
* Add an opt-in flag for 3.6.x series

(cherry picked from commit 731a40e)
krassowski added a commit to krassowski/jupyterlab that referenced this pull request Dec 18, 2022
* Do not load CSS of disabled federated extensions
* Add note to extension migration docs
* Add an opt-in flag for 3.6.x series

(cherry picked from commit 731a40e)

Co-authored-by: krassowski <5832902+krassowski@users.noreply.github.com>
fcollonval pushed a commit that referenced this pull request Dec 19, 2022
* Do not load CSS of disabled federated extensions
* Add note to extension migration docs
* Add an opt-in flag for 3.6.x series

(cherry picked from commit 731a40e)

Co-authored-by: krassowski <5832902+krassowski@users.noreply.github.com>

Co-authored-by: Jeremy Tuloup <jeremy.tuloup@gmail.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CSS are loaded even for disabled extension

4 participants