RFC: I don’t know if my suggestion is a good idea or if there is a rationale behind the current system that I just don’t understand. Comments are greatly appreciated.
- I’m not sure if I’d like transparent portals in addition to normal portals or if normal portals should be changed into transparent portals. Are there good use cases (things you have in your workflow) which require the current system and which are not possible with transparent portals?
- I have not used other software and it seems to me that how I describe it is just like other apps like Roam do it. Is that true?
I came across this while tinkering a bit with the markup and realizing that portals do not fit as nicely between other rem such that one has to treat them as a special case.
I’d like to have more transparent portals that behave just like any other rem which I describe in the following.
Anatomy of a (normal) Portal
Portals are RemNote’s way to transclude bullet points (transclude = transparently include = editable copy).
A portal consists of three parts:
- Portal Top: This is just a handler to select the portal and display the three dots menu of the portal which is mainly just to turn the portal into an embedded queue.
- Portal Content: A view into another document/top-level rem.
- Usually you want to portal in one/some child(ren) of this while having its/their ancestors hidden. In the example above the portaled target rem is
Dev Helper
. - You see that the target rem is actually indented one level further than its intended sibling
Another Child
outside the portal. - The hidden parents are displayed as breadcrumbs.
- You can look around in this document, unhide siblings and parents and optionally when you are done
/Hide parents & siblings
again.
- Usually you want to portal in one/some child(ren) of this while having its/their ancestors hidden. In the example above the portaled target rem is
- Add Rem after Portal: A clickable space to add a new rem. The idea is that you can’t add a rem if you press enter in the portal, because it adds a bullet point there.
Note:
- A single portal can even host multiple rem, but I still don’t know how to do that reliably. (And with transparent portals it does not matter if they are separate or not because they would look just like a list of normal rem. Update: I just discovered that a the Ctrl + S (Add a portal) is actually supposed to add a rem to a portal if a portal is focused. I was just pretty confused. I even made this issue: Inconsistent Portal UX.
Transparent Portals
A transparent portal just a single transcluded bullet point.
- The design should be very discreet: (Challenge: Find something that works for portals inside portals.)
- add a light background color
- color/shape the bullet point
- color the indent guide
- (I think roam underlines. I don’t like that)
- On focus/hover you see the breadcrumb from where the bullet point is transcluded. This is hidden otherwise.
- You can add children to the transcluded bullet point which are added to the transcluded document like expected.
- If you outdent a transcluded child it is removed from the transcluded document and added to the current document. And vice versa (indent adds to transcluded document).
- Moving the transcluded bullet point is moving the portal. It does not change the transcluded document.
Implementation
IDK if everything checks out, I’m just brainstorming:
- The transcluded bullet point gets in addition to its normal
parent
a list oftransclusionParents
. - The parent of the transcluded bullet point has just the original
_id
of the transcluded bullet point in its list of (visible) children. - That the bullet point is transcluded is given by the
- Transcluded bullet points get a single CSS class on its
.tree-node-container
. This should be sufficent to style accordingly.
Alternatively: Suggested Changes to the Normal Portal
(Again: If there are valid use cases for normal portals then they should stay in RemNote - maybe with a few improvements - and transparent portals can be implemented additionally.)
- Remove the Portal Top? (You need a top the portal consists of multiple rem.)
- Dedent the target one further level? (Does not really work, does it?)
- Remove the “Add Rem after Portal”. Usually the whitespace strange to have and I don’t want to tough the mouse anyway.
- Maybe let the user decide to remove with Custom CSS.
- Add a keyboard shortcut (ctrl + alt + enter) to enter out of the portal. This also applies to code blocks.
Hmm, I think I want transparent portals in addition to normal portals?