Need a way to find enclosing cell from a dom element on the page
- Dominant language
- Jupyter Notebook
- Stars
- 13.3k
- Forks
- 5.8k
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 7
Description
For jupyter-incubator/declarativewidgets/issues/125 we needed a way to get a hold of the enclosing cell of one of our elements to then have the correct callbacks to handle messages like `display_data`.
We looked around and could not find a better way than to do `$(this).parents(".cell").data().cell` (obviously with the right checks).
It seems that we should have a utility method that would do this for us somewhere in IPython.notebook. Also, it should be something that would allow Thebe-like environments to also work (something as simple as a well-known method that could be redefined by the environment).
/cc @Carreau
Contributor guide
Research direction
Start by inspecting the IPython.notebook APIs and the existing $(this).parents(".cell").data().cell lookup described in the issue. Define the utility's behavior for finding an enclosing cell and its override point for Thebe-like environments; done means both notebook and redefined-environment lookups are supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jquery, jupyter-notebook
- Domain
- api, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100