roam-unofficial / roam-toolkit Goto Github PK
View Code? Open in Web Editor NEWRoam force multiplier
License: MIT License
Roam force multiplier
License: MIT License
A keyboard shortcut to focus the cursor - possibly Command+Enter?
How it works currently:
How I'd like it to work:
Till now the changes have been easy to follow (via slack/twitter etc.), but going forward I'd like to suggest detailed changelog, so that users can effortlessly get an idea of what's new in every update, which would allow them to quickly include those changes/improvements in their workflow.
Another optional feature, a notification dot/pop-up when a new update is launched detailing the changes as many users might not be daily Github visitors.
roam-toolkit currently uses https://github.com/greena13/react-hotkeys to listen to keys.
It works well for the most part, but various bugs made vim style bindings harder to implement:
Also, react-hotkeys is no longer actively maintained.
This deliverable here would be evaluating other options, and seeing how much there is to be gained by switching.
https://github.com/ccampbell/mousetrap
https://github.com/jaywcjlove/hotkeys
Help maintain react-hotkeys
Roll our own hotkey library
To Reproduce
yarn run watch
Expected: The keyboard shortcut does something
Actual: The keyboard shortcut doesn't do anything
Workaround:
Changing values +/- 1 with shortcuts.
Inspired by https://github.com/rmaksim/Sublime-Text-2-Inc-Dec-Value
For dates it might include something more, for example add value after date and press some shortcut to calculate new date
[[January 29th, 2020]]+7d -> [[February 5th, 2020]]
[[January 29th, 2020]]-6d -> [[January 23rd, 2020]]
[[January 29th, 2020]]+3w -> [[February 19th, 2020]]
[[January 29th, 2020]]+4m -> [[May 29th, 2020]]
Or we can create separate feature for calculating dates.
would be nice to support children too, but it's hard unless they all are visible
This should be possible as we can query datalog directly.
Credits to Matias Faure for the idea :)
Live preview, as pushed in the latest update is an incredible update to the roam toolkit, however, at the moment, the feature does not work for namespaced roam pages. i.e. Roam pages created in the format [[Namespace/ page name]] .
The key advantage of creating pages like this is that they export as folders.
(Edited): just dug into this a bit further, Roam allows for showing namespaced pages in 3 different ways, (switch between ways by hitting CTRL +C, CTRL+L).
The live preview works for the first version of the page name, but not for the other two, this is obviously not a huge issue, but worth taking note of.
(see gif below)
I know this is a nontrivial request, as it has a very different extension model, but I would love to see support for Safari. It is so much better on macOS than Chrome.
In support of this, and other potential integrations (e.g., the unofficial iOS app, as userscripts in site-specific browsers or Electron packages, as bookmarklets for use anywhere, etc.), it would be great to see much of this functionality organized into simple library modules, somewhat decoupled from the browser extension infrastructure.
can steal them from Roam issues repo. Like their templates :)
Live Preview currently works on Hover.
If you can enable .on('dragover') as well, I think users would be able to drag blocks and block references to other pages -- the same way you can currently do with the Sidebar but with less friction
Source: https://twitter.com/tombielecki/status/1265374228984954880?s=20
I suggest adding an option to the config to not schedule repeats on weekends. I usually don't open Roam on weekends. (This might be too specific, if so I'm happy to just do it in my own fork).
Would be really useful to have different CSS for different Roams, especially to distinguish your private from your public from any random one.
This issue made me think that this is something that could possibly be done by this extension... Ideally I would like even the option of running the webpage through a readability filter, like this https://github.com/masukomi/arc90-readability (which would make webpages work much better in narrow formats). Not sure if this is possible with security features though.
need to reload the page for new state of things to get reflected
code: https://github.com/tfiers/RoamShowTime
Browser extension to show block creation & edit times on RoamResearch.com.
Author (@tfiers) in Slack:
Tomas Fiers 2 hours ago
@Joel Chan, I don't use roam-toolkit myself (hadn't had a need for any of its features yet) -- but I definitely see the value of having one go-to browser extension consolidating all external functionalities, which you can toggle on and off.
@Vladyslav Sitalo, my 'show time' plugin is MIT licensed, i.e. feel free to integrate with attribution.
I'm gonna keep my repo as is, as I like its light-weightness (one self-contained, relatively short javascript file, and no build tools or many dependencies). This I hope makes it easier for people to start hacking on the code for their own needs (edited) ```
what I mean is that I want to have an ability to press a shortcut and have the block transition between various "service" tags.
The example from the Roam itself is transition none -> todo -> done -> empty
Other potential examples would be toread -> reading -> read
for books.
From review at Mozilla web store.
Illustration: https://www.dropbox.com/s/s42ejiqo7ilev4g/roamextension.gif
Notes:
Full discussion here: https://www.reddit.com/r/RoamResearch/comments/fjofcr/roam_toolkit_a_browser_extension_for_roam_that/
For now I'm clueless about this one =\
Fuzzy date is fantastic, but here are some examples which didn't do what I hoped they would. Format of the following is input followed by output.
If we take a page like [[[[new user]]s do not yet understand the vocabulary and grammar of the app]], then the hover preview works on [[new user]] but not on the overall page.
I have arguments for both 🤔
Context
Roam is a very powerful online tool. Roam-toolkit makes it far more more powerful with spaced repetition and its other features. It could be an extremely mobile application as browser software is not very demanding on the computer.
Proposal
Port over Roam-toolkit extension to a mobile browser like firefox for android so it can be used with tablets. and other portable devices.
That would eliminate the need to add temporary shortcuts just to test stuff.
Can't seem to figure this out. Googling this mostly produce results for non-webpack extensions.
This describes sending messages between extension modules, but that sendMessage
does nothing in the console, even inside the extension context.
Things like "next week overview" (or of dates), "all things in this block", or even "aliases for this page" if we can figure it out
It'd be neat if optionally FuzzyDate can replace the date in the block (if it's the only one).
Syntax options
;r fuzzy date;
;* fuzzy date;
Need to harmonize with #29
So you don't get the clusters of notes always "traveling together in time"
While on date pages, make Ctrl+Alt+Up/Down
to go to previous/next date.
You can do this by updating the current url -https://stackoverflow.com/questions/14101865/chrome-extension-navigate-to-a-url-when-user-clicks-on-icon
Apparently this is a known bug from copy-webpack-tplugin
dependency and will be fixed "on the next major release".
Meanwhile there's a workaround by adding copyUnmodified: true
as an option: webpack-contrib/copy-webpack-plugin#261 (comment)
What can we do with this feature to make it more configurable?
Should users be able to decide what name they use for their buckets/boxes pages?
[[Bucket 1]] vs #[[Bucket 1]] vs #box1 vs ...
The idea behind the SRS is that you go forward, but you need to go back too if you couldn't answer. Should it be available by shortcut too? If yes, -1 or reset to first box, or both options? (personally I sometimes change to prev box, sometimes reset to first, depends of how important it is, how I feel about my answer, etc.)
I assume we all agree that shortcuts should be configurable by the user.
Should there be some indication (red icon in top right?) that you have things to review? Or leave it for the user to track that via their daily notes?
Some additional layer/modal to review, similar to https://www.remnote.io/queue ?
Repeats - the FuzzyDate workflow currently supports generating the repeated dates, which I find rather useful.
Other improvement on that would be adding support for custom formats for expanded date (e.g. embedding it into the query)
Potential expansion syntax:
;fuzzy date:number of repeats:format;
It'd seem to be valuable to support per-configured formats.
Example format - {{query: {and: %d [[TODO]]}}}
Ctrl+w
conflicts with closing things outside of MacSo the manifest defines some commands such as "default": "MacCtrl+Alt+Up"
.
The problem arose when I first tried to install the extension. As a Windows user
Failed to load extension
Invalid value for 'commands[1].default': MacCtrl+Alt+Down.
Sure enough, the docs say
- Please note that on Mac 'Ctrl' is automatically converted to 'Command'. If you want 'Ctrl' instead, please specify 'MacCtrl' under "mac". Specifying 'MacCtrl' under "default" will cause the extension to be uninstallable.
So we need to have
"default": "Ctrl+Alt+Up",
"mac": "MacCtrl+Alt+Up"
But that still failed to load due to invalid command. To quote the docs again
Note: All key combinations must include either Ctrl* or Alt. Combinations that involve Ctrl+Alt are not permitted in order to avoid conflicts with the AltGr key
My final workaround was getting rid of the Alt
altogether
"default": "Ctrl+Up",
"mac": "MacCtrl+Up"
I'm not suggesting those as the final shortcuts, even though the Ctrl+Up/Down
behaviour in Roam can be achieved by Ctrl-Space
anyway.
Firefox sees no problem with Ctrl+Alt
, it's a Chrome thing.
When editing a block, hitting enter
(and/or return
on a Mac) creates a new block, potentially splitting the current block if there's any text to the right of the cursor. For some reason, Roam doesn't exhibit the same behavior when hitting enter
while editing the page title.
Listen for enter
keypresses and, if the current element is <h1>
*, slice any text to the right of the cursor, create a new block at the top of the page, and, if applicable, paste the sliced text into the new block.
And show it as block references.
Query example
:q [:find ?content :where
[?x :block/string ?content]
[(re-find #"\d{4}\.\d{1,2}" ?content)]
]
Potentially also support that for arbitrary datalog
15 hours ago
@vladyslav Sitalo and others, we really should get templates added to Roam Toolkit, since people are wasting a lot of time hacking all kinds of things. It shouldn’t be that hard… I guess one thing is just adding the config UI for adding templates and triggers (it could be a single daily template with a hard-coded trigger, but if we’re going to do it, we might as well do it correctly?) 🙂 The second thing is figuring out how to make the template dynamic - mainly with dates (anything else?)… I wonder if just letting people embed things like ;today; ;tomorrow; etc would be enough? This should also let you generate a weekly template with ;monday; ;tuesday; etc. And finally we need to insert it onto the page - I think we already have the ability to insert a bunch of blocks properly, but I would have to look at our code to see the exact procedure…
does this sound about right? Anyone want to share the work?
Vladyslav Sitalo 14 hours ago
I feel like there are a whole bunch of template languages out there, I think we should just integrate with one of them for dynamic templates
Stian Håklev 14 hours ago
Yeah, but we basically need to provide variables, and since we already have a built-in dynamic way of specifying dates (which is the only thing we can imagine people wanting to make dependent) we would want to reuse that I think
Vladyslav Sitalo 3 hours ago
I can envision all kind of substitutions.
name of the current date of the week
random number
polling things from some api
things you need to fill in on executing the template
Vladyslav Sitalo 3 hours ago
etc
Vladyslav Sitalo 2 hours ago
polling things from the Datalog using the js api
Stian Håklev 1 hour ago
Good points, although I think starting with date-related stuff and a random id would be a good beginning. (We could also have “link to a random page” if we can get that from Datalog somehow).
I haven't looked in detail at how easy this would be to control, but I would love some better keyboard controls for folding and unfolding. Primarily unfold all (because currently imports are collapsed, which is very annoying), but also collapse all on the whole page. Same at the current block level (maybe collapse all children, expand all children, or collapse/expand current block up to the top level bullet, but not whole page).
Perhaps we can take inspiration from folding in Vim etc.
Feasible? Happy to help test etc.
to improve discoverability
What will we be able to achieve here?
@houshuang extracting roam compatible data from twitter/hypothesis
hopefully this will make it easier for other people to build similar integrations. + eventually when API is there this can ingest things directly to roam
also maybe we can have it authenticate with twitter properly. right now process is scary
@houshuang presumably we can do OAuth, which would greatly simplify credentials UX
I'd be happy with the "copy in roam format" functionality as a starting point (similar to what you have atm).
@dalmo3 https://github.com/dalmo3/hypothesis-to-bullets-chrome-extension
really slow =\
Probably should use the different format (1 colon? something else?)
Inspired by an email tool I used called Sanebox:
1d = in 1 day 2d = in 2 days (nd = in n days). If today is Wednesday, 1d would return Thursday.
1w, 2w, nw = in 1 week etc. If today is Wednesday, 1w would return next Wednesday.
1m, 2m, nm = in 1 month etc. If today is the 1st of the month, 1m would return the first of next month. Needs small additional logic for 30th, 31st, and leap years.
1y, 2y, ny = in 1 year etc. If today is 18 May 2020, 1y would return 18 May 2021. Needs small additional logic for leap years.
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.