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

    fudo

    05/18/2021, 5:03 PM
    Nope it's currently not installable and I have no glue atm on how I can package it xD never did that before with VScode extensions.
  • c

    codefriar

    05/18/2021, 5:38 PM
    I've built a couple of extensions, if youd like to learn to walk that path
  • f

    fudo

    05/18/2021, 5:59 PM
    FWIW you can take this file place it in your workspace and add
    Copy code
    json
    "yaml.schemas": {
                "./schemas.json": "**/*.schema.yml"
            
            }
    To your dendron.code-workspace file
  • l

    Lars Solberg (xeor)

    05/18/2021, 6:41 PM
    Two things I'm not sure if the hooks-api currently supports or not is: * `rename notes`: Can the
    onCreate
    hook (or the other hooks) do file-operations like renames on the note? Example, if I create a note named
    journal.+1
    , or something similar, would I be able to rename it from a hook to
    journal.2021-05-19
    based on the hooks code? Is there any side-effects on doing this? I really want to make myself a tiny syntax-language to support this kind of stuff..
    new.todo
    ,
    work #project1
    , and so on.. * Can a hook display an input-box and wait for it's response and use that respons for something? Example, if I do
    journal.2021-05-18
    , I really want it to force me to type something, example
    #project
    , and my hook will search and link to all matching notes with
    #project
    in the content. Or combined with the
    rename notes
    function, I would like it to use the input as part of the new filename.. Hooks are powerfull stuff! Love em!
  • c

    codefriar

    05/18/2021, 7:14 PM
    which file do I place where?
  • k

    kevins8

    05/18/2021, 8:21 PM
    > rename operations the hook activates before the file gets written to disk so if you change the
    fname
    property, that also changes where the file gets written to > display an input-box hooks don't have additional inputs besides the inbuilt metadata for lifecycle vents. for more dynamic functionality, it might do to invest in an actual plugin system
  • k

    kevins8

    05/18/2021, 8:21 PM
    love the speech bubble callout 🙂
  • f

    fudo

    05/18/2021, 9:17 PM
    I will Probably use that repo for experimenting with the custom editor as well and when it's finished it could be transferred over into the dendronhq org and added as a submodule to the mono repo shifting some of the things around
  • l

    Lars Solberg (xeor)

    05/18/2021, 9:24 PM
    The idea with displaying an inputbox is just to add some additional context to the hook.. Making the hook able to also trigger things inside vscode. The api I was looking for seams to be
    vscode.window.showInputBox
    , but I don't think I have a way of using vscode or the window object inside a hook? Trying to require('vscode') doesnt work either.. Is there a way the vscode object could be sent in as a parameter as well into the hook function?
  • k

    kevins8

    05/18/2021, 10:31 PM
    @User Got a preview of the antd design and webapp ready. The code is in the
    dev-dendronPanel
    branch. Instructions on launching the next server is here: https://wiki.dendron.so/notes/9aa25182-4f40-45ce-b94c-f9eaf7a9a073.html#development Updating the theme is here: https://wiki.dendron.so/notes/1698aef0-efd4-4c92-a3b0-5ca702b228a3.html#updating-the-theme Currently we just have the light/dark theme but in the future, we will make it possible for folks to generate their own themes to use with Dendron
  • u

    8brandon

    05/18/2021, 10:41 PM
    Nice will take a look soon!
  • l

    Lars Solberg (xeor)

    05/19/2021, 9:07 AM
    @User what I was looking for (got it working) was to use
    window.showInputBox
    inside the hook. It worked perfectly when I was using
    const { window } = require("vscode");
    😄
  • k

    kevins8

    05/19/2021, 3:34 PM
    nice! i was going to look into exposing
    vscode
    as part of the hook signature but looks like you already have access to it 🙂
  • c

    codefriar

    05/19/2021, 3:36 PM
    can you demo what you've built?
  • l

    Lars Solberg (xeor)

    05/19/2021, 3:37 PM
    Yea.. It's great! I'm going to have fun with these new hooks!
  • l

    Lars Solberg (xeor)

    05/19/2021, 3:38 PM
    Didn't build anything yet except a demo.. Can post some code later when I got more and is on the pc..
  • k

    kevins8

    05/19/2021, 5:20 PM
    heads up that changes are now merged in master 🙂
  • u

    8brandon

    05/19/2021, 6:53 PM
    Got it up and running 🙂 I see the Chakra Components are still there. Is your plan to replace those with Antd components? - Also I think the logical step is to use the
    dendron-design-system
    for theme files. Then all the other projects can use it for a consistent theme.
  • k

    kevins8

    05/19/2021, 8:17 PM
    yes. we’ll be replacing it over time
  • l

    Lars Solberg (xeor)

    05/20/2021, 9:18 AM
    I'm afraid of abusing the hooking system a little too much.. Will a new vscode extension have access to dendron api? Like creating files and stuff?
  • f

    fudo

    05/20/2021, 10:46 AM
    yes and no xD you can use your own client to connect to the dendron engine or check if dendron already publishes an extension api https://code.visualstudio.com/api/references/vscode-api#extensions and if not create a Feature Request for it.
  • k

    kevins8

    05/20/2021, 2:10 PM
    so its not officially supported. the hooks api is meant to work with the current note for its particular stage of the lifecycle. anything beyond that might break in future releases. we do plan on expanding the integration points into dendron so if you have a specific use case in mind, i can let you know what it would map on to
  • c

    codefriar

    05/20/2021, 2:16 PM
    I was experimenting and building an ipados / macos app for dendron
  • c

    codefriar

    05/20/2021, 2:17 PM
    One of the constraints i'm hitting is that service workers aren't supported - unless you lock your app to a specific domain at build time
  • c

    codefriar

    05/20/2021, 2:19 PM
    Anyone familiar with a JS markdown renderer ? if so, I could do a side-by-side with the preview in a second instance of webview so service workers aren't needed. THe idea is that the preview pane, would have a SPA that's able to retrieve and render .md files
  • k

    kevins8

    05/20/2021, 2:21 PM
    do you need service workers for that? could you dynamically query the note contents via javascript?
  • c

    codefriar

    05/20/2021, 2:22 PM
    well, the markdown-preview-enhanced uses service workers
  • c

    codefriar

    05/20/2021, 2:22 PM
    I'm thinking there may be a desire to be able to browse /search notes without editing them.
  • c

    codefriar

    05/20/2021, 2:22 PM
    but also have the ability to edit them by tapping a button
  • v

    vicrerdgz

    05/20/2021, 2:27 PM
    btw @User I would like to know if there is some doc of the project like "where is what" to try to contribute a bit into the code base. I'm not used to js/ts project organization 😅
1...646566...108Latest