Skip to content
This repository has been archived by the owner on Apr 18, 2021. It is now read-only.

Add properties editor #8

Open
zastrowm opened this issue Feb 22, 2020 · 0 comments
Open

Add properties editor #8

zastrowm opened this issue Feb 22, 2020 · 0 comments
Labels
~feature New feature or request
Milestone

Comments

@zastrowm
Copy link
Owner

zastrowm commented Feb 22, 2020

I, as a user, would like to be able to change the properties of controls so that I can customize controls to fit my needs.

We should be able to adjust things like:

  • the text of the control
  • the color of the control
  • how the control is aligned (e.g. from the left, from the right)

Eventually these are things that would be nice to have as well:

  • The ability to specify what happens when I click a button
  • The ability to set the color/style of controls
  • The ability to change what the controls are bound to
    • e.g. dynamic updates

Current Plan

  • A property descriptor provides a list of properties for a specific type of control
  • The property panel is simply a list of names to editable controls; all of the properties that are editable for the currently active control
  • Each property provides the control that can edit it - this control is what's shown in the property panel
    • This allows the property panel to remain agnostic of how the properties are implemented
    • Eventually, we should expose more rich controls; for example, for text-alignment and other text related properties, instead of the grid of controls, we could expose more of the traditional buttons/rich-text controls like a button for bolding/italicizing/alignment. This is more of an eventual stretch goal than required for MVP
  • Some controls need to have the concept of a "debounce"; we shouldn't always be updating all of the properties instantly - we need to take into account if the properties are being sent across the network.
    • this may be more of a concern for runtime-editing than design-time

Binding

Eventually we'll need a plan for binding. At the moment we could envision two types of binding:

  1. Each property independently boundable
    • Ideal for when you have the concept of "variables" or "expression" for computing something
    • Also ideal for one-of bindings
  2. A binding "context" where multiple properties are bound at runtime, depending on what's provided
    • Ideal for when something else can specify multiple properties (e.g. a spreadsheet cell) that can be adjusted at runtime. It would be a PITA to do (1) for each property that you want to bind, but perhaps if we provide a convenient way to start the properties bound, it would be acceptable.

We will probably implement (1) initially and potentially implement (2) as an app-specific thing. The important thing about (2) is that we expose a way to indicate the properties are overridden/sourced from elsewhere.

@zastrowm zastrowm added the ~feature New feature or request label Feb 22, 2020
@zastrowm zastrowm added this to the MVP milestone Feb 22, 2020
zastrowm added a commit that referenced this issue Feb 24, 2020
Lays the infrastructure for #8 and puts effort towards #9
zastrowm added a commit that referenced this issue Feb 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
~feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant