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

Fix timeline feature error when base url is set #402

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Meriem-BenIsmail
Copy link
Contributor

This PR fixes #393

Copy link
Contributor

Binder 👈 Launch a Binder on branch Meriem-BenIsmail/jupyter-collaboration/baseurl-bug

@krassowski krassowski added the bug Something isn't working label Nov 18, 2024
@davidbrochart
Copy link
Collaborator

Failures seem to be unrelated (see #403).
I will look at that.

Copy link
Collaborator

@davidbrochart davidbrochart left a comment

Choose a reason for hiding this comment

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

Since #393 seems to suggest an issue with the server base URL, should you make use of it in this PR? The baseUrl is available in JupyterLab's page config.

@Meriem-BenIsmail
Copy link
Contributor Author

Since #393 seems to suggest an issue with the server base URL, should you make use of it in this PR? The baseUrl is available in JupyterLab's page config.

The problem isn't actually with the baseUrl, it's just that the document name was being incorrectly extracted.

@davidbrochart
Copy link
Collaborator

Could you write a test that shows that this was indeed the cause of problem? In particular, I'd like to see that your fix works even if "api/collaboration/timeline" is present in the base URL.

@Meriem-BenIsmail
Copy link
Contributor Author

Currently, the updated logic ensures that only the last occurrence of api/collaboration/timeline is picked up, so it should handle the base URL scenario as expected. Given this, the fix seems okay for the mentioned issue.

Would you still like me to add a specific test to verify this behavior?

I also want to mention that there’s another open PR (#401) that creates a test file for the timeline slider. If I add a test here, it would create or modify the same file, potentially leading to conflicts later. Let me know how you'd like to proceed—whether to hold off on tests for this PR until #401 is merged or go ahead and add them now.

@@ -20,6 +20,7 @@ type Props = {
contentType: string;
format: string;
};
const DOCUMENT_TIMELINE_URL = 'api/collaboration/timeline';
Copy link
Collaborator

Choose a reason for hiding this comment

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

We already have it here and here. Should it be in one place?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I will fix that. Thanks for the feedback !

@davidbrochart
Copy link
Collaborator

Yes it would be nice to have a test. I merged #401.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Timeline slider not shown when base_url is set
3 participants