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

No event fired when item clicked in FileBrowser #6269

Closed
yuvipanda opened this issue Apr 29, 2019 · 6 comments · Fixed by #6270
Closed

No event fired when item clicked in FileBrowser #6269

yuvipanda opened this issue Apr 29, 2019 · 6 comments · Fixed by #6270

Comments

@yuvipanda
Copy link
Contributor

@yuvipanda yuvipanda commented Apr 29, 2019

I'm trying to see how I can get notified from the FileBrowser component when a file is double clicked. Unfortunately, there seems to be no way to do this. The only notification mechanism available is via DocumentRegistry, which also assumes that you're going to create a new widget with it.

Would love to have a callback that notifies it whenever an item is double clicked.

@yuvipanda
Copy link
Contributor Author

@yuvipanda yuvipanda commented Apr 29, 2019

@yuvipanda
Copy link
Contributor Author

@yuvipanda yuvipanda commented Apr 29, 2019

And I couldn't attach my own handler and use browser.modelForClick since it looks like the doubleClick handler isn't being fired - possible because of preventDefault() in the JupyterLab code?

@yuvipanda
Copy link
Contributor Author

@yuvipanda yuvipanda commented Apr 29, 2019

What I'd like is a Signal in DirListing that is triggered whenever an 'open' style event (double click, enter, etc) happens.

@jasongrout
Copy link
Contributor

@jasongrout jasongrout commented Apr 29, 2019

Do you have a specific file type in mind? One thing you could do right now is register a default handler for that file type. You have to return a widget, so just return a simple widget saying "look in your other tab", and have your opening code also open a new tab.

I think we should also change it. Just saying what you can do for now.

@jasongrout
Copy link
Contributor

@jasongrout jasongrout commented Apr 29, 2019

I had thought that since you want to take over the open event, perhaps we should just make the openers optionally return a widget. If they don't return a widget, then it is assumed the opener handled the file some other way outside of jlab, and we are no longer responsible for that open view of the file.

@blink1073 blink1073 removed this from the 1.0 milestone May 9, 2019
@blink1073 blink1073 added this to the 1.1 milestone May 9, 2019
@lock
Copy link

@lock lock bot commented Aug 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related discussion.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants