Skip to content

Conversation

slax57
Copy link
Contributor

@slax57 slax57 commented Sep 15, 2025

Problem

EditGuesser assumes that every array is an array of objects. If we detect values that are scalar arrays, the guesser will use a TextInput, which is not correct.

Solution

Detect scalar arrays in introspection, and use:

  • TextArrayInput in EditGuesser
  • TextArrayField (a list of Chips in a Stack, to be invented) for ListGuesser and ShowGuesser

How To Test

Additional Checks

  • The PR targets master for a bugfix or a documentation fix, or next for a feature
  • The PR includes unit tests (if not possible, describe why)
  • The PR includes one or several stories (if not possible, describe why)
  • The documentation is up to date

Also, please make sure to read the contributing guidelines.

@slax57 slax57 changed the title Use TextArrayInput / TextArrayField in guessers for scalar arrays Introduce <TextArrayField> and use <TextArrayInput> / <TextArrayField> in guessers for scalar arrays Sep 16, 2025
@slax57 slax57 added RFR Ready For Review and removed WIP Work In Progress labels Sep 16, 2025
@Madeorsk Madeorsk self-requested a review September 16, 2025 14:41
Copy link
Contributor

@Madeorsk Madeorsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect ✨, I only have a tiny doc suggestion

@Madeorsk Madeorsk added this to the 5.12.0 milestone Sep 17, 2025
@Madeorsk Madeorsk merged commit 4d9fb1b into next Sep 17, 2025
2 checks passed
@Madeorsk Madeorsk deleted the editguesser-TextArrayInput branch September 17, 2025 07:31

The following props are available for `<TextArrayField>`:

| Prop | Type | Required | Description |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: the Required column is the second one in all prop tables, here it's the third. Also, we usually include a Default column.

Copy link
Contributor Author

@slax57 slax57 Sep 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay I'll change that on master
UPDATE: I mean on next

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done: d785636

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Development

Successfully merging this pull request may close these issues.

3 participants