-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Toggle for welcome text #12
Comments
@AssisrMatheus Working through this, hope you don't mind a couple questions. Trying to mimic your patterns if I can. So, unlike the leftMargin, welcome text is applied in main.js (via initialState or via the nextPage logic). How do you recommend passing the config for use in in main.js? Any thoughts on the refactoring in general? |
Not at all, shoot them! I just might take some time to answer
The first idea I had is that when generating the HTML content here: sidebar-markdown-notes/src/webviewProvider.ts Line 113 in 50a2d6f
A new <script> tag could be added, which creates a global javascript variable with the config's values. But that's because I'm not familiar with the extension API. If we could pass values with postMessage:
Like we can on main.js. It could also be a possibility. |
@AssisrMatheus for the tag. Does this look alright and does it need to be nested anywhere specific in _getHtmlForWebview()?
PS debugging webviews is so painful how have you been doing it? |
See #13. (PS debugging still terrible pls send tips) |
Hey @ryanraposo sorry for the late reply. I'm usually taking time off the computer after work, so I'm not having much time to answer your questions.
Hmm I think that looks good enough to me! I was going to suggest you just giving the entire config object but I just saw you did that in the pr
When in the sandbox environment(when you press F5 in the workspace and it opens a vscode view), and with the webview focused(just click on it), you can press CTRL + SHIFT + P to open the command tooltip(not the exact name for the feature haha), and type "Open webview developer tools". It'll then open a normal chrome/electron developer tools window but for the inner webview. Where you can see logs and put breakpoints in the html/main.js. |
No rush, its all good.
Awesome, thanks. |
Currently, the welcome text is added to all pages. A new configuration toggle for this would be nice. Something like:
The text was updated successfully, but these errors were encountered: