Skip to content

Releases: 1j01/os-gui

v0.7.3 Taskbarless Minimization Fixes

15 Jun 19:43
Compare
Choose a tag to compare

Fixed

  • Fixed positioning of windows when minimized without a taskbar. ce0a55d
  • Fixed menu bar visibility when window is minimized without a taskbar. (It was typically offscreen, but you could reveal it by dragging the window.) 96e03a8
  • Closing a window now frees up its minimize slot at the bottom of the screen (if there's no taskbar). Previously only unminimizing did this. 1f72e6f

I also (mainly) worked on adding lots of tests!

Full Changelog: v0.7.2...v0.7.3

v0.7.2

29 May 20:51
Compare
Choose a tag to compare

Full Changelog: v0.7.1...v0.7.2

Fixed

  • Marked options.element and options as optional in applyCSSProperties type declarations. bcd463c + e84a778
  • Added missing force parameter to $Window's close method in type declarations and documentation. 7b6caf8
  • Changed getIconAtSize return type to Node | null (from HTMLElement) in type declarations, and mentioned that it can return null in the documentation. 80fea7b
  • (Also changed type of private $icon to JQuery<Node>) 80fea7b
  • (Added dock method requirement to deprecated $component option of $Window constructor, in type declarations.) 165d2b6
  • (Removed weird $G.off("scroll", onscroll); for non-existent onscroll in $Window.js. This didn't cause an error, since onscroll is a global event, but it shouldn't have been there.) 7a99593

v0.7.1

29 May 20:39
Compare
Choose a tag to compare

Full Changelog: v0.7.0...v0.7.1

Fixed

  • Fixed an assertion error that was thrown when navigating menus with the keyboard, due to an overly broad condition. (I asserted that the type was HTMLElement, but needed to assert that it was either null or an HTMLElement. The assertion was just for type narrowing.)

v0.7.0

29 May 20:37
Compare
Choose a tag to compare

Full Changelog: v0.6.0...v0.7.0

Deprecated

Added

  • AccessKeys API for parsing and rendering labels with access keys (syntax: & defines the following character as the access key, && inserts one literal ampersand)
    • AccessKeys.escape(label) escapes ampersands by doubling them
    • AccessKeys.unescape(label) unescapes ampersands by removing one of each pair
    • AccessKeys.has(label) returns whether the label has an access key
    • AccessKeys.get(label) returns the access key character, or null if there isn't one
    • AccessKeys.remove(label) returns plain text without access key indicator, like AccessKeys.toText() but with a special case to remove parentheticals such as " (&N)" rather than just the ampersand
    • AccessKeys.toText(label) returns plain text without access key syntax
    • AccessKeys.toHTML(label) returns HTML with <span class="menu-hotkey"> around the access key (uses AccessKeys.toFragment for security)
    • AccessKeys.toFragment(label) returns a DocumentFragment with <span class="menu-hotkey"> wrapping the access key character
    • private AccessKeys.indexOf(label) (don't use this)
    • (In the future, the CSS class "menu-hotkey" may be renamed to "access-key", perhaps with a prefix.)
  • Radio menu item support
    • In menu item lists, you can create radio groups by including an object with radioItems, getValue, setValue, and optionally ariaLabel properties.
      • radioItems is an array of menu item specifications, which can also include value for the option value.
    • (Commits: 1, 2, 3, 4)
  • TypeScript types for the whole library
    • Type declarations are included as part of the os-gui package, in os-gui.d.ts
    • You may need to reference the declarations file explicitly in your tsconfig.json's include or files array, or use a /// <reference path="node_modules/os-gui/os-gui.d.ts" /> directive. I'm not sure how exactly this is supposed to work.
  • $Window methods:
    • experimental onFocus, onBlur, and onClosed API for events (looking to remove dependency on jQuery)
    • private addChildWindow($window) (don't use this)
    • private unminimize() (don't use this)
  • $Window properties:
    • closed: Whether the window has been closed.
    • icons: The icons of the window at different sizes, as set by options.icons or setIcons().
    • $minimize: the minimize button
    • $maximize: the maximize button
    • private $title_area (don't use this)
    • private $icon (don't use this)
  • $Window property element (already mentioned but now has a section like other properties)
  • Menu item specification properties:
    • shortcutLabel for defining the label of the shortcut key combination separately from the ariaKeyShortcuts property; this replaces the old shortcut property
    • ariaKeyShortcuts for defining the access key combination for the menu item. Must follow aria-keyshortcuts syntax.
    • label for defining the label of the menu item; this replaces the old item property
    • value (only for radio items) for defining a radio option value
  • Docs for positioning windows

Changed

Fixed

see Changed