-
Notifications
You must be signed in to change notification settings - Fork 40
v0.7 #290
-
Offline Sites, Console Embeds, and Much More
This is our biggest release yet! Lots of fixes and UX improvements, but also lots of new little features here and there. For example, the /web/dl mount is a new write-only filesystem that will cause files written to it to be downloaded by the browser.
There's also now an open command that will let you edit files that aren't in /project, which is what the file explorer shows by default. If you use open on a directory, it will add it as a new root in the explorer.
Lots more if you read the full changelog below, but first are some details on the major improvements in this release.
Console Mode Embeds
Embedding your environment on other pages with the embed snippet code previously just meant you could embed more or less the exact editor UX of visiting the environment directly. Now you can choose if you want "Editor Mode" or "Console Mode" for your embed.
Editor Mode is the same as before, giving you the default editor experience (though now without the Apptron topbar). Console Mode gives you just the terminal, making it really easy to create interactive playgrounds for CLI programs, or just run arbitrary Wasm/Linux on any web page.
Like before, you can put a .apptron/envrc file in your project (which can now also be .envrc in your project), allowing you to hook into right before you get a prompt. You can use it to run commands to customize the shell at startup like a project-level .profile.
You'd still get the "Welcome to Apptron" banner text with information about your session before .envrc is run. But now you can customize this by creating a .banner or .apptron/banner file, which will run instead of the default banner. For example, creating an empty file will cause no banner to be shown.
This all gives you full control over how the terminal session looks and is set up. You can even run different code in different contexts. For example, there is an environment variable ENV_MODE that is either edit or console. When loaded as an embed, there will be a variable set called ENV_EMBED.
Offline Public Sites
Apptron environments give you one of the fastest ways to publish a static site by just changing what's in the /public mount. Now by default, those static sites will work offline after visiting with no extra effort.
If you have a /public/index.html, we inject JavaScript to install a dynamic service worker that starts to cache all assets in /public in the background. Now after visiting the homepage, the entire site will then still be accessible and load when you are offline.
This is really cool and I've not seen any other platform do this, despite it being pretty low hanging fruit. Caching is always tricky, though, and the default refresh-ahead strategy used at the moment means you'll have to reload a page twice to see changes. Please try this feature to help us work these sorts of issues out.
Performance Improvements
It is an ongoing effort to maximize what we can get out of the embedded-like performance and memory constraints of Wasm and the browser. Two big improvements in this release, though both with plenty of room for further improvement, apply to network speed and environment building.
We upgraded our deployment's network gateway on Cloudflare Containers to the current max available of standard-4 and that gave us a 4x improvement in throughput. This mostly means downloading files and installing packages will be faster.
We also finally integrated our copy-on-write filesystem so that changes to an environment via envbuild are layered on top of the base system with every session. This was to make sure those environments got updates to the base system, but also turns out to make larger builds finish up to twice as fast.
Changelog
Additions
- add new project welcome readme (new projects should have a readme open #221 )
- add default service worker to cache public site assets for offline
- add custom 404 support to public sites
- add Embed Mode option to get new
consoleembed - add
opencommand for non-project files (add open command to open non project files in vscode #230 ) - add support for
.apptronfiles as dotfiles in project root - add
.apptron/banneror.bannerto customize shell banner - add support for
?topbar=0to hide topbar - add sponsor dialog from account dropdown (add sponsor and feedback dialogs #247 , sponsor dialog #225 )
- add feedback form dialog from topbar (add sponsor and feedback dialogs #247 , feedback dialog #224 )
- add bundle caching that clears on login (cache not cleared on login #163 )
- add publish helper command (publish helper command #227 )
- add loopback network device
- add
/web/dlfilesystem for triggering downloads - add
ENV_MODEenvironment variable (edit or console) - add kernel modules for audio support in vm
- add confirmation dialog on project delete (implement delete confirmation (require typing project name) #262 , dashboard: require confirmation to delete a project #262 #267 )
- add toast notification on project delete (Implement toast notifications #238 )
- add loading indicators to buttons (Loading indicators #244 , Implement loading indicator on buttons #203 , Add css and update html to prep for loading spinner #234 , Implement global loading indicator style for buttons: CSS #202 )
- add help text in publish tab of share dialog (Publish modal UX/UI improvements #195 , Add help text to publish modal #195 #249 )
- add improved copy button in share dialog (Create a class/style for the input+copy button UI pattern #242 )
Changes
- use copy-on-write for custom environments (copy-on-write based environments #217 ) (2x envbuild speedup, cuts seconds from pageload)
- improve network throughput (investigate improving networking speeds #159 ) (4x speedup)
- change starting directory to /project
- refactor share dialog architecture (Share dialog refactor #245 , improve share dialog architecture #222 )
Bugfixes
- fix project file truncation/corruption (project mount file additions are sometimes truncated #232 , project filesystem write is panicking #157 )
- fix first-time publish failure (fix first-time publish #231 )
- fix inability to publish project root (Loading indicators #244 , publish source should allow project root #233 )
- fix broken markdown preview (broken Open Preview on markdown files #229 )
- fix offscreen login component in smaller windows (update css to fix vertical centering issues on login component fixes #268 #269 , Fix vertical centering on login component #268 )
- fix broken UI in share dialog (Share modal - sometimes javascript doesn't run #266 )
- fix broken dropdown dismissal behavior (Added click-outside dismissal behavior to dropdown component #240 , dropdown: support click to dismiss #214 )
- fix broken apptron logo link (fix apptron logo link to dashboard #228 )
- fix short project name limit (Longer character limit for project names #208 )
- fix login failure when session expires (Login fails in logged-out session #210 , fix for issue 210 #243 )
- fix broken state after changing project settings (Resolve over-caching issue in project editor #167 )
- fix dangerous username change in account dialog (Hide config to change username #239 , fixes #239 - hide username accordion input #246 )
Full Changelog: v0.6.0...v0.7.0
As usual, we'd love you to try it out and file issues you run into. A huge thanks to our GitHub Sponsors who are now our only source of funding. Consider sponsoring to make sure we can sustainably see these projects all the way through and get that "Megazord" moment that's been 6 years in the making...
power-rangers-dino-thunder-power-rangers
This discussion was created from the release v0.7.
Beta Was this translation helpful? Give feedback.