-
Notifications
You must be signed in to change notification settings - Fork 54
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
vdk-jupyter: Change root FS position for path parameter #2550
vdk-jupyter: Change root FS position for path parameter #2550
Conversation
Currently, VDK commands in Jupyter require a path parameter which points to the location of the data job relatively to the current location of the user in the Jupyter file system menu on the right. This is suboptimal, as it makes it less consistent to use and is the cause of at least one bug. This change streamlines this by making it so the path parameter is always assumed to point relatively to the FS location where Jupyter was instantiated. This means all commands will expect the same path param value for a given job, regardless of where the user is currently located within the Jupyter FS menu. This also fixes a bug where a job inside a given directory cannot be ran from inside that directory. Testing done: only manual so far, working on an actual test Signed-off-by: Gabriel Georgiev <gageorgiev@vmware.com>
projects/vdk-plugins/vdk-jupyter/vdk-jupyterlab-extension/vdk_jupyterlab_extension/vdk_ui.py
Outdated
Show resolved
Hide resolved
Signed-off-by: Gabriel Georgiev <gageorgiev@vmware.com>
…on/gageorgiev/jupyter-default-selected-button Signed-off-by: Gabriel Georgiev <gageorgiev@vmware.com>
for more information, see https://pre-commit.ci
...plugins/vdk-jupyter/vdk-jupyterlab-extension/ui-tests/tests/vdk-jupyterlab-extension.spec.ts
Show resolved
Hide resolved
projects/vdk-plugins/vdk-jupyter/vdk-jupyterlab-extension/vdk_jupyterlab_extension/vdk_ui.py
Show resolved
Hide resolved
projects/vdk-plugins/vdk-jupyter/vdk-jupyterlab-extension/vdk_jupyterlab_extension/vdk_ui.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Please make sure that nothing in the front-end remains that works with the previous implementation!
For example does this cover the use-case od default job-input which fetches the current directory from the server and if the user does not modify it, it uses it? I am not exactly sure how it was working but please check it. If it seems all fine I will approve the pr
projects/vdk-plugins/vdk-jupyter/vdk-jupyterlab-extension/src/components/VdkTextInput.tsx
Outdated
Show resolved
Hide resolved
projects/vdk-plugins/vdk-jupyter/vdk-jupyterlab-extension/src/components/VdkTextInput.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge it.
I am still not confident adjustInputWidth logic is worth the cost (dev, maintenance, performance) but it's an usability improvement and I am all for that. So we will evaluate as we see how it's used and if it causes issues.
Currently, VDK commands in Jupyter require a path parameter which points to the location of the data job relatively to the current location of the user in the Jupyter file system menu on the right.
This is suboptimal, as it makes it less consistent to use and is the cause of at least one bug.
This change streamlines this by making it so the path parameter is always assumed to point relatively to the FS location where Jupyter was instantiated. This means all commands will expect the same path param value for a given job, regardless of where the user is currently located within the Jupyter FS menu.
This also fixes a bug where a job inside a given directory cannot be ran from inside that directory.
Some UI changes were also introduced, now the placeholder for the path contains the whole Jupyter path and the input is adjusting to the size of the placeholder (since we put the whole relative path it can become a long string)
This UI change gives hint to the user what we expect for the input and makes it proof for user mistakes.
Testing done: only manual so far, working on an actual test