-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Store original path as returned from contents API in the Contents.IModel
#13216
Conversation
in the `Contents.IModel` object.
Thanks for making a pull request to jupyterlab! |
@krassowski thanks for pointing out the inconsistency. I would be in favor to force Otherwise I'm 👍 to add the |
CI failures are not relevant |
@meeseeksdev please backport to 3.6.x |
…ntents API in the `Contents.IModel`
… in the `Contents.IModel` (#13375) Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
References
Fixes #13155 using solution (b) as proposed solutions in #13155 (comment). I have moderate doubts on whether this is the best solution; (c) seems cleaner but I am not convinced if getting the cleaner solution is worth introducing a breaking change, see discussion in #13155 (whereas this PR could still be backported to 3.5).
Code changes
Adds optional
serverPath
attribute toContents.IModel
and populates it inContentsManager
methods by path returned by the server.Note: an example of the issue was actually in our tests all along:
DEFAULT_FILE
has pathfoo/test
which is correctly returned when creating a file:jupyterlab/packages/services/test/contents/index.spec.ts
Lines 329 to 335 in 376e52c
but when a file is queried with
get
:jupyterlab/packages/services/test/contents/index.spec.ts
Lines 242 to 249 in 376e52c
then
other:foo
instead ofother:foo/test
gets returned. This PR addsfoo/test
on extra property,serverPath
(which for now is optional in the interface).User-facing changes
None.
Backwards-incompatible changes
None