Skip to content

Commit

Permalink
feat: add documentation for filepicker element (#4520)
Browse files Browse the repository at this point in the history
* feat: add documentation for filepicker element

* fix: fix form-js library icon images

* style(formatting): minor grammatical tweaks

* fix: fix form-js library icon images on versioned docs

---------

Co-authored-by: christinaausley <84338309+christinaausley@users.noreply.github.com>
Co-authored-by: Mark Sellings <mark.sellings@camunda.com>
  • Loading branch information
3 people authored Nov 11, 2024
1 parent 6f7f273 commit 261edb9
Show file tree
Hide file tree
Showing 109 changed files with 135 additions and 105 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to trigger form actions

A button allowing the user to trigger form actions.

![Form Button Symbol](/img/form-icons/form-button.svg)
<img src="/img/form-icons/form-button.svg" alt="Form Button Symbol" />

### Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to select multiple values from set options

A set of checkbox options providing data multi-selection for small datasets.

![Form Checklist Symbol](/img/form-icons/form-checklist.svg)
<img src="/img/form-icons/form-checkbox.svg" alt="Form Checkbox Symbol" />

### Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to read and edit boolean data

A checkbox allowing the user to read and edit boolean data.

![Form Checkbox Symbol](/img/form-icons/form-checkbox.svg)
<img src="/img/form-icons/form-checkbox.svg" alt="Form Checkbox Symbol" />

### Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Learn about the datetime form element to read and edit date and tim

A component allowing the user to read and edit date and time data.

![Form Datetime Symbol](/img/form-icons/form-datetime.svg)
<img src="/img/form-icons/form-datetime.svg" alt="Form Datetime Symbol" />

## Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Learn about the dynamic list form element to dynamically manage a l

The **dynamic list** element is designed to dynamically manage a list of form elements. It enables users to add or remove items from the list and is particularly useful in scenarios where the number of items in a list is not fixed.

![Dynamic List Symbol](/img/form-icons/form-dynamiclist.svg)
<img src="/img/form-icons/form-dynamiclist.svg" alt="Dynamic List Symbol" />

## Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to compute form state

An expression field allowing the user to compute new data based on form state.

![Form Expression Field Symbol](/img/form-icons/form-expression.svg)
<img src="/img/form-icons/form-expression.svg" alt="Form Expression Field Symbol" />

### Configurable properties

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
id: forms-element-library-filepicker
title: Filepicker
description: A form element to select files
---

A form element to select files.

<img src="/img/form-icons/form-filepicker.svg" alt="Form Filepicker Symbol" />

### Configurable properties

- **Field label**: Label displayed on top of the file picker. Can either be an [expression](../../feel/language-guide/feel-expressions-introduction.md), plain text, or [templating syntax](../configuration/forms-config-templating-syntax.md).
- **Supported file formats**: [Comma-separated list of supported file formats.](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers) Can either be an [expression](../../feel/language-guide/feel-expressions-introduction.md) or plain text.
- **Upload multiple files**: Allows the user to upload multiple files at once. Can be dynamically set using an [expression](../../feel/language-guide/feel-expressions-introduction.md).
- **Key**: Binds the field to a form variable, refer to the [data binding documentation](../configuration/forms-config-data-binding.md).
- **Read only**: Makes the file picker read-only, meaning the user can't change but only read its state. Can be dynamically set using an [expression](../../feel/language-guide/feel-expressions-introduction.md).
- **Disabled**: Disables the file picker, for use during development.
- **Hide if**: [Expression](../../feel/language-guide/feel-expressions-introduction.md) to hide the file picker.
- **Columns**: Space the field will use inside its row. **Auto** means it will automatically adjust to available space in the row. Read more about the underlying grid layout in the [Carbon Grid documentation](https://carbondesignsystem.com/guidelines/2x-grid/overview).
- **Validation**: Given that one of the following properties is set, the form will only submit when the respective condition is fulfilled. Otherwise, a validation error will be displayed.
- **Required**: File picker must have a selected file.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Learn about the group form element to group multiple form elements

The group element serves as a container to group various form elements together. It allows for nesting of fields and assists in organizing complex forms.

![Form Group Symbol](/img/form-icons/form-group.svg)
<img src="/img/form-icons/form-group.svg" alt="Form Group Symbol" />

### Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to display HTML content.

A flexible display component designed to quickly render HTML content for the user.

![Form HTML Symbol](/img/form-icons/form-html.svg)
<img src="/img/form-icons/form-html.svg" alt="Form HTML Symbol" />

## Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Every iframe component is a sandbox. This means that the content of the iframe i

:::

![Form iframe Symbol](/img/form-icons/form-iframe.svg)
<img src="/img/form-icons/form-iframe.svg" alt="Form iframe Symbol" />

## Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Learn about the image view form element to display an image.

An element allowing the user to display images.

![Form Image Symbol](/img/form-icons/form-image.svg)
<img src="/img/form-icons/form-image.svg" alt="Form Image Symbol" />

## Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to read and edit numeric data

A number field allowing the user to read and edit numeric data.

![Form Number Symbol](/img/form-icons/form-number.svg)
<img src="/img/form-icons/form-number.svg" alt="Form Number Symbol" />

### Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to select a value from set options

A radio group allowing the user to select one of multiple data options for small datasets.

![Form Radio Symbol](/img/form-icons/form-radio.svg)
<img src="/img/form-icons/form-radio.svg" alt="Form Radio Symbol" />

### Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to select a value from set options

A Select dropdown allowing the user to select one of multiple data option from larger datasets.

![Form Select Symbol](/img/form-icons/form-select.svg)
<img src="/img/form-icons/form-select.svg" alt="Form Select Symbol" />

### Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Learn about this layout element to add a visual separation between

A **separator** element is used to create a visual separation between two elements.

![Form Spacer Symbol](/img/form-icons/form-separator.svg)
<img src="/img/form-icons/form-separator.svg" alt="Form Separator Symbol" />

## Usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Learn about this layout element to add vertical space between eleme

A **spacer** element is used to create a defined amount of vertical space between two elements.

![Form Spacer Symbol](/img/form-icons/form-spacer.svg)
<img src="/img/form-icons/form-spacer.svg" alt="Form Spacer Symbol" />

## Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Learn about the table form element to render tabular data.

This is an element allowing the user to render tabular data.

![Form table Symbol](/img/form-icons/form-table.svg)
<img src="/img/form-icons/form-table.svg" alt="Form Table Symbol" />

## Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to select multiple values from set options

A complex and searchable tag based component providing multi-selection for large datasets.

![Form Taglist Symbol](/img/form-icons/form-taglist.svg)
<img src="/img/form-icons/form-taglist.svg" alt="Form Taglist Symbol" />

### Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to display simple Markdown-powered text.

A Markdown-powered text component allowing to display simple information to the user.

![Form Text Symbol](/img/form-icons/form-text.svg)
<img src="/img/form-icons/form-text.svg" alt="Form Text Symbol" />

## Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Learn about the text area form element to read and edit multiline t

A text area allowing the user to read and edit multiline textual data.

![Form Textarea Symbol](/img/form-icons/form-textArea.svg)
<img src="/img/form-icons/form-textArea.svg" alt="Form Textarea Symbol" />

## Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to read and edit textual data

A text field allowing the user to read and edit textual data.

![Form Text Field Symbol](/img/form-icons/form-textField.svg)
<img src="/img/form-icons/form-textField.svg" alt="Form Text Field Symbol" />

### Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ The following form elements are currently available within Camunda Forms:
<td>Compute intermediary data</td>
</tr>

<tr>
<td><img src="/img/form-icons/form-filepicker.svg" alt="Filepicker Symbol" height="60"></img></td>
<td><a href="../forms-element-library-filepicker">Filepicker</a></td>
<td>Select files</td>
</tr>

<tr>
<td><img src="/img/form-icons/form-image.svg" alt="Image Symbol" height="60"></img></td>
<td><a href="../forms-element-library-image">Image view</a></td>
Expand Down
1 change: 1 addition & 0 deletions docs/components/modeler/forms/sidebar-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module.exports = {
lib_dir + "forms-element-library-iframe",
lib_dir + "forms-element-library-table",
lib_dir + "forms-element-library-expression",
lib_dir + "forms-element-library-filepicker",
lib_dir + "forms-element-library-image",
lib_dir + "forms-element-library-spacer",
lib_dir + "forms-element-library-separator",
Expand Down
1 change: 1 addition & 0 deletions static/img/form-icons/form-filepicker.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion static/img/form-icons/form-table.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to trigger form actions

A button allowing the user to trigger form actions.

![Form Button Symbol](/img/form-icons/form-button.svg)
<img src="/img/form-icons/form-button.svg" alt="Form Button Symbol" />

### Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to read and edit boolean data

A checkbox allowing the user to read and edit boolean data.

![Form Checkbox Symbol](/img/form-icons/form-checkbox.svg)
<img src="/img/form-icons/form-checkbox.svg" alt="Form Checkbox Symbol" />

### Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to select multiple values from set options

A set of checkboxes providing data multi-selection for small datasets.

![Form Checklist Symbol](/img/form-icons/form-checklist.svg)
<img src="/img/form-icons/form-checkbox.svg" alt="Form Checkbox Symbol" />

### Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Learn about the datetime form element to read and edit date and tim

A component allowing the user to read and edit date and time data.

![Form Datetime Symbol](/img/form-icons/form-datetime.svg)
<img src="/img/form-icons/form-datetime.svg" alt="Form Datetime Symbol" />

## Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Learn about the image view form element to display an image.

An element allowing the user to display images.

![Form Image Symbol](/img/form-icons/form-image.svg)
<img src="/img/form-icons/form-image.svg" alt="Form Image Symbol" />

## Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to read and edit numeric data

A number field allowing the user to read and edit numeric data.

![Form Number Symbol](/img/form-icons/form-number.svg)
<img src="/img/form-icons/form-number.svg" alt="Form Number Symbol" />

### Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to select a value from set options

A radio button allowing the user to select one of multiple data option for small datasets.

![Form Radio Symbol](/img/form-icons/form-radio.svg)
<img src="/img/form-icons/form-radio.svg" alt="Form Radio Symbol" />

### Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to select a value from set options

A Select dropdown allowing the user to select one of multiple data option from larger datasets.

![Form Select Symbol](/img/form-icons/form-select.svg)
<img src="/img/form-icons/form-select.svg" alt="Form Select Symbol" />

### Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to select multiple values from set options

A complex and searchable tag based component providing multi-selection for large datasets.

![Form Taglist Symbol](/img/form-icons/form-taglist.svg)
<img src="/img/form-icons/form-taglist.svg" alt="Form Taglist Symbol" />

### Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to display static information.

A text component allowing to display static information to the user.

![Form Text Symbol](/img/form-icons/form-text.svg)
<img src="/img/form-icons/form-text.svg" alt="Form Text Symbol" />

## Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Learn about the text area form element to read and edit multiline t

A text area allowing the user to read and edit multiline textual data.

![Form Textarea Symbol](/img/form-icons/form-textArea.svg)
<img src="/img/form-icons/form-textArea.svg" alt="Form Textarea Symbol" />

## Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to read and edit textual data

A text field allowing the user to read and edit textual data.

![Form Text Field Symbol](/img/form-icons/form-textField.svg)
<img src="/img/form-icons/form-textField.svg" alt="Form Text Field Symbol" />

### Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to trigger form actions

A button allowing the user to trigger form actions.

![Form Button Symbol](/img/form-icons/form-button.svg)
<img src="/img/form-icons/form-button.svg" alt="Form Button Symbol" />

### Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to read and edit boolean data

A checkbox allowing the user to read and edit boolean data.

![Form Checkbox Symbol](/img/form-icons/form-checkbox.svg)
<img src="/img/form-icons/form-checkbox.svg" alt="Form Checkbox Symbol" />

### Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: A form element to select multiple values from set options

A set of checkboxes providing data multi-selection for small datasets.

![Form Checklist Symbol](/img/form-icons/form-checklist.svg)
<img src="/img/form-icons/form-checkbox.svg" alt="Form Checkbox Symbol" />

### Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Learn about the datetime form element to read and edit date and tim

A component allowing the user to read and edit date and time data.

![Form Datetime Symbol](/img/form-icons/form-datetime.svg)
<img src="/img/form-icons/form-datetime.svg" alt="Form Datetime Symbol" />

## Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Learn about the group form element to group multiple form elements

The group element serves as a container to group various form elements together. It allows for nesting of fields and assists in organizing complex forms.

![Form Group Symbol](/img/form-icons/form-group.svg)
<img src="/img/form-icons/form-group.svg" alt="Form Group Symbol" />

### Configurable properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Learn about the image view form element to display an image.

An element allowing the user to display images.

![Form Image Symbol](/img/form-icons/form-image.svg)
<img src="/img/form-icons/form-image.svg" alt="Form Image Symbol" />

## Configurable properties

Expand Down
Loading

0 comments on commit 261edb9

Please sign in to comment.