https://www.dendron.so/ logo
Join Discord
Powered by
# dev
  • k

    krisfremen

    01/20/2022, 3:22 AM
    hey there, is anyone working on org mode and/or org-roam support?
  • k

    kevins8

    01/20/2022, 3:41 AM
    not that I know of - is that something you'd be interested in?
  • k

    krisfremen

    01/20/2022, 3:43 AM
    yes, I use org mode and org roam extensively. emacs being single threaded is really hampered once you reach a decent amount of nodes, so it's becoming a nightmare to use
  • k

    krisfremen

    01/20/2022, 3:47 AM
    I've been looking for editors or extensions I can modify and play with, dendron seems pretty nice
  • k

    kevins8

    01/20/2022, 4:19 AM
    dendron is architected client/server where the server is a local express server. its definitely possible to extend it to other editors though its not an area we've put much investment in atm https://wiki.dendron.so/notes/446723ba-c310-4302-a651-df14ce6e002b.html
  • k

    krisfremen

    01/20/2022, 5:26 AM
    indeed, it would be nice to have something like dendron in emacs, vim or intellij ides
  • k

    krisfremen

    01/20/2022, 5:27 AM
    https://wiki.dendron.so/notes/c3800271-dd56-46fb-8de7-e850f3c006b7/ I saw this mention some org mode, which is why I was inquiring if there's anyone working on it
  • k

    kevins8

    01/20/2022, 4:57 PM
    got it. yeah, not currently. if you're interested, can give you design notes on where to start
  • k

    krisfremen

    01/20/2022, 5:06 PM
    that would be great, I spent some time reading through the source yesterday to get familiar
  • n

    Nidoling

    01/20/2022, 10:56 PM
    Hey, I'm seeing strange behavior regarding our integ tests. When I try to call
    vscode.window.showQuickPick
    in
    dnode.ts
    , I get the following error
    Copy code
    rejected promise not handled within 1 second: DendronError: disconnect
    /private/var/folders/zp/c_kspb_11jg7pd997_yr1__40000gn/T/AppTranslocation/976BFBA6-4FE5-40A6-A0C5-085D195F0568/d/Visual Studio Code - Insiders.app/Contents/Resources/app/out/bootstrap-fork.js:5
    stack trace: DendronError: disconnect
        at ChildProcess.<anonymous> (/Users/tulingma/workspace/dendron/packages/api-server/lib/utils.js:141:24)
        at ChildProcess.emit (events.js:315:20)
        at ChildProcess.emit (domain.js:467:12)
        at finish (internal/child_process.js:888:14)
        at processTicksAndRejections (internal/process/task_queues.js:75:11)
    As a test example, I added a new method (that isn't being used anywhere) in
    dnode.ts
    Copy code
    static async testFun() {
        await vscode.window.showQuickPick([], {
          title: "Select Vault",
        });
      }
    Then if you run
    Extension Integ Tests
    , it leads to first error Edit: Happens to other
    window
    methods like
    await vscode.window.showErrorMessage("test");
  • k

    kevins8

    01/20/2022, 10:59 PM
    do you have a draft PR that you can also link to? can take a look from there
  • n

    Nidoling

    01/20/2022, 11:01 PM
    https://github.com/dendronhq/dendron/pull/2239
  • k

    kevins8

    01/20/2022, 11:20 PM
    left some comments in the pr. not to do with the test but you can't access vscode outside of
    plugin-core
  • k

    kevins8

    01/20/2022, 11:20 PM
    https://github.com/dendronhq/dendron/pull/2239/files
  • k

    kevins8

    01/20/2022, 11:21 PM
    for tests, you should add your tests in
    plugin-core
    and follow the convention in [[Test|dendron://dendron.docs/pkg.plugin-core.qa.test]]
  • k

    kevins8

    01/20/2022, 11:26 PM
    added some docs about it here -> https://github.com/dendronhq/dendron-docs/blob/main/vault/dev.process.code.monorepo.md#L18:L18
  • n

    Nidoling

    01/20/2022, 11:27 PM
    i see. so if i can't use
    vscode
    in
    dnode.ts
    , how do i do the vault prompting?
  • n

    Nidoling

    01/20/2022, 11:27 PM
    re:tests, I was planning to add them to
    dnode.spec.ts
  • s

    SeriousBug

    01/20/2022, 11:44 PM
    Not sure if I have the whole context, but I'd recommend taking a look at
    compat.ts
    for examples. You basically have to write your own objects that replicate VSCode, then convert them to VSCode objects in the plugin. The
    windowDecorations.ts
    is a good example where we do this.
  • k

    kevins8

    01/20/2022, 11:52 PM
    vault prompting should not be done in
    dnode
    but in
    lookup
    (same place where we currently do the schema match)
  • n

    Nidoling

    01/21/2022, 12:03 AM
    @User this is also going to be called by
    getNoteByPath
    in
    enginev2.ts
    . how will vault prompting work then?
  • k

    kevins8

    01/21/2022, 12:08 AM
    -
    createWithSchema
    shouldn't prompt in that case but return a
    Copy code
    ts
    DendronError({message: "multiple schemas", data: [...]})
    then it will be the responsibility of the caller to prompt the user and ask for a vault, and then call that function again.
  • k

    kevins8

    01/21/2022, 12:10 AM
    also see https://github.com/dendronhq/dendron-docs/blob/main/vault/dev.process.errors.md#respv3
  • d

    dockthepod

    01/21/2022, 1:54 AM
    can someone point me at the code used to make the status/due date of task notes show up in the editor?
  • s

    SeriousBug

    01/21/2022, 1:55 AM
    Sure, the code starts here: https://github.com/dendronhq/dendron/blob/master/packages/engine-server/src/markdown/decorations/taskNotes.ts
  • s

    SeriousBug

    01/21/2022, 1:56 AM
    And then the plugin applies that to the user interface here: https://github.com/dendronhq/dendron/blob/master/packages/plugin-core/src/features/windowDecorations.ts#L311
  • j

    jyeung

    01/21/2022, 2:59 AM
    Hey folks - heads up that there's a change that's just been checked in that will require you to update your dev dependency packages (run
    yarn bootstrap:bootstrap
    in your repo's root directory): https://github.com/dendronhq/dendron/pull/2188 This change adds a husky hook on pre-push to do a circular dependency check. We've been working on getting rid of circular dependencies in the code base, and we're using a tool called madge to report on them. To help with this effort, we're adding an extra step in the PR process to check to make sure we're not adding more circular dependencies. Details here: https://docs.dendron.so/notes/773e0b5a-510f-4c21-acf4-2d1ab3ed741e/#avoiding-circular-dependencies Thanks!
  • j

    jyeung

    01/21/2022, 3:06 AM
    Also as a heads up to anyone working on preview code - a refactoring change has just gone in https://github.com/dendronhq/dendron/pull/2194, which changes the way to access the preview pane via a
    PreviewProxy
    class instead. Doc Notes updated here: https://docs.dendron.so/notes/a80f36d9-01d0-4c5a-a228-867b093a4913/#preview-panel
  • s

    SeriousBug

    01/21/2022, 10:07 AM
    Hey folks, I'm trying to refactor how we do image links in the preview. VSCode has a method
    asWebviewUri
    which creates URLs that allow the preview to access files, but we can only use this in the plugin. https://code.visualstudio.com/api/references/vscode-api#Webview Right now we use the engine to render the note for the preview. This is good because it avoids running the heavy rendering code in the plugin and blocking it. This creates a mismatch though, I can't use
    asWebviewUri
    in the engine and I can't render the note in the preview. Any thoughts on how to get around this? A few options come to mind: - Preview parses the markdown and replaces the URIs first, then sends the markdown the engine, and finally passes the rendered HTML to the preview - Plugin starts a worker thread to render the preview (not sure if we can share the webview object with the thread, needed for
    asWebviewUri
    ) - Have some sort of reverse-API where the engine requests `asWebviewUri`d image URLs from the plugin
    k
    • 2
    • 5
  • s

    sashasasha

    01/21/2022, 4:44 PM
    Hi folks, trying to develop dendron. It was working for a while, but now starting plugin gives me this:
    k
    s
    • 3
    • 17
1...899091...108Latest