Skip to content
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

Return only "text" via selection #274

Open
mdroidian opened this issue Aug 9, 2024 · 0 comments
Open

Return only "text" via selection #274

mdroidian opened this issue Aug 9, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@mdroidian
Copy link
Collaborator

mdroidian commented Aug 9, 2024

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;
}
@mdroidian mdroidian added the enhancement New feature or request label Aug 9, 2024
@mdroidian mdroidian added this to Backlog Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant