Git Product home page Git Product logo

workspaces's Introduction

Create workspaces that you can automatically open with the click of a button.

Breaking Change:

  • Add all workspaces to Command Palette, and by extension, Roam Research hotkeys can now be defined for each workspace.
    • removed Keyboard shortcut from definitions for new workspaces. They will be ignored if defined on existing workspaces. Please use Roam Research hotkeys via Settings instead.

New:

  • Settings option to turn on or off the Right Sidebar state save function of the Sidebar extension. Keep switched off if you don't want sidebar to open on pageload.
  • Option to hide icon/menu from the Roam topbar altogether. You will need to trigger the Workspace selection modal via a new Command Palette 'Open Workspace' command.

Recent:

  • Option to keep the 'traditional' layout with a dropdown menu in the Roam topbar if you have more than one Workspace defined, or to simply have a button that opens a modal to select. This is designed to reduce clutter in the topbar for those who prefer things nice and neat! If you like the older style, turn the switch for 'Topbar Menu Layout' to the on position.
  • Addition of Autopin option - if switched on, any block or page added to the Right Sidebar will be automatically pinned.
  • David Vargas has merged his Sidebar roamjs.com extension into Workspaces. For details, see below. Thanks David!
  • Update workspace definitions from a current state. Trigger via the Command Palette. This allows you to overwrite your workspace definition if you change how you want things laid out.

Define the open|close state of both sidebars, the main window content and the list of pages/blocks to open in the right sidebar if desired.

Create as many workspaces as you like. If you have only one, a button will appear on the Roam Research topbar that will open the workspace. If you have more than one, the button will turn into a dropdown select menu that opens the workspace when you change it.

This video walks through the basics:

https://www.loom.com/share/4ca0dd72a0fa4c46b012a59717e503d7

And this one walks through some new features:

https://www.loom.com/share/78bdf24f7478443b8431c52ec1f54472

Once installed, this extension creates a page in your graph called 'Workspaces configuration' and will automatically navigate there. A dummy workspace definition is supplied which demonstrates the required format.

Configuration is simple. Open the page you want in the main window, and whatever content you want in the right sidebar. Open or close the left and right sidebars as you prefer. Now, trigger the Command Palette command 'Create Workspace from current state' to create a new Workspace definition on your 'Workspaces configuration' page.

You can also configure things manually (although why would you?):

  • In the block indented under Left Sidebar: type either open or closed. Same for Right Sidebar:.
  • For the Main Window: option, place a page uid or [[page]] reference in the indented block.
  • Place any [[pages]] or ((blocks)) you want in the right sidebar, with each one on a new row.
  • Special cases: you could simply put DNP in the Main Window option and the workspace will automatically determine and open the correct daily note. You can use DNP+x or DNP-x in the Right Sidebar section, where x is an integer. This will open the page for tomorrow (DNP+1), yesterday (DNP-1) or even one year ago (DNP-365).

TODO:

  1. apply changes to workspace definitions without reloading the extension

  2. auto-save feature for current workspace

  3. API to allow other extensions to interact with Workspaces

This extension has been merged with the previous RoamJS extension Sidebar! The following features have been brought over while the rest were made redundant due to Workspaces current featureset:

  • Autofocus - Whenever you open the right sidebar, your cursor will autofocus on the first block. This behavior is toggleable from your Roam Depot Settings.
  • Auto Filter - Roam natively supports includes/removes filters on pages. Those filters are not saved however when you add the page to the sidebar. Opening a page in the sidebar will persist the filters from the page. This behavior is toggleable from your Roam Depot Settings.
  • Go to Page - Render a link button next to each page sidebar window to allow jumping directly to the page.
  • Expand/Collapse All - Render a button on the top bar of the right sidebar that will expand/collapse all on click. This behavior is toggleable from your Roam Depot Settings (requires refresh).
  • Pinned open - If your sidebar was open during your last Roam session, it will automatically open on load/reload.

workspaces's People

Contributors

mlava avatar dvargas92495 avatar

Stargazers

Farayi Chambati avatar Danyal Aytekin avatar Matt Sweeney avatar Rob Bednark avatar  avatar zzdoo avatar Tomáš Baránek avatar John Elm avatar

Watchers

 avatar

workspaces's Issues

Error message when attempting to retrieve a saved workspace

Hello,
First, I love this extension - thank you!
My issue: I'm trying to retrieve a saved workspace and when I run it (from either the drop-down menu or from the command prompt) it doesn't open the right sidebar with the saved pages. I've opened the developer tools and I see that an error is created every time I try to open the saved workspace. The title of the error log is blob:https://roamdresearch.com/...a long string of numbers and letters - hexcode?

I'm not sure how to open the error log to see the contents so I guess that's my first question.

I've manually shift-selected each of the saved pages and they open in the sidebar.

Some of the saved workspaces run just fine.

Thanks,
Mike

can you support page filter as well?

image

like this image, if there are filters working in that page when i creating a workspace, i want the filters to continue working after i switch back to the workspace

thanks for your work!

Can't create workspaces. Error in colsole

Hey man, great extension, thanks a bunch.

I keep getting this error when trying to create a new workspace:

image

route-app.js:2099 Uncaught (in promise) Error: Assert failed: (string? block-uid)
at Object.eval [as getSidebarWindowFilters] (route-app.js:2099:264)
at k (9338392e-11cb-4cbe-8a2e-1cd00f9633a1:1:40376)
eval @ route-app.js:2099
k @ 9338392e-11cb-4cbe-8a2e-1cd00f9633a1:1
await in k (async)
callback @ 9338392e-11cb-4cbe-8a2e-1cd00f9633a1:1
(anonymous) @ main.js?WB_REVISION=d89875281e0d308044a4ba7575cb33ac:10217
(anonymous) @ main.js?WB_REVISION=d89875281e0d308044a4ba7575cb33ac:7697
a1 @ route-app.js:2224
l @ route-app.js:781
m @ route-app.js:782
(anonymous) @ main.js?WB_REVISION=d89875281e0d308044a4ba7575cb33ac:4613
(anonymous) @ main.js?WB_REVISION=d89875281e0d308044a4ba7575cb33ac:4613
(anonymous) @ main.js?WB_REVISION=d89875281e0d308044a4ba7575cb33ac:8963
Exa @ main.js?WB_REVISION=d89875281e0d308044a4ba7575cb33ac:4605
t.exports @ f8790bf4-7d41-4dfd-90b7-f8ca3ef7b83f:2
g. @ f8790bf4-7d41-4dfd-90b7-f8ca3ef7b83f:2
b @ f8790bf4-7d41-4dfd-90b7-f8ca3ef7b83f:2
x @ f8790bf4-7d41-4dfd-90b7-f8ca3ef7b83f:2

Also saw that my auto-saved workspaces don't include my sidebar items.

Error msg in the console

If you enter a few characters in Roam search bar, you will see that Workspaces extensions sends an error in the console:

image

Feature Request: Personal Workspaces / Keyboard Shortcuts

Working in a multiplayer graph, it would be cool if each graph member could set their own Personal Workspaces, so they wouldn't see everyone else's workspaces.

This should allow personalized keyboard shortcuts as well (my ALT+SHIFT+Z goes somewhere different than your ALT+SHIFT+Z)

Very cool plugin btw 👍

Allow "partial application" of workspaces

The request is that if a part of workspace configuration is missing - don't touch that part of Roam

For example: If I'd like to restore the state of the main page while keeping the sidebar intact, I might have the following configuration:
image

Right now that would cause the right sidebar to be closed and cleared, while I believe it should stay intact

I think this actually works partially (e.g. Restoring state of sidebar without touching the main page works), but it'd be great if it were to work consistently across all the properties!

Can't save workspaces after opening references from within the sidebar

Hi,

  • Open a page that has references in the sidebar by shift-clicking it
  • Click on the reference number in the sidebar to open the references in the sidebar
  • Open the command palette and enter the "Create workspace from current state" command

-> Nothing happens

I thought at first the issue was simply having references showing in the sidebar but actually if you open the references from the main window by shift clicking them the "Create workspace from current state command" works ok.

Thanks

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.