Use case or problem
I want to enrich the content of the active note without either:
- relying on the sidebar elements in the left or the right sidebar (consider them collapsed just like in the mobile UI)
- relying on a template within the page to render something akin to a dataview view.
I want the pieces of content to be immediately visible on the mobile and feel like they are a natural continuation of the page. The backlinksEl
does just that in both editor and render mode, but it’s heavily special-cased.
Proposed solution
I see two possible options. A first option adds a “bottom” sidebar, which allows to park any view in there. It works with any kind of a leaf be it markdown or a picture. It doesn’t exactly solve the issue on the mobile, because the bottom sidebar will either have to be always visible, eating into vertical space, or being hidden under a toggle, at which point it’s exactly like the current sidebar.
The other option, which I consider more preferrable, is generalizing the MarkdownView
’s backlinksEl
mechanism by allowing the plugins to add a view that will be rendered in the footer of either the editor or the renderer, so it’s visible in both live edit and view modes. This will, undoubtedly come with a need to be able to reorder the views within.
The important distinction of such container would be that it’d be part of the main scroll area, thus visually being extremely related to the content. It will allow more flexibility in extending the mobile UI for immediate data and actions as you’d only need to swipe to the bottom at most, as opposed to operating the side panels to even know if there’s any extra content.
Current workaround (optional)
You can hook the output in registerMarkdownPostProcessor
and add a footer there. It only works in a rendered view, though.
You can also steal the MarkdownView
’s backlinksEl
by digging into app.workspace.getLeavesOfType('markdown')[0].view.backlinksEl
. It kind of works, but not without issue, and it breaks the existing functionality, obviously. With how it’s owned, there’s no easy way to monkeypatch around it.