Skip to content

Conversation

@rylnd
Copy link
Contributor

@rylnd rylnd commented Dec 2, 2025

🚧 🚧

We were previously losing our type information when using the
getFields method; it now returns a properly typed map of FieldHooks asvalues.

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

Identify risks

Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

rylnd added 2 commits December 2, 2025 13:03
We were previously losing our type information when using the
`getFields` method; it now returns properly typed `FieldHook`s as
values.
@elasticmachine
Copy link
Contributor

elasticmachine commented Dec 2, 2025

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!
  • Click to trigger kibana-deploy-cloud-from-pr for this PR!

@rylnd
Copy link
Contributor Author

rylnd commented Dec 2, 2025

Building this to see how/what is going to light up now that these form lib usages are properly typed.

Previously, line 57 contained:

* A destructuring
* A type assertion
* A property access on the RHS _after_ the type assertion

I had missed the third part, which caused me to add those TODO comments.
This should now be fixed.
Since we assign arbitrary keys to the `fieldsRefs` ref, typescript is no
longer confident that every key used is `keyof T`. By using a Record
internally and then casting at API boundaries, we can sidestep this
concern.
@elasticmachine
Copy link
Contributor

elasticmachine commented Dec 3, 2025

💔 Build Failed

Failed CI Steps

History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants