wintercms / winter

Free, open-source, self-hosted CMS platform based on the Laravel PHP Framework.
https://wintercms.com
MIT License
1.38k stars 193 forks source link

Add support for InputGroups #906

Closed LukeTowers closed 1 year ago

LukeTowers commented 1 year ago

About

There has been some interest expressed in adding support for "prefix / suffix" functionality in backend forms. This issue will act as the design document for the proposed functionality and discussion hub for any comments on the feature.

Potential Use Cases

Terminology

Desired Functionality

Option 1: Add support for related properties to a preselected list of existing fields:

We would add new properties / options to number & text field types, potentially use the functionality to also improve the email field.

The properties would be the TO BE DEFINED

Option 2: New InputGroup FormWidget

Provide a new InputGroup FormWidget that would allow

Existing Examples in the wild:

Current Uses in Winter CMS

The following FormWidgets in Winter already use similar UI features. It is not necessarily important to design this functionality to replace the implementations of these FormWidgets, as we want to design something that can be used for the 80% use case with people continuing to use custom FormWidgets for the 20% use case that is significantly more complex (which covers the majority of the following examples).

ColorPicker

Leading Add-on w/ interactive state, live preview of the selected colour. Popup picker triggered by focus on input element.

Screenshot 2023-05-17 at 10 32 48 AM

DatePicker

Trailing Inline Icon on both input fields, indicates which input is for which part of the date / time data. Popup picker triggered by focus on input element.

Screenshot 2023-05-17 at 10 33 28 AM

FileUpload

Trailing Add-on Button Icon, used to trigger the native fileupload dialog.

Screenshot 2023-05-17 at 10 33 55 AM

IconPicker

Leading Add-on w/ interactive state, live preview of the selected icon. Popup picker triggered by focus on input element.

Screenshot 2023-05-17 at 10 35 26 AM

MediaFinder

Trailing Add-on Button Icon, used to trigger the native fileupload dialog

Screenshot 2023-05-17 at 10 36 30 AM

RecordFinder

Trailing Add-on Button Icon, used to trigger the popup picker.

Screenshot 2023-05-17 at 10 37 18 AM

Sensitive

Trailing Add-on Button Icon w/ interactive state, used to trigger toggling the visibility of the sensitive value.

Screenshot 2023-05-17 at 10 46 02 AM Screenshot 2023-05-17 at 10 46 16 AM
github-actions[bot] commented 1 year ago

This issue will be closed and archived in 3 days, as there has been no activity in this issue for the last 6 months. If this issue is still relevant or you would like to see it actioned, please respond within 3 days. If this issue is critical for your business, please reach out to us at wintercms@luketowers.ca.