Home / v0.9.2
Name Modified Size InfoDownloads / Week
Parent folder
0.9.2 source code.tar.gz 2023-05-26 3.1 MB
0.9.2 source code.zip 2023-05-26 3.6 MB
README.md 2023-05-26 3.8 kB
Totals: 3 Items   6.7 MB 0

Features

New Menu Control

The new Menu control is a View that contains a vertical list of interactive items. These items notify whenever the user interacts with them using a pointer or the keyboard. This control support a couple types of action items and one that shows a new "sub" menu when the user interacts with it. You specify the contents of a Menu using the MenuFactory, which provides a declarative DSL for defining the structure and behavior of Menus.

:::kotlin
val menu = menus(close = { /* close menu */ }) {
    menu("Sub menu") {
        prompt   ("Prompt"            ) { /* handle */ }
        separator(                    )
        action   ("Do something", icon) { /* handle */ }
        menu     ("Sub-sub menu"      ) {
            action   ("Some action"   ) { /* handle */ }
            separator(                )
            action   ("Another action") { /* handle */ }
        }
    }
    action("Execute action") { /* handle */ }
}

TextFields now expose a purpose property

This new property provides a way to specify the use-case for a TextField, which allows its behavior to change rendering or what keyboard to show on mobile.

:::kotlin
val textField = TextField().apply {
  purpose = Email
}

Unmanaged Scroll on Browser

NativeScrollPanelBehavior (for Browser) now takes a parameter that indicates whether it should use managedScrolling. Managed scrolling is what Doodle has done for a while now. It lets the framework directly handle positioning the ScrollPanel contents as the user scrolls. This is very powerful and flexible; but it relies on the browser invoking the onscroll event at a high framerate to avoid lag. Unfortunately this isn't always the case. Mobile WebKit does not deliver these events fast enough to make it smooth. So developer can choose to disable this behavior via the new flag.

APIs

  • Deprecating previous types in io.nacular.doodle.controls.menu
  • Icon's generic bounds have been expanded to Any. This makes it easier to create icons that are based on arbitrary data instead of only Views.
  • PathIcon can now be created with a Stroke and Paint, making it more customizable.
  • Helper for creating inset Rectangle

Fixes | Improvements

  • General
  • Fixing many build warnings
  • Right-left issue for popups and BasicDropdownBehavior
  • Enabled parallel builds
  • Edge case in View to/from absolute
  • BasicDropdownBehavior and BasicSpinnerBehavior now use rounded joints/end-caps for their arrow paths
  • Issue where Theme not applied to existing popups when ThemeManager.selected called
  • Expanded ThemeManagerImpl tests
  • New tests for RealGraphicsSurface View index and zOrder
  • New tests for PopupManagerImpl
  • New tests for HorizontalFlowLayout
  • Build
  • Adopted Gradle library bundles using toml file
  • Browser
  • Context menu is now suppressed if the pointer pressed event is consumed. [#52]
  • Incorrect default font-weight in global styles
  • Display no longer sets a background color when filled w/ Transparent
  • zOrder now behaves as it should: only affecting ordering within a container. It also no longer allows Views to render above popups. [#53]
  • zOrder no longer affects how popups are displayed
  • Issue where multiple shadows not rendered properly by Webkit

Versions

  • Mockk -> 1.13.5
  • Gradle -> 8.1.1
  • LogBack -> 1.4.7
  • slf4j-api -> 2.0.4
Source: README.md, updated 2023-05-26