Skip to content

Return only "text" via selection #274

@mdroidian

Description

@mdroidian

Requested from Christian K. via slack

Use Case

  • the user is querying blocks that include text and an arbitrary amount of [[pages]], #tags, and {{buttons}}
  • the user wants to display only the text
  • as the number and location of the undesired parts of the block are indeterminate, this can be difficult to achieve with with node:node:/regex/

Proposed Solution

  • add a new Selection data type that returns only text
    • eg: it removes any [[pages]], #tags, or {{buttons}}
  • something like node:node:text-only

Unsure how we'd handle block references ((9EzwbaEJs)), especially when they contain [[pages]], #tags, or {{buttons}}

Workaround

For now, users can remove the undesired parts in embed view via css:

/* targeting Query Builder results table */
/* only from column titled "text" */

/* hide all [[links]] and #tags */
.roamjs-query-results-view td[data-column-title="text"] .rm-page-ref__brackets,
.roamjs-query-results-view td[data-column-title="text"] .rm-page-ref
{
    display:none;
}

/* hide checkboxes */
.roamjs-query-results-view td[data-column-title="text"] .check-container
{
    display:none;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions