-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
feat: adding support to markdown cells (#247) #248
Conversation
Taking back comments from #247 (comment) here
This cell is probably there, but you need to set the css height in Cell.tsx
Yes, agree for a rename.
I took over your changes and had to case the _cell based on the type to make it build. I guess you will need to do that, storing the _type as a field in CellAdapter driving to manual conditions like e.g.
I have a basic Markdown cell which lacks the Markdown rendering You have to inspire from the code in NotebookAdapter to add the getMarked(), so changing
|
Thank you very much for the feedback @echarles! I have implemented the suggested changes (except for renaming I am still working on some extra points that are not 100% okay, such as:
I will continue working on these points, but if you have any more direct suggestions, I would appreciate it! One last issue that bothered me a bit is that I had to condition many places to the type of the cell (both in the |
Awesome!
There is probably a listener to be added. The best would be to look at the core jupyterlab notebook and see how it is done there to reuse the existing machinery https://github.com/jupyterlab/jupyterlab/tree/main/packages/notebook-extension/src
Yes, CellCommands is where you have to add that shortcut.
You mean when you resize the browser? of when you change the content of the cell?
No ideal, but good for now. |
@echarles, I believe I have addressed all the points we discussed. I am doing another round of review and testing, and I will communicate here shortly so that a review can be done when possible. |
c8420ca
to
cbee9ac
Compare
@echarles, Documenting a few points here:
When we change the content of the cell. For some reason this also only happens when the toolbar is active. In my use case, I initially don't want to use the default toolbar, so I "partially" created an interface to allow us to parameterize some UI aspects, such as whether the toolbar will be included in the
I looked into the core packages and did not find any registered command that does this. It seems the implementation is indeed through event detection in the DOM and changing the state (rendered) flag. The implementation I did in ( In general, I also know that part of the code can be improved/enhanced, but I tried to do it in a "minimally viable" way without injecting too much complexity into the current code and components. Please point out anything you disagree with, and I will gladly make the adjustments. |
Thank you so much @MarcosVn. I have checked the source and that looks good to me. We can for sure enhance further after. I have run the CI and it was failing.. Failed tasks:
I will still merge as it and come with a follow-up PR if needed. |
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.
LGTM Thx @MarcosVn
Thank you! |
Written partially the solution for the #247.
some issues still need to be discussed.