Changelog History
Page 2
-
v6.5.0 Changes
May 15, 2020Hello,
๐ I'm glad to release the version 6.5.0.Clean body
go-app now provides the function CleanBody. This is to remove extra elements in the body that might be added by third-party libraries.
๐ While building an app, I ran into a problem where Amazon advertisements where popping into the screen when navigating fast to other pages. The problem was that Amazon is loading a script to display their ads. When the loaded code does not find the ad container (when a component is dismounted), it inserts the ads directly in the body.
This is to prevent this kind of behavior from third-party libraries.
๐ Bug Fixes
๐จ Some code has been refactored and hash navigation (eg.
http://my.domain/hello#Input
) now works properly. -
v6.4.1 Changes
May 08, 2020Hello there,
This version brings some stability improvements:nil
values are now ignored when they are put in an element body- โก๏ธ Component updates are now properly skipped when a component is dismounted or when the update is done from the same pointer
OnNav
from the Navigator interface is now propagated to all components
-
v6.4.0 Changes
May 05, 2020Hello,
๐ Here is the v6.4.0. This release brings a couple of modifications:โก๏ธ OnUpdate : You can now listen for a component update by implementing the Updatable interface.
type myCompo struct { app.Compo}func (c *myCompo) OnUptdate() { // Component has been updated...}
app.Text() now takes an
interface{}
that is stringified to render a text nodeOnLoad event handler has been added to supported HTML elements
Non self closing HTML elements now have a
Text(v interface{})
helper method that sets the element body to a single text node:app.H1().Text("hello")// Same as:app.H1().Body( app.Text("hello"), )
๐
LocalStorage
andSessionStorage
encryption has been removed in order to let user decide how they manage those storages. Adding encryption added an overhead in size that made storage filled faster while the maximum size is 10MB
-
v6.3.1 Changes
April 20, 2020Hello,
โก๏ธ Here is a minor update that addresses reported issues:OnDismount
method is now called when the Dismounter interface is implementedโ Added the JSValue function that allows getting the underlying syscall/js value from a javascript value
// JSValue returns the underlying syscall/js value of the given Javascript// value.func JSValue(v Value) js.Value { return jsval(v) }
๐ HTTP handler can now be set to use a light version of
app.css
. The light version does not provide default styling for HTML elements. It can be enabled by setting theUseMinimalDefaultStyles
totrue
:h := app.Handler{ UseMinimalDefaultStyles: true, }
Thanks to @jwmach1, @voldyman, and @ruanwenfeng for reporting issues and submitting PR.
-
v6.3.0 Changes
April 07, 2020Hello there.
This version allows setting environment variables to the HTTP Handler that are passed to the WebAssembly app.
How to use?
Set the environment variables in the app.Handler:
app.Handler{ Env: app.Environment { "CUSTOM\_FOO", "foo", "CUSTOM\_BAR", "bar", }, }
Then in the WebAssembly app, retrieve it by calling Getenv:
foo := app.Getenv("CUSTOM\_FOO")
๐ Bug fixes/minor changes
- โก๏ธ Child node parent is now properly set when a node is added during an update
- ๐ป Browser storage have a memory implementation in non-wasm architecture
- ๐ป A Dispatcher type has been added to describe a function that is executed on the UI goroutine
- โก๏ธ Readme has been updated to show contributors
Thanks
- @monkeywithacupcake for the Open collective integration
-
v6.2.2 Changes
April 05, 2020Hello there.
๐ This release contains the following changes:
- ๐ Support for
<thead>
tag - Javascript files are now included at the end of the body in order to avoid concurrent access to the page loader
Thanks to @jwmach1 for reporting those issues.
- ๐ Support for
-
v6.2.1 Changes
March 23, 2020 -
v6.2.0 Changes
March 19, 2020Hello there, this is Maxence.
๐ I'm glad to release the v6.2.0 of the go-app package.
Customizable root directory
๐ Previously, the
app.wasm
file and theweb
directory had to be located in the same directory as the server binary in order to be served.This version allows changing this behavior by introducing the root directory.
๐ The root directory is where
app.wasm
and theweb
directory are located:CUSTOM\_LOCATION โโโ app.wasm โโโ web โโโ Static resources...
0๏ธโฃ By default located in the same directory as the server binary, it can be changed to:
- Another local location.
๐ A cloud storage bucket such as Amazon S3 or Google Cloud Storage, which is very useful in a scenario where a PWA is deployed on a cloud function to reduce function counter.
h := app.Handler{ RootDir: "CUSTOM_LOCATION", }
syscall/js wrapper
โ Wrappers for CopyBytesToGo and CopyBytesToJS have been added.
Misc
๐จ Some refactoring to improve overall code quality.
Thanks
๐ Thanks to @sg0hsmt, @gabstv, and @ruanwenfeng for their contributions to this release.
-
v6.1.0 Changes
March 11, 2020Hello,
Here come the version 6.1.0.๐ป It introduces the possibility to route UI content from a regex pattern.
It is done by using the RouteWithRegexp() function:
package mainimport "github.com/maxence-charriere/go-app/v6/pkg/app"func main() { app.Route("/", app.Text("hello world")) app.RouteWithRegexp("/[0-9]+", app.Text("hello number")) app.Run() }
Thanks to @stevelr for making this happen.
-
v6.0.4 Changes
March 09, 2020This version introduces links to demo working on Google Cloud App Engine and Function.