roamjs / smartblocks Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Steps to reproduce:
window.document.querySelector("textarea.rm-block-input")
xx
and then selecting the smartblock from popup menu using mouse. It returns null
.xx
and then selecting the smartblock from popup menu using keyboard. It returns the valid html element.OPENPAGE
SIDEBARWINDOWOPEN
SIDEBARWINDOWCLOSE
SIDEBARSTATE
GOTOBLOCK
Port over the minimal functionality necessary to showcase the speed improvements
Add any enhancements brought up by users during development as bullets for this milestone
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.
Spend time after release iterating on any issues or bugs that come up.
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:
RoamJS Dynamo backend for storing and receiving workflows
Meant to replace https://github.com/dvargas92495/SmartBlocks/issues
Supports get all, get by name, and install
NOBLOCKOUTPUT
EXIT
NOTIFICATION
SEARCH
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"
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:
jj
both in extension and in docs. uncomment 42setting(42)?
into button text regexAllow users to put a price on their workflows
Will need to do Stripe Connect accounts
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%>
Will want to browse by
Install workflow directly from Registry
Blocked on the Roam team implementing in the write API
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.
https://roamjs.com/extensions/roam42/smartblocks:_using_predefined_workflows
Turns out, this is blocked on:
ClipboardCopy
ClipboardPasteText
Breadcrumbs
CONCAT
CURRENTPAGENAME
RESOLVEBLOCKREF
RESOLVEBLOCKREFATEND
CURRENTUSER
BLOCKMENTIONS
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
RANDOMBLOCK
RANDOMBLOCKFROM
RANDOMBLOCKMENTION
RANDOMPAGE
Doesn't seem to be an issue on the desktop app, though. I'm on Android, and I believe the app version is v0.9.6-314e3399. Let me know if there's any additional information I can provide!
Configure a smartblock to automatically run on your daily note page each day
The backlog is at 15 items. Let's squash em before release
Also do Date abbreviations
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
Sellers could add Price to publish metadata
Buyers will go through a payment flow on panel
https://stripe.com/docs/connect/collect-then-transfer-guide?platform=web#accept-payment
Attach smart block workflows to custom keyboard shortcuts
Could think of this as also keyboard maestro combos, where the default one opens the menu
<%SMARTBLOCK%>
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.
TODOTODAY
TODOOVERDUE
TODOOVERDUEDNP
TODOFUTURE
TODOFUTUREDNP
TODOUNDATED
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?
IF
, THEN
, ELSE
IFTRUE
IFDAYOFMONTH
IFDAYOFWEEK
https://roamjs.com/extensions/roam42/smartblocks:_alternative_methods
Support Parameters
Prevent Removals
GET
SET
CLEARVARS
Other extensions should be allowed to interact with smartblocks by registering a command
There are three main goals with SmartBlocks V2:
The Roam Document tracking the status of milestones and outlining the freelance approach could be found here.
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.
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.
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!
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.
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.
Make editing easier by having Nested Smartblock commands color coded, just like in VS CODE extension
CURSOR
NOCURSOR
INDNE/UNINDENT
FOCUSONBLOCK
Date
TIME
TIMEAMPM
JAVASCRIPT
JAVASCRIPTASYNC
ONBLOCKEXIT
The settings are not rendered, instead the message “error rendering settings” is shown.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.