[unreleased]
- Remove
'static
bound fromEl
andNode
- [BREAKING] Changed
perform_cmd
andfetch
return type toT
instead ofResult<T, T>
. - Added Aria attributes.
- Added example
tea_component
. - [BREAKING]
UpdateEl<T>
changed toUpdateEl<Ms>
andfn update(self, el: &mut T);
tofn update_el(self, el: &mut El<Ms>);
(#370). - Added trait
UpdateElForIterator<Ms>
. - Added support for all
Iterator
s,Option
,u32
,i32
,usize
,f64
and references in element creation macros (#365, #128). - [BREAKING]
String
implementsUpdateEl<T>
. (References are now required forString
properties, e.g.div![&model.title]
.) - Fixed
href
detection to ignoreuse
elements (#384). - Added methods
subscribe
,subscribe_with_handle
,perform_cmd_with_handle
,stream
,stream_with_handle
andnotify
intoOrders
(#130). - Added
cmds::timeout
,stream::interval
,stream::window_event
,subs::UrlChanged
andsubs::UrlRequested
(#131). - Added example
subscribe
. - Updated example
todomvc
to use subscriptionUrlChanged
instead ofroutes
. - [BREAKING] Futures in
perform_cmd
andperform_g_cmd
are executed immediately. - Added
App
methodsnotify
andnotify_with_notification
. - [BREAKING]
App
methodprocess_cmd_and_msg_queue
renamed toprocess_effect_queue
. - [BREAKING] Url change listeners are always active (even if
routes
is not defined). - Added
cmds
,streams
,subs
,CmdHandle
,SubHandle
andStreamHandle
into the Seed's prelude. - [BREAKING] Removed module
next_tick
. - Added method
App::start
(alternative toAppBuilder
) (#376, #382). - Added trait
GetElemnt
+ included in theprelude
(alternative toMountPoint
, used inAppStart
). - Updated example
subscribe
to useApp::start
. - Derive
Debug
forElRef
. - Added macros
C!
andIF!
and helpernot
(#375). - Added trait
ToClasses
+ included in theprelude
. - Updated
todomvc
example to useC!
,IF!
,matches!
andApp::start
.
- Implemented
UpdateEl
forFilter
andFilterMap
. - Added method
El::is_custom(&self)
. - Fixed custom elements patching (#325).
- Removed unnecessary error message for comment nodes.
- [BREAKING] Removed deprecated
update
andtrigger_update_ev
. - [BREAKING] Removed the remains of lifecycle hooks.
- Fixed
value
andchecked
setting for input elements (a bug in VirtualDOM patch algorithm). - [BREAKING] Removed unpredictable internal input listeners - Seed will not longer react to external input value changes.
- [BREAKING] Use
EventHandler
instead ofListener
. (Listener
is now used as the internal DOM EventListener representation.) - [deprecated] -
raw_ev
is deprecated in favor ofev
. Functionality is the same. - Improved performance - rewritten event-handling and other refactors in VirtualDOM.
- Fixed processing of multiple event-handlers (#138).
- Added DOM Element references - see
ElRef
and examples (canvas
,user_media
ortodomvc
) (#115). - Removed
Ms: Clone
restriction as much as possible. - [BREAKING] Added or changed
Custom
variant fromCustom(String)
toCustom(Cow<'static, str>)
inEv
,Tag
,At
andSt
. Use functionfrom
to create custom entities (e.g.At::from("my-attribute")
) (#208). - Added macro
nodes!
. It acceptsNode<Msg>
andVec<Node<Msg
, returns flattenedVec<Node<Msg>
. - Refactored all examples.
- Fixed and rewritten example
todomvc
. - Renamed
counter
example tocounter_advanced
. - Renamed
drop
example todrop_zone
. - Removed
server_interaction_detailed
example. - Added a new simpler
counter
example. - Changed example in the main
README.md
. - Added flag
#![forbid(unsafe_code)]
so the Seed will be marked as a safe library by the Rust community tools. - Removed
clone
restriction from the methodEffect::map_msg
. - Implemented
UpdateEl
forFlatMap
. - Adapted to Rust 1.41.0.
- [BREAKING]
MessageMapper::map_message
changed toMessageMapper::map_msg
. - [BREAKING]
fetch
andstorage
moved toseed::browser::service::{fetch, storage}
, but reimported at the lib level. Ie:seed::fetch
, andseed::storage
. - Added support for
Vec<Attr>
andVec<Style>
in view macros. App
included inprelude
.- [BREAKING] Seed refactored to use
async/.await
.fetch.rs
docs updated. - Export
Attrs
,Style
,Listener
. ie, can import withseed::Style
etc. - Fixed a bug causing the docs not to build.
- Added helper
seed::canvas()
, andseed::canvas_context()
helper functions. - Fixed
Url
parsing (resolves issue with hash routing). - [BREAKING]
From<String> for Url
changed toTryFrom<String> for Url
. - Fixed jumping cursor in inputs (#158) .
- Added method
orders.after_next_render(Option<RenderTimestampDelta>)
(#207). - Fixed a bug with back/forward routing to the landing page (#296).
- Deprecated
Init
struct, replacing it withBeforeMount
andAfterMount
structs to better denote state before and after mounting theApp
occurs. - Added a new function
builder
which replacesbuild
as part of deprecatingInit
. - Added a new function
build_and_start
which replacesfinish
as part of deprecatingInit
. - Added
IntoInit
andIntoAfterMount
traits. It is possible to use these in place of a closure or function to produce the correspondingInit
andAfterMount
structs. - Messages sent from
IntoAfterMount
will now be run after the routing message. - Added example
app_builder
. events::Listener
is included inprelude
.()
s have been replaced with structs - e.g.GMs = ()
=>GMs = UndefinedGMs
.WindowEvents
alias changed toWindowEventsFn
for consistency with other*Fn
.- Commented builder and helper methods.
- Added an
Init
struct, which can help with initial routing (Breaking) - The
routes
function now returns anOption<Msg>
(Breaking) - Updated
Tag::from()
to accept more input types style!
now accepts alsoOption<impl ToString>
- Fixed a bug affecting element render order
- Added a
hashchange
listener - Improved error-handling
- Tweaked bootstrap order so that
main_el_vdom
is initialized first (internal) - Macro
custom!
checks if you set tag, and panics when you forget - Fixed a bug with children being absent from cloned elements
- Improved debugging
- Fixed a namespace bug with adding children to
Svg
elements - Fixed a bug affecting Safari
- Added
seed::html_document()
andseed::cookies
convenience functions
- Added more SVG
At
variants - Added the
St
enum, for style keys; similar toAt
- Improved ergonomics of
add_child
,add_attr
,add_class
,add_style
,replace_text
, andadd_text
,Node
methods
ElContainer
, imported in prelude, renamed toView
. (Breaking)- Internal refactor of
El
: Now wrapped inNode
, along withEmpty
andText
. Creation macros returnNode(Element)
. (Breaking) - Changed the way special attributes like
disabled
,autofocus
, andchecked
are handled (Breaking) MessageMapper
now accepts closuresOrders
is a trait now instead of a struct. (Breaking)- Significant changes to MessageMapper
- Orders has new methods,
clone_app
andmsg_mapper
which can allow access to app instance. - Added more SVG element macros
- Several minor bux fixes
- Examples updated to reflect these changes
- Improvements to Fetch API, especially regarding error handling and deserialization
routes
now acceptsUrl
instead of&Url
(Breaking)- Improvements to fetch API
- Added
raw!
,md!
, andplain!
macros that aliasEl::from_html
,El::from_markdown
, andEl::new_text
respectively Attrs!
andStyle!
macros can now use commas and whitespace as separators, in addition to semicolons- Fixed typos in a few attributes (Breaking)
- Fixed a bug where an HTML namespace was applied to raw html/markdown elements
- New conditional syntax added in
class!
macro, similar toElm
'sclassList
Listener
now implementsMessageMapper
El methods
add_child
,add_style
,add_attr
, andset_text
now return the elements, allowing chaining- Fixed a bug with
set_text
. Renamed toreplace_text
. Addedadd_text
, which adds a text node, but doesn't remove existing ones. Addedadd_class
. (Breaking)
- Fetch module and API heavily changed (breaking)
- Added support for
requestAnimationFrame
, which improves render performance, especially for animations - Styles no longer implicitly add
px
. Addedunit!
macro in its place Map
can now be used directly in elements, without needing to annotate type and collect (ie for childElements
, andListener
s)- Significant changes to MessageMapper
- Orders hs new methods,
clone_app
andmsg_mapper
that allow access to app instance. - Fixed a bug where
empty
elements at the top-level were rendering in the wrong order - Added an
empty!
macro, which is similar toseed::empty
- Attributes and style now retain order
- Fixed a bug where view functions returning
Vec<El>
weren't rendering properly - Fixed a typo with the
viewBox
attribute
- The
update
fn now accepts a (new)Orders
struct, and returns nothing. Renders occur implicitly, with the option to skip rendering, update with an additional message, or perform an asynchronous action. (Breaking) .mount()
now accepts elements. Deprecated.mount_el()
- The
log
function and macro now support items which implementDebug
- Removed deprecated
routing::push_path
function (breaking)
- Added
seed::update
function, which allows custom events, and updates from JS
- Top level view functions can now return
Vec<El<Ms>>
,El<Ms>
, or something else implementing the new ElContainer trait
- Top level view functions now return
Vec<El<Ms>>
instead ofEl<Ms>
, mounted directly to the mount point. (Breaking) push_route()
can now accept aVec<&str>
, depreciatingpush_path()
- Fixed a bug where window events couldn't be enabled on initialization
update
function now takes a mutable ref of the model. (Breaking)Update
(update's return type) is now a struct. (Breaking)- Async, etc events are now handled through messages, instead of passing
App
through the view func. (Breaking) - Fixed some bugs with empty elements
- Internal code cleanup
- Added commented-out release command to example build files
- Added more tests
- Routing can be triggered by clicking any element containing a
Href
attribute with value as a relative link - Internal links no longer trigger a page refresh
- Models no longer need to implement
Clone
- Fixed a bug introduced in 0.2.9 for
select
elements
- Added a
RenderThen
option toUpdate
, which allows chaining update messages - Added a
.model
method toUpdate
, allowing for cleaner recursion in updates - Improved controlled-component (sync fields with model) logic
- Reflowed
El::from_html
andEl::from_markdown
to returnVec
s ofEl
s, instead of wrapping them in a single span. - Improved support for SVG and namespaces
- Added
set_timeout
wrapper
- Fixed a bug where
line!
macro interfered with builtin - Fixed a bug with routing search (ie
?
)
- Fixed a bug where children would render out-of-order
- Improved vdom diffing logic
- Attributes and Events now can use
At
andEv
enums - Routing overhauled; modelled after react-reason. Cleaner syntax, and more flexible
- Input, Textarea, and Select elements are now "controlled" - they always stay in sync with the model
- index.html file updated in examples and quickstart to use relative paths, which fixes landing-page routing
- Changed render func to use a new pattern (Breaking)
- Default mount point added: "app" for element id
- View func now takes a ref to the model instead of the model itself
- Routing refactored; now works dynamically
- Update function now returns an enum that returns Render or Skip, to allow conditional rendering (Breaking)
- Elements can now store more than 1 text node
- Fixed a bug where initially-empty text won't update
- Added more tests
- Exposed web_sys Document and Window in top level of Seed create, with .expect
- Modified build scripts to keep the wasm output name fixed at 'package', simplifying example/quickstart renames
- Tests now work in Windows due to update in wasm-pack
- Overhaul of fetch module
- Added server-integration example
- Added support for custom tags
- Added
class!
andid!
convenience macros for setting style
- Added high-level fetch api
- Added routing
- Added element lifecycles (did_mount, did_update, will_unmount)
- Added support for updating state outside events
- Added server_interaction, and homepage (this site) examples
- Initial release