Skip to content

Releases: dmjio/miso

1.9.0

02 Apr 17:20
822889b

Choose a tag to compare

🍜 1.9.0

See the haddocks, miso repo and org for more information.

✨ Highlights

The major feature added in 1.9 is React-style components (VComp). Isolated Component can now be created and communicate with each other via message-passing. The original DSL has been extended to support this feature using an existential encoding (shown below). This feature allows type-safe embedding of Component in View. See the +> combinator to nest Component (this combinator unifies Component along the parent-child relationship, creating a typesafe Component hierarchy).

The JavaScript runtime has been extended to handle recursive mounting during diffing (FFI mounting calls recursively between Haskell and JS to mount Component). Delegation and hydration have also been extended to support Components.

-- 'VComp' case added to the View DSL
data View model action
   = VNode Namespace Tag [Attribute action] [View model action]
   | VText (Maybe Key) MisoString
   | VComp (Maybe Key) (SomeComponent model) -- new
-- Existential to create isolated 'Component'
data SomeComponent parent 
   = forall model action . Eq model
  => SomeComponent (Component parent model action) 
-- 'App' is now a synonym for 'Component'
type App model action = Component ROOT model action

-- 'Component' is now parameterized by 'parent' and recursive on 'View' via 'view'
data Component parent model action 
  = Component
  { model :: model  
  , view :: model -> View model action
  , ...
  }

🎁 Features added (non-exhaustive)

  • miso is now recursive, Component can now be embedded in other Component using the mount (+>) combinator
  • We have a GitHub org now that features many examples.
  • We've added a scheduler (like React) to process all events for all components in FIFO order, and to facilitate Component communication.
  • Preliminary documentation has been added here
  • Support for Web Assembly and GHC WASM browser mode
  • 0 dependency (only rely on boot packages, no more jsaddle), necessary for MicroHs integration.
  • inline-js, a QuasiQuoter for JavaScript. See Miso.FFI.QQ
  • App is now a synonym for Component ROOT
  • Event delegation now virtualizes both the capture and bubble phases
  • All JS has been ported to TypeScript, and is on npm
  • Component communication has been added (e.g. broadcast)
  • Experimental support for reactivity through data bindings (see reactivity)
  • Transition is now Effect and has become the default interface for updating state, introducing effects.
  • We've added a Miso.Style module with our own style DSL.
  • Playwright integration tests (200+) were added and run in CI for both JS and WASM.
  • Copious unit tests added along with increased code coverage. See coverage.
  • Serverless (dropped NixOps).
  • Added flake.nix
  • 2D / 3D Canvas support has been added. See canvas-2d.
  • Subscriptions, WebSockets, SSE have all been upgraded
  • Miso.Fetch has replaced XHR.
  • Replaced aeson w/ Miso.JSON (for performance reasons due to JSString).
  • Miso.Html.Render has replaced lucid (we render our own HTML).
  • Custom renderers were added, this allows experimental support for mobile phones as seen in miso-lynx
  • Added our own lens library Miso.Lens
  • Experimental hot reload support in Miso.Reload
  • Support for the audio / video media APIs in Miso.Media
  • Exported our own lexer and parser in Miso.Util.Parser
  • Added new effect primitives for perform IO (io / withSink / sync).
  • Added a new router in Miso.Router
  • Component lifecycle hooks mount / unmount
  • Node lifecycle hooks onCreated , onDestroyed

🚀 2.0.0 plans

💝 Special thanks

A special thank you to everyone involved in this release.

  • @TerrorJack for adding synchronous callbacks to the WASM backend, enabling the Component mounting feature in 1.9.
  • @colinaaa for encouraging the miso-lynx integration.
  • @Huxpro for the mention at ReactSummit, and the entire Lynx family for LynxJS.
  • @juliendehos for three.hs, canvas games, flake support, docker integration, mdbook, etc. other improvements too numerous to mention.
  • @ners for GraphQL, implementing the JSON spec., and much more.
  • @hunvreus for Basecoat CSS.
  • @Zer0- for extending and testing hydration support, HTML escaping and adding SSR, etc.
  • @fanshi1028 for testing out every single new feature.
  • @georgefst for general API and DX improvements, lens / reactivity support.
  • @amesgen for servant-client support and template-haskellsplices to load miso's JS in the WASM backend 💐
  • @brakubraku for encouraging the implementation of React-style components.
  • @jhrcek for documentation.
  • @fizruk for lens API design.
  • @augustss for making MicroHs.
  • @Reijix for help w/ async. / sync. callbacks across WASM / JS backends and Drag n' Drop.
  • @Deku-nattsu for Lynx support
  • @maybetonyfu for general support

What's Changed

  • Move to matrix.org by @dmjio in #762
  • Remove duplicate model param. by @dmjio in #764
  • Bump jsaddle and ghcjs-dom by @dmjio in #765
  • Removes ios flag and CPP pragma, removes jsaddle flag by @dmjio in #767
  • Initial commit of WASM support by @dmjio in #768
  • Fix type application parse error on GHC 9+ by @georgefst in #769
  • Add more CI build targets by @dmjio in #771
  • Use JSaddle.Warp.debug when run from GHCI by @georgefst in #770
  • Add wasm overlay, put hello-world-wasm-web under ci. by @dmjio in #772
  • Haskell miso updates by @dmjio in #773
  • Add tagged releases to CI by @dmjio in #776
  • Use environment variable for runner port by @georgefst in #774
  • Refactor NixOS modules, and NixOS test runner. by @dmjio in #777
  • Add Wasm and better jsaddle-warp support to sample apps by @georgefst in #778
  • Fix broken source link on haskell-miso.org by @ashwinmathi in #780
  • Add CSS links to todo-mvc by @hasufell in #782
  • Initial commit of Components by @dmjio in #766
  • Add misoComponent function by @dmjio in #783
  • Upgrade nixpkgs to version with fixed ghcjs by @tysonzero in #706
  • Componentize SSE example by @dmjio in #786
  • Adjust CPP for wasm ci build. by @dmjio in #787
  • Use nix-channel --update in CI by @dmjio in #789
  • Remove redundant imports and name shadowing in .Internal by @dmjio in #788
  • Try increasing memorySize for NixOS tests QEMU. by @dmjio in #790
  • Add virtual DOM integrity check to DebugPrerender by @dmjio in #785
  • Mount component during syncChildren worst case. by @dmjio in #791
  • Adds normalization when checking href property by @dmjio in #792
  • Use language and links more inclusive of the WASM backend by @dmjio in #794
  • Add upper bounds to miso.cabal file. by @dmjio in #793
  • Ensure that target exists before delegation. by @dmjio in #795
  • Update CI badge, test matrix -> Miso CI. by @dmjio in #797
  • Cleanup Subs by @dmjio in #798
  • Mount startComponent to body by @dmjio in #800
  • Split out events. by @dmjio in #799
  • Use a different HasLink instance for View. by @dmjio in #802
  • Mention components, link to WASM FFI docs. by @dmjio in #803
  • Add Miso.Render, render our own HTML. by @dmjio in #801
  • Normalize URI, drop prefix slash when parsing window.location.href by @dmjio in https...
Read more

1.8.7

11 Feb 01:49
4e88347

Choose a tag to compare

What's Changed

  • Use javascript_HOST_ARCH over ghcjs_HOST_OS by @dmjio in #760
  • Updated GC settings on server

Full Changelog: 1.8.6...1.8.7

1.8.6

10 Feb 01:07
c313836

Choose a tag to compare

  • Hides the implicit show export from Data.Text in Miso.String
  • Merges new syntax for GHC JS, preserving GHCJS backwards compatibility

What's Changed

  • Fix build with text 2.1.2 by @georgefst in #752
  • Add robots.txt to haskell-miso.org by @dmjio in #753
  • Add Internals.md documentation. by @dmjio in #755
  • Hide show re-exports on text > 2.1.2 in Miso.String by @dmjio in #756
  • New syntax support, backwards compat cpp for ghcjs by @dmjio in #757
  • Bump to 1.8.6 by @dmjio in #758

New Contributors

Full Changelog: 1.8.5...1.8.6

1.8.5

31 Oct 18:26

Choose a tag to compare

Expose global sink as sink

1.8.4

07 May 11:11
8f4e05a

Choose a tag to compare

Support building w/ new js backend.

1.8.3

09 Sep 22:10
8f651ae

Choose a tag to compare

  • Implemented workaround for GHC bug in 9.0.2 where hidden functions are still colliding with Prelude functions (e.g. elem)
  • Added Haskell favicon to https://haskell-miso.org
  • Indentation adjustments in JS files.
  • Async version bump in JS tests.
  • Support text-1.2.5

1.8.2

07 Apr 19:40
15886bd

Choose a tag to compare

  • Fix usage of tabs and spaces 94a384d
  • Fix parse view to not drop unclosed tags b691e8d
  • Add jsstring only flag 23119ee

1.8.1

21 Dec 00:21
7dacb11

Choose a tag to compare

  • Fixes bug in event delegator where events raised from a select element's onchange option wasn't handled appropriately.
  • Move simple exe to examples 9e394bd
  • TodoMVC CSS fix
  • Build system updates

1.8

13 Sep 07:13
0da0223

Choose a tag to compare

1.8
  • Added rawHtml combinator. Useful for converting raw HTML into virtual DOM.
  • Backend and frontend fully merged (@tysonzero)
  • styleInline combinator (@developandplay)
  • Pixel Card Wars (@smelc)
  • Delegate uses synchronous instead of asynchronous (@parthshah31)
  • Nix refactoring
  • GitHub CI
  • Hosted examples via nixops.

1.7.1

05 Jul 18:35

Choose a tag to compare

  • Allows for adding multiple classes together
view _ = div_ [ class_ "foo", class_ "bar" ] [ ]

Will be shown on the DOM as class="foo bar"

  • Bug fixes related to isomorphic rendering.