Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Streams] Schema Editor UX improvements #207066

Merged
merged 11 commits into from
Jan 23, 2025

Conversation

Kerry350
Copy link
Contributor

@Kerry350 Kerry350 commented Jan 17, 2025

Summary

Closes https://github.com/elastic/streams-program/issues/53

Overview of changes

Enhanced filters for status / type.

I omitted field parent (in designs) as this feels superfluous (can likely be facilitated via the inherited status).

Screenshot 2025-01-21 at 14 39 53

Children in the children affected callout are now linked

Screenshot 2025-01-21 at 14 40 23

ECS recommendations are given for type if available

Screenshot 2025-01-21 at 14 40 41

For format (with date type) some popular options are now provided in a select. It's not exhaustive as there are a lot of format options. A toggle to switch to a freeform mode is provided.

Screenshot 2025-01-21 at 14 41 10

Screenshot 2025-01-21 at 14 41 20

Data Grid toolbar is added

Screenshot 2025-01-21 at 14 41 42

Field parent link in badges is now more obvious

Screenshot 2025-01-21 at 14 41 56

The only thing I haven't added from the nice to haves was the refresh button, I think we should wait to see if we actually need this (as it's technically a refresh of two entities - the definition and the unmapped fields).

@Kerry350 Kerry350 self-assigned this Jan 17, 2025
@Kerry350 Kerry350 force-pushed the 53-schema-editor-ux-improvements branch from 65d2eb3 to 8142922 Compare January 20, 2025 14:37
@Kerry350 Kerry350 force-pushed the 53-schema-editor-ux-improvements branch from 8142922 to 3d71540 Compare January 21, 2025 13:17
@Kerry350 Kerry350 added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 backport:version Backport to applied version labels v8.18.0 Feature:Streams This is the label for the Streams Project labels Jan 21, 2025
@Kerry350 Kerry350 force-pushed the 53-schema-editor-ux-improvements branch from 362e72b to 65f0831 Compare January 22, 2025 09:44
@Kerry350 Kerry350 marked this pull request as ready for review January 22, 2025 10:22
@Kerry350 Kerry350 requested a review from a team as a code owner January 22, 2025 10:22
},
} = useKibana();

const { fieldsMetadata, loading } = useFieldsMetadata({
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Nice usage of the fieldsMetadata service, what if when a field matches and we have a suggested type, we prefill it in the selector? It's a minor change but would skip this extra step to the user.
Screenshot 2025-01-22 at 12 10 19

Copy link
Contributor Author

@Kerry350 Kerry350 Jan 22, 2025

Choose a reason for hiding this comment

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

I've added this. It's not a completely simple change as it's not as easy as just setting a fallback select value as that also needs to be propagated to the editing state, otherwise the user would need to perform the selection again themself.

I've popped that in a useEffect, it could possibly be hoisted all the way up to the main editing hook, but whilst that co-locates it with some other state, it doesn't really take away from the side effect nature.

This starts to +1 https://github.com/elastic/streams-program/issues/102

As we start to do smarter things with date formats this will be another plus one to the above as the state for that (to generate recommendations etc) will also increase in complexity.

Comment on lines +58 to +60
if (!e.target.checked && !isPopularFormat(props.nextFieldFormat)) {
props.setNextFieldFormat(undefined);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

note: the other way around shouldn't we clear the input once the user switch to freeform? So they immediately get the placeholder indicating which kind of freedom they have with the example, it currently keep the current format as a text.

Non-blocking comment, as this is mostly a consideration on the UX

Copy link
Contributor Author

@Kerry350 Kerry350 Jan 22, 2025

Choose a reason for hiding this comment

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

Yeah, considered both options here. My thinking was that by keeping it it may set the user up to just amend one of the "popular formats" (if you look at the full list of built in formats they're often just very similar derivatives).

Could see arguments either way, so will defer to @patpscal 😁

@Kerry350
Copy link
Contributor Author

@tonyghiani Thanks for the review!

I've responded to everything bar the small UX question r.e. feeform mode.

One side note, there is an edge case where technically you could get an ECS recommendation but we don't support the type in Streams themselves (we support a subset of types right now). In that case it won't try to set the recommendation automatically. UX wise we might need to have separate wording for "this is the recommendation but it is unsupported by streams" or maybe we just hide it altogether if unsupported (but not unknown). Anyway, I've left it as is for now, but we can refine if needed.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
streamsApp 282 289 +7

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
streamsApp 275.2KB 280.1KB +4.9KB

History

cc @Kerry350

Copy link
Contributor

@tonyghiani tonyghiani left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for applying these changes!

@Kerry350 Kerry350 merged commit 8832cc4 into elastic:main Jan 23, 2025
9 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12926963782

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 23, 2025
## Summary

Closes elastic/streams-program#53

## Overview of changes

Enhanced filters for status / type.

I omitted field parent (in designs) as this feels superfluous (can
likely be facilitated via the inherited status).

![Screenshot 2025-01-21 at 14 39
53](https://github.com/user-attachments/assets/4ea43477-0fb7-4f29-9522-d2fabfd653a3)

Children in the children affected callout are now linked

![Screenshot 2025-01-21 at 14 40
23](https://github.com/user-attachments/assets/0ce040c0-f6fc-479c-8941-25a493f1349a)

ECS recommendations are given for type if available

![Screenshot 2025-01-21 at 14 40
41](https://github.com/user-attachments/assets/ab47f839-8a59-47af-898d-f7eb93de3107)

For format (with date type) some popular options are now provided in a
select. It's not exhaustive as there are **a lot** of format options. A
toggle to switch to a freeform mode is provided.

![Screenshot 2025-01-21 at 14 41
10](https://github.com/user-attachments/assets/f89a9c14-d711-495d-a6df-54288d12592b)

![Screenshot 2025-01-21 at 14 41
20](https://github.com/user-attachments/assets/078733bd-dc19-435f-a10a-271723ab2c9f)

Data Grid toolbar is added

![Screenshot 2025-01-21 at 14 41
42](https://github.com/user-attachments/assets/f234b965-9d90-452c-b0e5-8f918bc85756)

Field parent link in badges is now more obvious

![Screenshot 2025-01-21 at 14 41
56](https://github.com/user-attachments/assets/001ed451-7930-48da-beba-95865b79a0bd)

The only thing I haven't added from the nice to haves was the refresh
button, I think we should wait to see if we actually need this (as it's
technically a refresh of two entities - the definition and the unmapped
fields).

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 8832cc4)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@flash1293
Copy link
Contributor

@Kerry350

I think we should wait to see if we actually need this (as it's technically a refresh of two entities - the definition and the unmapped fields)

Could we create a follow-up issue for this? I think it would be really helpful to have this, I've found myself sitting on the schema editor page and waiting for docs to come in to make certain fields show up on the list. Together with the fact that the unmapped field list is not 100% reliable because it relies on sampling I think it's an important feature.

kibanamachine added a commit that referenced this pull request Jan 23, 2025
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Streams] Schema Editor UX improvements
(#207066)](#207066)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Kerry
Gallagher","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-23T10:14:12Z","message":"[Streams]
Schema Editor UX improvements (#207066)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/streams-program/issues/53\r\n\r\n## Overview
of changes\r\n\r\nEnhanced filters for status / type. \r\n\r\nI omitted
field parent (in designs) as this feels superfluous (can\r\nlikely be
facilitated via the inherited status).\r\n \r\n![Screenshot 2025-01-21
at 14
39\r\n53](https://github.com/user-attachments/assets/4ea43477-0fb7-4f29-9522-d2fabfd653a3)\r\n\r\nChildren
in the children affected callout are now linked\r\n\r\n![Screenshot
2025-01-21 at 14
40\r\n23](https://github.com/user-attachments/assets/0ce040c0-f6fc-479c-8941-25a493f1349a)\r\n\r\nECS
recommendations are given for type if available\r\n\r\n![Screenshot
2025-01-21 at 14
40\r\n41](https://github.com/user-attachments/assets/ab47f839-8a59-47af-898d-f7eb93de3107)\r\n\r\nFor
format (with date type) some popular options are now provided in
a\r\nselect. It's not exhaustive as there are **a lot** of format
options. A\r\ntoggle to switch to a freeform mode is
provided.\r\n\r\n![Screenshot 2025-01-21 at 14
41\r\n10](https://github.com/user-attachments/assets/f89a9c14-d711-495d-a6df-54288d12592b)\r\n\r\n![Screenshot
2025-01-21 at 14
41\r\n20](https://github.com/user-attachments/assets/078733bd-dc19-435f-a10a-271723ab2c9f)\r\n\r\nData
Grid toolbar is added\r\n\r\n![Screenshot 2025-01-21 at 14
41\r\n42](https://github.com/user-attachments/assets/f234b965-9d90-452c-b0e5-8f918bc85756)\r\n\r\nField
parent link in badges is now more obvious\r\n\r\n![Screenshot 2025-01-21
at 14
41\r\n56](https://github.com/user-attachments/assets/001ed451-7930-48da-beba-95865b79a0bd)\r\n\r\nThe
only thing I haven't added from the nice to haves was the
refresh\r\nbutton, I think we should wait to see if we actually need
this (as it's\r\ntechnically a refresh of two entities - the definition
and the unmapped\r\nfields).\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"8832cc4289df403f2d690c19794e6c253b3c8d6b","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:version","v8.18.0","Feature:Streams"],"title":"[Streams]
Schema Editor UX
improvements","number":207066,"url":"https://github.com/elastic/kibana/pull/207066","mergeCommit":{"message":"[Streams]
Schema Editor UX improvements (#207066)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/streams-program/issues/53\r\n\r\n## Overview
of changes\r\n\r\nEnhanced filters for status / type. \r\n\r\nI omitted
field parent (in designs) as this feels superfluous (can\r\nlikely be
facilitated via the inherited status).\r\n \r\n![Screenshot 2025-01-21
at 14
39\r\n53](https://github.com/user-attachments/assets/4ea43477-0fb7-4f29-9522-d2fabfd653a3)\r\n\r\nChildren
in the children affected callout are now linked\r\n\r\n![Screenshot
2025-01-21 at 14
40\r\n23](https://github.com/user-attachments/assets/0ce040c0-f6fc-479c-8941-25a493f1349a)\r\n\r\nECS
recommendations are given for type if available\r\n\r\n![Screenshot
2025-01-21 at 14
40\r\n41](https://github.com/user-attachments/assets/ab47f839-8a59-47af-898d-f7eb93de3107)\r\n\r\nFor
format (with date type) some popular options are now provided in
a\r\nselect. It's not exhaustive as there are **a lot** of format
options. A\r\ntoggle to switch to a freeform mode is
provided.\r\n\r\n![Screenshot 2025-01-21 at 14
41\r\n10](https://github.com/user-attachments/assets/f89a9c14-d711-495d-a6df-54288d12592b)\r\n\r\n![Screenshot
2025-01-21 at 14
41\r\n20](https://github.com/user-attachments/assets/078733bd-dc19-435f-a10a-271723ab2c9f)\r\n\r\nData
Grid toolbar is added\r\n\r\n![Screenshot 2025-01-21 at 14
41\r\n42](https://github.com/user-attachments/assets/f234b965-9d90-452c-b0e5-8f918bc85756)\r\n\r\nField
parent link in badges is now more obvious\r\n\r\n![Screenshot 2025-01-21
at 14
41\r\n56](https://github.com/user-attachments/assets/001ed451-7930-48da-beba-95865b79a0bd)\r\n\r\nThe
only thing I haven't added from the nice to haves was the
refresh\r\nbutton, I think we should wait to see if we actually need
this (as it's\r\ntechnically a refresh of two entities - the definition
and the unmapped\r\nfields).\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"8832cc4289df403f2d690c19794e6c253b3c8d6b"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/207066","number":207066,"mergeCommit":{"message":"[Streams]
Schema Editor UX improvements (#207066)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/streams-program/issues/53\r\n\r\n## Overview
of changes\r\n\r\nEnhanced filters for status / type. \r\n\r\nI omitted
field parent (in designs) as this feels superfluous (can\r\nlikely be
facilitated via the inherited status).\r\n \r\n![Screenshot 2025-01-21
at 14
39\r\n53](https://github.com/user-attachments/assets/4ea43477-0fb7-4f29-9522-d2fabfd653a3)\r\n\r\nChildren
in the children affected callout are now linked\r\n\r\n![Screenshot
2025-01-21 at 14
40\r\n23](https://github.com/user-attachments/assets/0ce040c0-f6fc-479c-8941-25a493f1349a)\r\n\r\nECS
recommendations are given for type if available\r\n\r\n![Screenshot
2025-01-21 at 14
40\r\n41](https://github.com/user-attachments/assets/ab47f839-8a59-47af-898d-f7eb93de3107)\r\n\r\nFor
format (with date type) some popular options are now provided in
a\r\nselect. It's not exhaustive as there are **a lot** of format
options. A\r\ntoggle to switch to a freeform mode is
provided.\r\n\r\n![Screenshot 2025-01-21 at 14
41\r\n10](https://github.com/user-attachments/assets/f89a9c14-d711-495d-a6df-54288d12592b)\r\n\r\n![Screenshot
2025-01-21 at 14
41\r\n20](https://github.com/user-attachments/assets/078733bd-dc19-435f-a10a-271723ab2c9f)\r\n\r\nData
Grid toolbar is added\r\n\r\n![Screenshot 2025-01-21 at 14
41\r\n42](https://github.com/user-attachments/assets/f234b965-9d90-452c-b0e5-8f918bc85756)\r\n\r\nField
parent link in badges is now more obvious\r\n\r\n![Screenshot 2025-01-21
at 14
41\r\n56](https://github.com/user-attachments/assets/001ed451-7930-48da-beba-95865b79a0bd)\r\n\r\nThe
only thing I haven't added from the nice to haves was the
refresh\r\nbutton, I think we should wait to see if we actually need
this (as it's\r\ntechnically a refresh of two entities - the definition
and the unmapped\r\nfields).\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"8832cc4289df403f2d690c19794e6c253b3c8d6b"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Kerry Gallagher <[email protected]>
@Kerry350
Copy link
Contributor Author

@flash1293 #208093 👍

viduni94 pushed a commit to viduni94/kibana that referenced this pull request Jan 23, 2025
## Summary

Closes elastic/streams-program#53

## Overview of changes

Enhanced filters for status / type. 

I omitted field parent (in designs) as this feels superfluous (can
likely be facilitated via the inherited status).
 
![Screenshot 2025-01-21 at 14 39
53](https://github.com/user-attachments/assets/4ea43477-0fb7-4f29-9522-d2fabfd653a3)

Children in the children affected callout are now linked

![Screenshot 2025-01-21 at 14 40
23](https://github.com/user-attachments/assets/0ce040c0-f6fc-479c-8941-25a493f1349a)

ECS recommendations are given for type if available

![Screenshot 2025-01-21 at 14 40
41](https://github.com/user-attachments/assets/ab47f839-8a59-47af-898d-f7eb93de3107)

For format (with date type) some popular options are now provided in a
select. It's not exhaustive as there are **a lot** of format options. A
toggle to switch to a freeform mode is provided.

![Screenshot 2025-01-21 at 14 41
10](https://github.com/user-attachments/assets/f89a9c14-d711-495d-a6df-54288d12592b)

![Screenshot 2025-01-21 at 14 41
20](https://github.com/user-attachments/assets/078733bd-dc19-435f-a10a-271723ab2c9f)

Data Grid toolbar is added

![Screenshot 2025-01-21 at 14 41
42](https://github.com/user-attachments/assets/f234b965-9d90-452c-b0e5-8f918bc85756)

Field parent link in badges is now more obvious

![Screenshot 2025-01-21 at 14 41
56](https://github.com/user-attachments/assets/001ed451-7930-48da-beba-95865b79a0bd)

The only thing I haven't added from the nice to haves was the refresh
button, I think we should wait to see if we actually need this (as it's
technically a refresh of two entities - the definition and the unmapped
fields).

---------

Co-authored-by: kibanamachine <[email protected]>
qn895 pushed a commit to qn895/kibana that referenced this pull request Jan 23, 2025
## Summary

Closes elastic/streams-program#53

## Overview of changes

Enhanced filters for status / type. 

I omitted field parent (in designs) as this feels superfluous (can
likely be facilitated via the inherited status).
 
![Screenshot 2025-01-21 at 14 39
53](https://github.com/user-attachments/assets/4ea43477-0fb7-4f29-9522-d2fabfd653a3)

Children in the children affected callout are now linked

![Screenshot 2025-01-21 at 14 40
23](https://github.com/user-attachments/assets/0ce040c0-f6fc-479c-8941-25a493f1349a)

ECS recommendations are given for type if available

![Screenshot 2025-01-21 at 14 40
41](https://github.com/user-attachments/assets/ab47f839-8a59-47af-898d-f7eb93de3107)

For format (with date type) some popular options are now provided in a
select. It's not exhaustive as there are **a lot** of format options. A
toggle to switch to a freeform mode is provided.

![Screenshot 2025-01-21 at 14 41
10](https://github.com/user-attachments/assets/f89a9c14-d711-495d-a6df-54288d12592b)

![Screenshot 2025-01-21 at 14 41
20](https://github.com/user-attachments/assets/078733bd-dc19-435f-a10a-271723ab2c9f)

Data Grid toolbar is added

![Screenshot 2025-01-21 at 14 41
42](https://github.com/user-attachments/assets/f234b965-9d90-452c-b0e5-8f918bc85756)

Field parent link in badges is now more obvious

![Screenshot 2025-01-21 at 14 41
56](https://github.com/user-attachments/assets/001ed451-7930-48da-beba-95865b79a0bd)

The only thing I haven't added from the nice to haves was the refresh
button, I think we should wait to see if we actually need this (as it's
technically a refresh of two entities - the definition and the unmapped
fields).

---------

Co-authored-by: kibanamachine <[email protected]>
JoseLuisGJ pushed a commit to JoseLuisGJ/kibana that referenced this pull request Jan 27, 2025
## Summary

Closes elastic/streams-program#53

## Overview of changes

Enhanced filters for status / type. 

I omitted field parent (in designs) as this feels superfluous (can
likely be facilitated via the inherited status).
 
![Screenshot 2025-01-21 at 14 39
53](https://github.com/user-attachments/assets/4ea43477-0fb7-4f29-9522-d2fabfd653a3)

Children in the children affected callout are now linked

![Screenshot 2025-01-21 at 14 40
23](https://github.com/user-attachments/assets/0ce040c0-f6fc-479c-8941-25a493f1349a)

ECS recommendations are given for type if available

![Screenshot 2025-01-21 at 14 40
41](https://github.com/user-attachments/assets/ab47f839-8a59-47af-898d-f7eb93de3107)

For format (with date type) some popular options are now provided in a
select. It's not exhaustive as there are **a lot** of format options. A
toggle to switch to a freeform mode is provided.

![Screenshot 2025-01-21 at 14 41
10](https://github.com/user-attachments/assets/f89a9c14-d711-495d-a6df-54288d12592b)

![Screenshot 2025-01-21 at 14 41
20](https://github.com/user-attachments/assets/078733bd-dc19-435f-a10a-271723ab2c9f)

Data Grid toolbar is added

![Screenshot 2025-01-21 at 14 41
42](https://github.com/user-attachments/assets/f234b965-9d90-452c-b0e5-8f918bc85756)

Field parent link in badges is now more obvious

![Screenshot 2025-01-21 at 14 41
56](https://github.com/user-attachments/assets/001ed451-7930-48da-beba-95865b79a0bd)

The only thing I haven't added from the nice to haves was the refresh
button, I think we should wait to see if we actually need this (as it's
technically a refresh of two entities - the definition and the unmapped
fields).

---------

Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels Feature:Streams This is the label for the Streams Project release_note:skip Skip the PR/issue when compiling release notes v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants