Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Rev 1 feedback #24

Closed
mcrascal opened this issue May 30, 2023 · 8 comments
Closed

Rev 1 feedback #24

mcrascal opened this issue May 30, 2023 · 8 comments
Labels
review Requires additional testing and review

Comments

@mcrascal
Copy link
Member

Really cool overall, I could see myself using it for sure.

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.
  • 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.
  • 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.
  • 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.

Gifs

CleanShot 2023-05-29 at 21 06 13
CleanShot 2023-05-29 at 19 13 59@2x

@RandomFractals RandomFractals added the review Requires additional testing and review label May 30, 2023
@RandomFractals
Copy link
Contributor

  • 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:

@RandomFractals
Copy link
Contributor

RandomFractals commented May 30, 2023

  • 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.

@RandomFractals
Copy link
Contributor

RandomFractals commented May 30, 2023

  • 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.

@RandomFractals
Copy link
Contributor

  • 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)

RandomFractals added a commit that referenced this issue May 30, 2023
…and #24)

for the app server to start before we request a page from a simple browser
@RandomFractals
Copy link
Contributor

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.

@RandomFractals
Copy link
Contributor

RandomFractals commented May 31, 2023

  • 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.

@RandomFractals
Copy link
Contributor

  • 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.

@RandomFractals
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
review Requires additional testing and review
Projects
None yet
Development

No branches or pull requests

2 participants