You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2.3 KiB

FIXME

  • Figure out a way to make this automatically load the correct PostCSS plugins, when used with icssify (since we probably don't want to pre-compile the CSS?)
  • Sort out naming consistency for a) control names and b) classification of related elements (as their own controls? like for MenuItem, which is currently a part of Menu)
  • Move radius etc. to the theme
  • Shared 'stretchable' class that can be composed by all elements which can be height:100%'d in something like a ribbon
    • Make this a fixed-name export rather than an auto-generated class name, to make it work across different versions of the library in the future? Maybe also do this for other 'marker classes'?
  • Generic "focus" state abstraction, reusable between menus, dropdowns, etc. so that all 'ephemeral controls' behave like one would expect from a native application
  • Add React to peerDependencies

Name ideas

  • SnapUI (snap-ui)

Feature ideas

  • SetIconSource wrapper, like SetTheme, for providing a custom Icon component (eg. when using an icon font instead of images), and some way to have icon fallbacks
  • _$override suffix for theme class names, that disables the default themeing when used?
  • Mark ribbon boxes as 'collapsible' to have them disappear into the overflow menu first, when not all boxes fit onto the screen (it's not always the boxes at the end that are the least important)
  • Some sort of shared argument-processing abstraction for components, which takes custom validation rules and handles stuff like grid item style generation as a pre-processing step

Context design rules

  • Global contexts named normally; control-specific contexts should be $control_$name, like with custom themeing rules
    • Event handler contexts: $control_on$Event
      • A control with interceptable event handler should always require a unique ID (either implicit or explicit) when interception is used; this is passed as the first argument to the event handler
      • Any same-named event handlers defined on the control directly should be called even if it is intercepted, since the user explicitly expressed that they want custom behaviour anyway
    • 'Selected item' contexts for eg. buttonsets: $control_selectedID
      • A selectable item should always wrap arbitrary content in a null selectedID context, to avoid passing this context beyond the first matching control