# Feature DREAM-227 - Form input: introduce a smaller input size for date/time

Project: Stream Design System
Status: closed
URL: https://community.openproject.org/work_packages/DREAM-227

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | 16.0.0 |
| Sprint |  |
| Backlog bucket |  |
| Votes |  |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_No work packages_

## Use cases

_No work packages_

## Features and Chunks

_No work packages_

## Bugs and other work packages

_No work packages_

## Technical Details

| Attribute | Value |
| --- | --- |
| Module |  |
| Feature Flag |  |
| Requires doc change | No |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Feature Lead |  |
| Developers | Henriette Darge |
| Designer | Parimal Satyal |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work |  |
| Labor costs |  |

## Description

**Context**

The current implementation of forms in OpenProject allows us to specify various widths for inputs. Currently, the options are:

``` ruby
    input_width: :auto => width: auto
    input_width: :small => max-width: min(256px, 100vw - 2rem)
    input_width: :medium => max-width: min(320px, 100vw - 2rem)
    input_width: :large => max-width: min(480px, 100vw - 2rem)
    input_width: :xlarge => max-width: min(640px, 100vw - 2rem)
    input_width: :xxlarge => max-width: min(960px, 100vw - 2rem)
```

Sometimes, however, `small` isn't small enough. This is particularly apparent when we have date or time fields in a single line. For example:

<img class="image_resized op-uc-image op-uc-image_inline" style="width:491px;" src="/api/v3/attachments/328790/content">

**Acceptance criteria**

  - Introduce an even smaller variety, perhaps called :xsmall, to fit formats like dates and time.
    
      - Use 144px as width
    
      - The trailing units might not work (because it'll take 25% of the width of the input).

  - Update `xlarge` from 640px to 680px to match the width of the wrapper introduced here: <mention class="mention" data-id="61755" data-type="work_package" data-text="##61755">##61755</mention>

**Hint for QA**

This can currently only be tested in the lookbook, eg. <https://qa.openproject-edge.com/lookbook/inspect/primer/forms/custom_width_fields_form> 

**To do**

- [ ] Finalise specs 
- [ ] Update Primer component
- [ ] Update [Lookbook docs](https://qa.openproject-edge.com/lookbook/pages/patterns/forms)
- [ ] Review existing date and time inputs and replace where necessary.
