Git Product home page Git Product logo

Comments (8)

RandomFractals avatar RandomFractals commented on September 26, 2024 1

Closing this initial ext. review ticket as all the listed issues above have been addressed, or pulled into new feature/enhancement tickets.

from evidence-vscode.

RandomFractals avatar RandomFractals commented on September 26, 2024
  • Start server, and the preview command do the same thing. I think for clarity we should only offer one command. My preference would be "start dev server". If there's a convention for "preview" that's ok too, but just one. Change should also be reflected in the tooltip for the button in the status bar.

Some clarifications on the current commands labeling and implementation:

  • Preview command starts a server if it is not running, then displays requested .md page preview. (#3)
  • Evidence: Start Server command is exposed via VS Code Command Palette ...
  • Evidence status bar button shows Start dev server tooltip already (#6)

from evidence-vscode.

RandomFractals avatar RandomFractals commented on September 26, 2024
  • Start server -- I see a blank simple browser while the project boots, but it never seems to clear for me. I have to hit reload to get it up.

This is a major application issue currently, not just windows related. We trimmed delays today. Before I had at least 5 secs for the server to gen. some pages and modules to show up eventually. Related: evidence-dev/evidence#901

Page should be loading in simple browser if you give your server more time to actually generate those pages via SSR and vite-svelte-plugin.

Also, would be nice if Evidence application static index page showed some Loading status message display before pages and modules with svelte components are generated.

from evidence-vscode.

RandomFractals avatar RandomFractals commented on September 26, 2024
  • I think commands which kill the dev server (stop server, update, install etc.) should shut the simple browser preview window. Today it stays visible, but the app is in a broken state when the dev server is shut down, and it won't respond to updates in markdown.

This is subjective. Users can still see last rendered page content in a simple browser even when you stop Evidence dev server.

In general, closing open editors and views or webviews in vscode automatically based on other actions in terminal is not recommended, and should be left to the end user to decide.

Also, worth noting that simple browser displays only one view and will be reused next time your dev server is started. See finer details in the #3 checklist and attached commits.

from evidence-vscode.

RandomFractals avatar RandomFractals commented on September 26, 2024
  • After initializing from the template, or re-opening vscode, I don't see the start dev server shortcut in the status bar until I have actually opened a .md file. I think the command should be visible in the status bar at all times when you are in a workspace which contains an Evidence project.

we'll refine this using workspaceContains per related discussion in this ticket: #25 (comment)

from evidence-vscode.

RandomFractals avatar RandomFractals commented on September 26, 2024

Nits and bugs

  • Start server -- I see a blank simple browser while the project boots, but it never seems to clear for me. I have to hit reload to get it up.

This should now work better per commit above with the 5 secs delay I added back to show page Preview.

from evidence-vscode.

RandomFractals avatar RandomFractals commented on September 26, 2024
  • I think commands which kill the dev server (stop server, update, install etc.) should shut the simple browser preview window. Today it stays visible, but the app is in a broken state when the dev server is shut down, and it won't respond to updates in markdown.

I researched this yesterday and shared preliminary info in slack:

looking at the built-in simple browser implementation I don't see a quick and easy way for us to open it on the side, or change that webview title and icon. So, if we want to see more stylized Evidence built-in browser and have more open/close/reload page options, we'd need to invest time into implementing our own. ... https://github.com/microsoft/vscode/blob/main/extensions/simple-browser/src/extension.ts

Also, that Simple Browser webview API doesn't provide close view option, and VS Code itself still doesn't have an API to iterate over all open webviews, only visibleTextEditors list is available. Therefore, it is not possible for us to close Simple Browser, without implementing our own or using another extension like the popular, but not maintained Browser Lite.

The only other quick workaround without investing 2-3 days on implementing your own custom Evidence App webview, is:

  • Have your app dev team add Start Dev Server "greeting" page to your app ./static folder and standard app template
  • We can set global state for when we open one of the Evidence pages in a Simple Browser extension, and what page it was on
  • On VS Code reload and Evidence extension activation, we can show new Start Dev Server "greeting" page in a Simple Browser, so that it doesn't show up blank.
  • When a user starts a server, we can take them to the last viewed page saved in the global state from the previous Preview session.
  • and lastly, your app still needs proper Loading ... home page while the server starts and generates pages. I've requested this multiple times in slack and tickets here to address long blank app page view in a browser.

That's a few hours, most likely a day of setup, dev, testing and coordination with the app dev team, if you'd like us to open a UX enhancement ticket to address it this or next week.

On the related note, we can also open new active editor group on the side, and maybe add Preview on the Side for the Simple Browser to show up there. However, changing that built-in browser title and icon is not possible per my read of that built-in vscode extension API referenced above.

from evidence-vscode.

RandomFractals avatar RandomFractals commented on September 26, 2024
  • Start server -- I see a blank simple browser while the project boots, but it never seems to clear for me. I have to hit reload to get it up.

we'll add home page ping in #31. However, your app startup and Loading message display still needs to be looked into on the app side.

from evidence-vscode.

Related Issues (20)

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.