Comments (8)
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.
- 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 CodeCommand Palette ...
Evidence
status bar button showsStart dev server
tooltip already (#6)
from evidence-vscode.
- 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.
- 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.
- 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.
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.
- 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 apptemplate
- 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.
- 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)
- Curating of CLI information
- Terminology of commands exposed to users HOT 1
- Setting to prefer external browser rather than simple browser HOT 1
- Remove Create Evidence Project from Template
- Button placement/icon to start/stop server HOT 1
- Automatic server start causes second loading message to appear
- Preview window shows up if you kill server before it has finished launch HOT 5
- Ctrl+R startServer keybinding collision with browser refresh in codespaces HOT 3
- Clean Install Walkthrough Flow HOT 1
- Make component props discoverable HOT 1
- Slash command is fired even when focus is outside of current file HOT 1
- Restore default `README.md` and standard `.md` markdown documents handling in VS Code IDE HOT 1
- New Evidence Project option in right-click menu shows up at the top of the list HOT 2
- Evidence: New Evidence Project - does not appear to fetch latest template HOT 1
- VSCode: Remove 'tab target' in SQL code blocks HOT 2
- Extension does not activate in evidence project HOT 6
- Display current version of node if incompatible
- VS Code re-opens the file-select window on top of the error message when trying to create evidence in non empty folder
- Create Templated Page from Query does not work without a link column HOT 2
- Extension is not activitated HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from evidence-vscode.