Preamble
The design paradigm that we've been following for the development of the default component is to let editors consume content through the progressive disclosure of information. That means that for every node of information, they can be expanded it into what we call "expert mode". This let editors go deeper in the inspection (and understanding) of Wikifunctions content. We currently have designed atomic elements for string, reference, and monolingual text properties.
The purpose of this task is to define a collapsed and expanded view for function call in objects. In the screenshot below, an expanded (expert) view of a function call example.
Design proposal
TBD
Previous design proposal
Figma file https://www.figma.com/file/91gKZAkb0NYYPYg9XXCHRW/T323693?node-id=52%3A10139&t=8aMqsloaPOq5P7Ns-1
After an internal consultation, we opted for displaying the function name, and the function arguments in the collapsed view as:
- function icon +
- function name +
- function arguments
Additional scenarios
If multiple arguments are available, we will display all arguments (for now!)
Additional notes
In terms of styles, semantic colors are selected as the following:
- Labels and icon fill set to color-subtle / #54595d
- Punctuation as parenthesis, commas, etc. set to color-subtle / #54595d
- Strings, and literals set to color-base / #202122
- References, and links set to color-progressive / #36c
While we wait to submit a 'function' icon to codex we can use cdxIconCode or cdxIconMathematics in the meantime.