You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new Carousel control is a View that contains a lazy list of items generated from a ListModel. It delegates all decisions about what items to show to a Presenter obtained from its CarouselBehavior. The Carousel only displays items the Presenter requests as it moves through frames. This means it can scale to very large datasets as long as the Presenter only shows items that are visible.
Carousels can have a very wide range of layouts and behaviors. This flexibility is achieved by giving Presenters full control over which items (including supplemental ones not based on the data model) are shown at any point, how opaque they are, their positioning, size, transform, clipping, etc.. With this, you can create almost any kind of carousel experience you'd like.
Carousel transitioning is a key part of their behavior. The control is therefore fully dynamic and interactive. You can move between frames in two ways. Either by skipping ahead or backward or by manually moving the Carousel to an x/y offset and then letting it transition to the best frame when manual movement is complete. Carousels rely on a Transitioner to manage the way they animate for all these movements. This allows a great deal of flexibility and customization.
Presenters are responsible for updating frame state whenever the Carousel adjusts anything. This allows for holistic animations. There are several built-in Presenters that show how to create various effects as well.
The Animations implement the new Pausable interface, which allows them to be paused and resumed at any time.
val animation = animate.invoke(0f to 1f, using = tweenFloat(easeInOutCubic, duration =1* seconds)) {
// ...
}
animation.pause()
// ..
animation.resume()
view | container Improvements
These DSLs now expose more of the protected properties of View and Container respectively.
view {
+ view {} // adds a child to the View
chidren += view {} // children now accessible
layout = simpleLayout {} // access layout
addedToDisplay = { } // called when view added to display
removedFromDisplay = { } // called when view removed from display
contains = { _ ->false } // called to decide if a point within the view// ..
}
APIs
General
Vector3D now exposes its magnitude
basicMenuBehavior module function now exposes various configuration input parameters to customize the result.
TreeItemRole now has a selected property
New lerp function for Rectangle and Size
New Rectangle constructor that takes a Size
BasicDropdownBehavior now takes Accessibility label for its button
BasicMutableDropdownBehavior now takes Accessibility label for its button
BasicSpinnerBehavior now takes Accessibility labels for its buttons
BasicMutableSpinnerBehavior now takes Accessibility labels for its buttons
basicDropdownBehavior(), basicMutableDropdownBehavior(), basicSpinnerBehavior() and basicMutableSpinnerBehavior() now support accessibility labels
BasicDropdownBehavior and BasicMutableDropdownBehavior now allow inset to be specified
basicDropdownBehavior() and basicMutableDropdownBehavior() now take an optional inset
MonthPanel class is now open
New FieldState.ifInvalid utility function
Browser
Auto-complete can now be disabled for nativeTextFieldBehavior
Fixes | Improvements
General
Bug where MonthPanel could NPE if selection queried while nothing selected
Bug in TextMetrics size calculation when lineSpacing set
TreeRow now updates its accessibility role with the current selected state.
Issue where deleted Views might not be cleaned up if they are removed from a parent at the same time their child is being removed and added to that same parent.
Bug where View could loop when a child is removed and added to its parent
Camera now clips transformed ConvexedPolygons so their points do not go behind it.
Issue where the children of a View that is removed are not properly re-added if they are placed into their grandparent before the next cleanup pass within RenderManagerImpl.
Bug where View.toAbsolute and View.fromAbsolute resulted in incorrect results
Optimize View.resolvedTransform with caching
Issue where TextField could not override user input during textChanged
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Features
New Carousel Control
The new
Carousel
control is aView
that contains a lazy list of items generated from aListModel
. It delegates all decisions about what items to show to aPresenter
obtained from itsCarouselBehavior
. TheCarousel
only displays items thePresenter
requests as it moves through frames. This means it can scale to very large datasets as long as thePresenter
only shows items that are visible.Carousel
s can have a very wide range of layouts and behaviors. This flexibility is achieved by givingPresenter
s full control over which items (including supplemental ones not based on the data model) are shown at any point, how opaque they are, their positioning, size, transform, clipping, etc.. With this, you can create almost any kind of carousel experience you'd like.Carousel
transitioning is a key part of their behavior. The control is therefore fully dynamic and interactive. You can move between frames in two ways. Either by skipping ahead or backward or by manually moving the Carousel to an x/y offset and then letting it transition to the best frame when manual movement is complete.Carousel
s rely on aTransitioner
to manage the way they animate for all these movements. This allows a great deal of flexibility and customization.Presenter
s are responsible for updating frame state whenever theCarousel
adjusts anything. This allows for holistic animations. There are several built-inPresenters
that show how to create various effects as well.Animations Can Now Be Paused/Resumed
The
Animation
s implement the newPausable
interface, which allows them to be paused and resumed at any time.view
|container
ImprovementsThese DSLs now expose more of the protected properties of
View
andContainer
respectively.APIs
General
Vector3D
now exposes itsmagnitude
basicMenuBehavior
module function now exposes various configuration input parameters to customize the result.TreeItemRole
now has aselected
propertyRectangle
andSize
Rectangle
constructor that takes aSize
BasicDropdownBehavior
now takes Accessibility label for its buttonBasicMutableDropdownBehavior
now takes Accessibility label for its buttonBasicSpinnerBehavior
now takes Accessibility labels for its buttonsBasicMutableSpinnerBehavior
now takes Accessibility labels for its buttonsbasicDropdownBehavior()
,basicMutableDropdownBehavior()
,basicSpinnerBehavior()
andbasicMutableSpinnerBehavior()
now support accessibility labelsBasicDropdownBehavior
andBasicMutableDropdownBehavior
now allowinset
to be specifiedbasicDropdownBehavior()
andbasicMutableDropdownBehavior()
now take an optionalinset
MonthPanel
class is now openFieldState.ifInvalid
utility functionBrowser
nativeTextFieldBehavior
Fixes | Improvements
General
MonthPanel
could NPE if selection queried while nothing selectedTextMetrics
size calculation whenlineSpacing
setTreeRow
now updates its accessibility role with the current selected state.View
could loop when a child is removed and added to its parentView
that is removed are not properly re-added if they are placed into their grandparent before the next cleanup pass withinRenderManagerImpl
.View.toAbsolute
andView.fromAbsolute
resulted in incorrect resultsView.resolvedTransform
with cachingTextField
could not override user input duringtextChanged
nativeTextFieldBehavior
respectsTextField.cursorVisible
TextInput
settingcursorVisible
totrue
during selectionBasicDropdownBehavior
textField
form element would be considered invalid at creation when blank text is allowedStyledText.isBlank
not working as expectedMonthPanel
more efficiently responds to selection changes, especially when the selection model has a very large dataset.Browser
TreeRole
now marked as aria-multiselectableHyperLink
s ensure the associated html element inherits the a11y labels of their HyperlinkTextField
s ensure the associated html element inherits the a11y labels of their TextFieldTextField
behavior stopped supporting mask valuenativeTextFieldBehavior
now properly respectsTextField.cursor
nativeTextFieldBehavior
Desktop
Documentation
Versions
This discussion was created from the release 0.9.3.
Beta Was this translation helpful? Give feedback.
All reactions