equinor / mad

Experimental monorepo for the Mobile Application Delivery team
https://equinor.github.io/mad/
MIT License
8 stars 2 forks source link

Improving the WorkOrder Cell in mad-dfw #488

Open Chibuzor-Nwemambu opened 6 months ago

Chibuzor-Nwemambu commented 6 months ago

Package / App

MAD DFW

Description

In order to fully utilise the WorkOrder Cell in WO app, we would need additional two fields which should be optional:

State - which returns a string/JSX.Element Property from filter - which returns a string/JSX.Element/number

Also i need the propertyrow to continue on a new line for cases, like on web, where the text is longer than the screen width

Alternatives

No response

Other info

Current custom workorder cell in the app, looks like this: Screenshot 2024-04-12 at 11 28 56 Screenshot 2024-04-12 at 11 29 27

It would be nice to have something similar that accommodates the extra props.

HaakonSvane commented 6 months ago

What is the idea behind the state prop? The filtering prop assumes that the cell is filtered somewhere else in the app that implements it. For any app-specific fields like this, would it be better to maybe provide a additionalProperties prop that takes in a list of property row props that will be added to the bottom of the properties in the cell?

Sandtory commented 6 months ago

@HaakonSvane I somewhat agree as the status prop that is already implemented covers the state, and that most of the functionality for the propertyfromfilter is made outside of the component so could maybe just do that and add an ´additionalProperties´ that renders one or multiple empty property rows with custom title and value.

These changes was done to mimic the functionality in the workorders app ´PlannedScreen´