PRIVACY_MODE

Purpose

Allows us to hide information we consider confidential when others can see our Roam database or when doing a presentation. It does this by redacting (crossing out the information with a black line through the confidential information).

Issues

Define keyboard shortcut

Currently CTRL+ALT+P -- need to see if that conflicts on all OS

{{[[DONE]]}} Windows

{{[[DONE]]}} iPad

{{[[DONE]]}} Mac

{{[[TODO]]}} Chrome OS

Live preview

{{[[TODO]]}} The command can currently be invoked separately in Live Preview window. Need to link the main UI with the live preview UI

Configuration

A page named "Roam42 Privacy Mode List" is defined in the Roam graph

This page is made for the user if they turn on privacy mode and the page is not already in their database. They will be moved to this new page, and will get a prompt to add blocks.

The page can also be created by the user. But it must be named Roam42 Privacy Mode List

In this configuration page, define which [[ pages ]] and tags # to exclude. One exclusion per block in this page. It would like this:

! - If there is a exclamation mark in front of the page or tag, it tells privacy mode to redact the page name or tag only when it displays, and not to redact their child blocks.

Rules for Redaction

All blocks that fit the following requirements are covered with a back bar and thus signaled as REDACTED

Blocks that include page references for any private pages

Blocks that are indented underneath any of those blocks

Blocks that are included in the actual page contents for any of the private pages

If the private page is defined with ! (see configuration) - then only the page name or tag name are redacted, not its children

If you click on the parent block of a redaction (except where the entire page is redacted), the parent block is exposed

All redacted blocks are still live, which means they can be edited or any embedded links still work, even though you don't see content. In other words, REDACTED is not a READ-ONLY Block, it is just made unreadable.

Kanban and Table - works but is aggressive in interpretation of what should be redacted.

Diagrams - works, but good to test the results are what you expect - no guarantees

Privacy mode does not work in: Graph views, Mermaid Diagrams, alias , code blocks

Cautions

Graph views of pages are not supported by Privacy Mode

Before showing your database to others, it is very good to test the privacy mode will work in the way you anticipate.

Privacy mode watches changes in the web page and redacts information as they are shown. This means that some information may appear in just milliseconds even though not visible to the human eye, might be captured in video depending on the speed of your hardware.

Also, the browser may not always trigger page changes, causing redaction ghosts. If this happens, toggle Privacy Mode off and then back on.

Customizing with CSS

Using roam/css the redaction formatting can be overridden. This is the default CSS selectors and definition of the Roam42 Privacy Mode

.roam42-privacy-block, .roam42-privacy-block * {
  color:      black !important;
  background: black !important;
}```

**Troubleshooting:**

Some themes will override the default CSS settings of the Roam42 Privacy Mode. One solution to resolve this issue is to place this block of custom CSS after the CSS for your theme in roam/css.