ploomber / jupysql

Better SQL in Jupyter. 📊
https://jupysql.ploomber.io
Apache License 2.0
723 stars 76 forks source link

JupyterLab settings not respected #1010

Closed psychemedia closed 5 months ago

psychemedia commented 6 months ago

What happens?

Initialising a new jupyterlab environment with default settings to disable the display of the Share notebook and Format SQL toolbar buttons, the settings are not respected although the settings editor describes them correctly.

image

Enabling then disabling the setting from the settings panel does then correctly hide the buttons.

To Reproduce

I used the following settings:

In .jupyter/lab/user-settings/ploomber-extension/settings.jupyterlab-settings:

{
    "showShareNotebook": false
}

In .jupyter/lab/user-settings/jupysql-plugin/settings.jupyterlab-settings:

{
    "showFormatSQL": false
}

Start the jupyter server, open a notebook, and the buttons are displayed.

OS:

Linux Ubuntu

JupySQL Version:

0.10.10

Full Name:

Tony Hirst

Affiliation:

The Open University

psychemedia commented 6 months ago

Actually, another way to recreate is just to untick the settings in the Jupyterlab extensions settings, then open a new notebook,. The new notebook displays the buttons. If you then tick and untick then tick the settings, the button remains, disappears, reappears.

So the decision to decide whether or not to display a button when the notebook is opened is broken,

JupyterLab Version 4.2.0

edublancas commented 6 months ago

thanks, we'll look at this

in the meantime, you can try uninstalling jupysql-plugin after installing jupysql, that should remove both buttons

edublancas commented 5 months ago

Note: we fixed the "share notebook" button. we're working on a fix for the "format SQL" (they're in different repos)

making a new release of ploomber-extension shortly

edublancas commented 5 months ago

the "format sql" issue has been fixed in jupysql-plugin 0.4.4