Git Product home page Git Product logo

smartblocks's People

Contributors

danyalaytekin avatar dvargas92495 avatar mdroidian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

smartblocks's Issues

Support Versioning in SmartBlocks Store

Stand up S3 bucket to store workflows.

Point each dynamo entry to S3 version for latest.

Should buyers store which version they bought locally?

Could backport this logic for Marketplace.

DATEBASIS:DNP not working correctly for me in SmartBlocks v2

I've noticed that my SmartBlock workflows that rely on <%DATEBASIS:DNP%> aren't working as they should in v2. These workflows seem to set the date as the day prior to the Daily Notes page I'm running the workflow on.

For example, if I run this workflow on the 'October 9th, 2021' DNP ...

<%DATEBASIS:DNP%><%NOBLOCKOUTPUT%>
<%DATE:today%>

... it tells me it's October 8th.

If I run exactly the same workflow using SmartBlocks v1, it tells me (correctly) that it's October 9th.

Unexpected behavior: TODOUNDATED ignores Daily Notes

TODOUNDATED finds undated TODOs in normal pages, but not in Daily Notes. This is unexpected, as the documentation says:

Purpose: Returns a list of block references of TODOs with no date

Without any qualification, I'd expect it to work for TODOs in Daily Notes. Lots of people create tasks in their Daily Notes by default, and without TODOUNDATED we cannot detect when we forgot to schedule a TODO, and it may be lost forever.

For example, I have the following in my Daily SmartBlock:

- <%TODOTODAY%><%SKIPIFEMPTY%>
- ### <%IFCHILDREN%>πŸ“₯ Inbox (unscheduled)
    - <%TODOUNDATED:20,(({uid})),-Now,-Soon,-Later%><%SKIPIFEMPTY%>
- ### <%IFCHILDREN%>⏰ Overdue
    - <%TODOOVERDUE%><%SKIPIFEMPTY%>
- ### <%IFCHILDREN%>πŸ”œ Upcoming
    - <%TODOFUTUREDNP%><%SKIPIFEMPTY%>

This would work almost perfectly to ensure I don't miss any tasks (and that they're all tagged with a date or with Now/Soon/Later) if TODOUNDATED worked with Daily Notes.

Is there any reason why we can't have this feature?

Add Input Commands

Use blueprint alert to capture user input and return to smart block flow.

input should also page/block ref autocomplete

<%DROPDOWN%> for a select with preset options

Add Block Related Commands

  • Breadcrumbs
  • CONCAT
  • CURRENTPAGENAME
    • Argument for without namespace
  • RESOLVEBLOCKREF
  • RESOLVEBLOCKREFATEND
  • CURRENTUSER
  • BLOCKMENTIONS
    • With alpha sort

Different behavior on mouse and keyboard selections

Steps to reproduce:

  1. Create a smartblock with just this line of code
    window.document.querySelector("textarea.rm-block-input")
  2. Trigger once using xx and then selecting the smartblock from popup menu using mouse. It returns null.
  3. Trigger again using xx and then selecting the smartblock from popup menu using keyboard. It returns the valid html element.
  4. The above are repeatable again and again.

Hot Keys: Error with setting

I get an error in the settings menu: Hot Keys. Is says: Error with setting.

Attached a screenshot and console log.

Screen Shot 2022-07-30 at 12 19 35

Screen Shot 2022-07-30 at 12 19 13

.

Merge back into Roam42

This will be a tracker issue to make sure we cover all of the things before merging smartblocks V2 back into roam42. This will be done after release and will not be part of the project:

  • Roam42 loads smartblocks script from RoamJS instead of from Roam42
  • window.roam42.smartblocks globals functions point to window.roamjs.smartblocks globals
  • Workbench <> Smartblocks - Nuke the idea of and be able to infer whether we need a block or not.
  • Change default keystroke back to jj both in extension and in docs. uncomment 42setting
  • Reinsert (42)? into button text regex
  • Change roam42 docs to link straight to smartblocks extension and delete roam42/smartblocks pages

Error rendering settings

The settings are not rendered, instead the message β€œerror rendering settings” is shown.

Color code smartblocks

Make editing easier by having Nested Smartblock commands color coded, just like in VS CODE extension

Publish Smartblock Workflow

Be able to one button push a smartblock workflow to the registry

Will need a token from RoamJS + RoamJS account. OR Might not... could generate a token from Roam+Graph

Gate J/JA/JAVASCRIPT/JAVASCRIPTASYNC commands for security purposes

Interested Testers:

  • Fabrice Gallet
  • R.J. Nestor

Add TODO commands

  • TODOTODAY
  • TODOOVERDUE
  • TODOOVERDUEDNP
  • TODOFUTURE
  • TODOFUTUREDNP
  • TODOUNDATED

Problem with TODOTODAY

Hi David, the <%TODOTODAY%> command gives different result between V1 and V2, if you already have tasks on the page. In V1 only tasks on other DNPs linked to the current DNP are entered, in V2 the tasks already on the current DNP are also entered as BlockRef again. See Screenshots.
CleanShot 2021-08-26 at 13 31 53@2x
CleanShot 2021-08-26 at 13 31 14@2x

Enhancement: Preserve state of original blocks

It would be cool to have the original state of the block eg. collapsed or the query settings like "group by page" and "show paths" preserved after inserting a smart block.

I mostly insert queries on my DNP which slows roam down when they are visible. Also, I always have to manually change the query settings.

Custom Shortcuts

Attach smart block workflows to custom keyboard shortcuts

Could think of this as also keyboard maestro combos, where the default one opens the menu

DATEBASIS setting is not applied to a SmartBlock workflow run on a different page

The DATEBASIS is not inherited in the execution of a workflow run on a different page.

Example:

- #SmartBlock datebasis tests
    - DATEBASIS tests
        - Today's date is <%DATE:Today%>
        - Current pagename <%CURRENTPAGENAME%>
        - <%DATEBASIS:DNP%> `DATEBASIS` set to **DNP**
            - Today date is now <%DATE:Today%>
            - Two weeks from now <%SET:future,<%DATE:in two weeks%>%><%GET:future%>
            - Workflow run: <%SMARTBLOCK:workflow%>
            - Workflow run on page <%GET:future%>: <%SMARTBLOCK:workflow,<%GET:future%>%>
            - Today date is now <%DATE:Today%>
        - <%DATEBASIS:<%GET:future%>%>`DATEBASIS` set to <%GET:future%>
            - Today date is now <%DATE:Today%>
            - Workflow run: <%SMARTBLOCK:workflow%>
            - Workflow run on page <%GET:future%>: <%SMARTBLOCK:workflow,<%GET:future%>%>
- #SmartBlock workflow
    - Workflow output: Today date is <%DATE:Today%>

Output from running datebasis tests workflow:
Screenshot from 2022-11-07

Quick Commands

Roam42 currently uses the same trigger for workflow as quickly inserting a smart block command

Either keep this convention or use a separate trigger

Mini help menu appears on insertion

<%NOBLOCKOUTPUT%> doesn't work if another SmartBlock is invoked afterwards

Example SmartBlocks

- #SmartBlock settings
    - <%NOBLOCKOUTPUT%> <%SET:greeting,Hello World%>
- #SmartBlock greeting
    - <%NOBLOCKOUTPUT%>text to not be output
    - Start of block <%SMARTBLOCK:settings%> text after another SmartBlock invocation <%NOBLOCKOUTPUT%> text after NOBLOCKOUTPUT
    - Greeting is "<%GET:greeting%>"
- #SmartBlock greeting unwanted output
    - <%NOBLOCKOUTPUT%> works here!
    - Start of block <%NOBLOCKOUTPUT%> text after NOBLOCKOUTPUT <%SMARTBLOCK:settings%> text after another SmartBlock invocation
    - Greeting is "<%GET:greeting%>"

The greeting SmartBlock works as expected. The greeting unwanted output SmartBlock gives the output:

- Start of block  text after NOBLOCKOUTPUT  text after another SmartBlock invocation
- Greeting is "Hello World"

SmartBlocks V2!

SmartBlocks V2

There are three main goals with SmartBlocks V2:

  • Performance
  • Automation
  • Registry

The Roam Document tracking the status of milestones and outlining the freelance approach could be found here.

Performance

Roam42 Smartblocks currently "mimic" users by fake typing into blocks and fake clicking on bullets. The big performance enhancement necessitating a rewrite is migrating the smart blocks engine from using these fake user actions to using the Roam official Write API they released at the beginning of 2021. This will allow the resolution of smart blocks to be near-instantaneous.

Automation

Currently, you could only trigger a smart block workflow manually from the block that you are on. What if you want one triggered automatically once per day? How about on another separate or multiple places in your graph? How about on a custom keyboard shortcut? By migrating to the Roam Write API, Smartblocks now have access to all of these automations and more.

Registry

How do you currently share a Smartblock workflow with someone else? How do you currently add one you really like to your graph? With the Roam write API, both of these laborious processes could be made into simple one clicks. Smartblocks V2 will come with a registry where users will be able to publish their Smartblock workflows and download ones they like, all from within Roam!

Use It Today!

SmartBlocks V2 is currently available as its own extension at https://roamjs.com/extensions/smartblocks. It currently implements the bare minimum and there is still much work to do. It will be the first of the Roam42 modules that will be split out and made available as its own extension. Once it reaches a point of stability, it will be re-bundled as part of the Roam42 extension. In the meantime, use the extension at your own risk as it's not yet ready for wider use.

Funding

For dedicated development on SmartBlocks V2, we are looking to hit a funding goal of $10,800. By funding the development, you will be spotlighted on SmartBlock's extension page in the contributor's section while also gaining exclusive access to updates on the project. You will also have the option to pull funding at any time, proportional to the milestones that have been completed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.