# Feature DREAM-224 - Create component Status button based on Action menu

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

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | 15.4.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 |  |
| 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 meeting outcomes feature (mis)uses a Primer Figma component called 'StateLabel' to indicate meeting status: <mention class="mention" data-id="57799" data-type="work_package" data-text="##57799">##57799</mention>

However, this doesn't exist in the Rails version. The existing 'State' and 'Label' components are insufficiently flexible for use in Meetings. One solution is to create a new OP-Primer component to fill this need.

**Acceptance criteria**

  - Create an OP-Primer component called 'Status Button' consisting of:
    
      - Size:
        
          - Small
        
          - Medium
    
      - (optional) Leading icon of the selected option
    
      - State name
    
      - (optional) Dropdown icon

  - Individual statuses have:
    
      - a name
    
      - a background colour
    
      - (optional) Icon

  - ~~The list of statuses isn't described at component level. This has to be done at either at:~~
    
      - ~~A feature level for Meeting statuses (since these are fixed)~~
    
      - ~~An admin level for work packages statuses (since they can be customised)~~

  - If the component is a dropdown, clicking on it displays all available statuses and lets you switch between them
    
      - Certain options need to show a locked icon (locked statuses or ones that are not available)

**Open question**

  - If we extend the scope so we also have a 'size' option (medium and large), couldn't we possibly use the smaller one for Work package status eventually?

**Uses**

  - Meeting status

  - Work package status?

**To do**

- [x] Define component
- [x] Create Figma component
- [x] Finalise specs 
- [x] Write Lookbook docs
- [x] Implement component
- [x] Add code examples and technical notes to Lookbook
- [ ] Use component in the Meetings module (in <mention class="mention" data-id="57799" data-type="work_package" data-text="##57799">##57799</mention>)

**Figma component**

<https://www.figma.com/design/4M3DM3qjjtXFMzTmOzUlke/Primer-OP-(Internal)?node-id=100-106&t=Q4nnVUI4AsygXzab-4>

**Visual**

**Suggested implementation**

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

<br>

Current Primer implementation (without dropdown)

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