-
Notifications
You must be signed in to change notification settings - Fork 56
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
New Table of Contents element #30
Merged
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
47aa334
new toc element
shashankp 296e235
toc aside
shashankp 9ec0587
improve naming
shashankp 4f58a66
mouse over and out events
shashankp a839f3b
right class for mouse hover actions
shashankp 40e2518
dont use hint
shashankp c0c1e2b
limit display text
shashankp e50b4fd
css stuff
shashankp 4e59a2c
smooth scroll to target
shashankp d1d9c19
highlight pluto-cell shoulder
shashankp 2c57f55
anchor full width is clickable
shashankp 63d1105
cleanup
shashankp 9ca7b57
Better UI
shashankp cef3ca5
sync with origin
shashankp a865fd0
react to cell_output_changed event
shashankp 709a963
fun
shashankp 8792733
Merge branch 'master' into TableOfContents-element
shashankp fac4137
move out of builtins into a separate file
shashankp 743847d
Merge branch 'master' into TableOfContents-element
shashankp 67bae9f
Merge branch 'TableOfContents-element' of https://github.com/shashank…
shashankp f855693
Update TableOfContents.jl
fonsp b1211ee
Allow multiple ToCs
fonsp 8805292
use mutationobserver instead of event
fonsp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Would it make sense to have the allowed headers as input argument? E.g. the user would provide the level depth they require (1 to 6) and only headers up to this depth are used in the ToC?
If LaTeX has any value here, I would argue that the default depth should be 3 (because in latex by default you get section numbering up to e.g.
2.2.3
)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.
(but this is a minor comment - please don't let it hold this PR back)
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.
Added the depth limit. ✅
Tempted to do auto numbering, but wouldn't it be jarring? a section name would have a number in the TOC, but not in the actual location. I'd rather let user do the numbering.
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.
I don't know how the plugin of Jupyter does it, but the autonumbering there is reflected in both the TOC and the headers. So the headers will literally display 1.1 Header. But maybe this is too invasive or just too hard to do from the design of Pluto?
(to be honest I actually liked the auto numbering)
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.
Yes, updating the user created content itself would be invasive & fraught with assumptions.
Lets see the feedback on auto-numbering only in TOC.
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.
I've checked Jupyter again and they only change the display. So if I have markdown sections:
they will be displayed (or rendered) as "1. Title, 1.1 Subtitle, 2. Next title", but when I double click the markdown cells to edit them, the numbers are not there. So it is only what displayed that is altered and thus I would call it non-invasive.
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.
Header cells would need to store the numbering in their state making them special markdown cells. Adding this hidden state from an external PlutoUI addon seems invasive 🤔