Open dandclark opened 4 years ago
I agree. The table example doesn't fall under that definition of a control, so it seems there's at least a couple of types of elements open UI is interested in:
Terms I see used in the site:
Are these all the same thing? Are they different? We should define and consolidate on usage.
One I didn't see but has historic usage:
It is important to note that Open UI is not solely about controls although I do like creating a definition for a control. Looking at WHATWG this doesn't seem to be define their either. I think Widget is an overloaded term however in that it encapsulates both components and controls. We use the term component through the charter and contribution docs and likewise a component can technically be a control or contain controls as well. So I like defining both of them. What about:
Components
A component is an encapsulation of one or more concepts that fulfills a specific task within an application. A component may contain other components, these are referred to as composite components. This allows the consumer of the component to leverage the functionality that the component provides without needing to re-create the entire component.
Controls
Controls are a specific type of component that allow for end user input to facilitate an action based on that input.
I was just speaking with Bo, and I think in addition we should probably try to define the model overall of a control in addition to just the definition of a control (which I know you're looking into @dandclark). For example, parts have a special meaning to the control and more important to how they are handled by the "controller" code and modify the state of the control's model.
Updated proposal: A control is a UI component that manages user interaction. The control has controller code that manages changes in its state and its model based on user interaction with its parts.
This was discussed on a call between the CSSWG & Open UI and there was a desire to re-discuss this. As such I've pasted the latest thinking above and reopening this issue.
I think it would be more accessible to define this term without using MVC terminology. I also think it would be possible to take the word "component", and still be clear. How about something like:
A control is a piece of user interface that manages user interaction, including changes to its own state and data.
or even
A control is a piece of user interface that manages changes to its own state and data.
https://www.iso.org/obp/ui/#iso:std:iso-iec:2382:ed-1:v1:en even ISO doesn't dare define the terms 'control' & 'component', albeit they do define quite a few related/relatable terms.
There hasn't been any discussion on this issue for a while, so we're marking it as stale. If you choose to kick off the discussion again, we'll remove the 'stale' label.
Not stale really, this is currently actively being discussed in the discord in a way
There hasn't been any discussion on this issue for a while, so we're marking it as stale. If you choose to kick off the discussion again, we'll remove the 'stale' label.
Would it be useful to include a more-or-less formal definition of a "control" somewhere in the docs? The select Editor's Draft uses the term but I'm not sure whether there's actually a formal definition. If nothing else this could help clarify the Charter regarding which kinds of widgets fall under the purview of OpenUI.
One way to attempt a definition would be to describe what a control does, e.g.:
A control is an HTMLElement with these properties:
value
property. Firesinput
andchange
events corresponding to changes in the control'svalue
.*value
(validity
,validationMessage
,willValidate
,checkValidity()
,reportValidity()
, theinvalid
event, and others that are specific to particular control types).<form>
s and form submission.* Partial exception:
<input type=”button”>
and<input type=”submit”>
don’t fireinput
/change
events and their value cannot be changed by user interaction, only viewed (as button text).