Skip to content

Break down CustomTableCell in two components and remove `usedIn` prop

Loic Huder requested to merge refactor-edit-cell into main

Again, probably better reviewed in separate commits.

The first breaks down CustomTableCell in two components: it does not yield immediate gain but allows to see more clearly the different usages of the ex-CustomTableCell.

This allows notably to better adapt props to the actual use and laid the groundwork for the second commit that removes the usedIn prop.

The usedIn prop was used to

  1. check for invalidity of the field
  2. check if boolean and number inputs should be used for the field value
  3. Conditionally set the width for the field name.

This was solved by

  1. checking the invalidity in the caller
  2. adding a allowBoolAndNumberInput prop to ValueTableCell
  3. add a width prop to NameTableCell

I expect to be able to remove width and allowBoolAndNumberInput in the future by reworking the abstractions but let's not jump the gun.

Edited by Loic Huder

Merge request reports