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

Update Search Index Document Card design. #194061

Merged

Conversation

efegurkan
Copy link
Member

@efegurkan efegurkan commented Sep 25, 2024

Summary

Screen.Recording.2024-09-27.at.14.45.52.mov

This PR adds an option to add a richer design for Result card.
Defaults still stay the same with old design.
Screenshot from Index Management.
Screenshot 2024-09-27 at 14 52 25

Added a bunch of options to show score, show amount of fields to show when collapsed by default etc.

Checklist

Delete any items that are not applicable to this PR.

@efegurkan efegurkan added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 v8.16.0 labels Sep 27, 2024
@efegurkan efegurkan marked this pull request as ready for review September 27, 2024 12:04
@efegurkan efegurkan requested a review from a team as a code owner September 27, 2024 12:04
@efegurkan efegurkan added the backport:version Backport to applied version labels label Sep 27, 2024
@@ -53,6 +57,10 @@ export const DocumentList: React.FC<DocumentListProps> = ({
meta,
onPaginate,
setDocsPerPage,
defaultVisibleFields = 3,
Copy link
Member

Choose a reason for hiding this comment

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

suggestion - have a resultProps prop which passes down these to the Result component?

@@ -305,4 +305,47 @@ export function defineRoutes({
}
})
);
router.post(
Copy link
Member

Choose a reason for hiding this comment

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

suggestion: we could rely on the index management APIs here for getting index mappings instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

For the cases where we need multiple index responses, index management api returns 500. i.e. 'index1,index2' where we expect a response like

{
    index1: ...,
    index2: ...,
}

Therefore I will stick with current implementation for this PR but definitely I am open to change it later.

Copy link
Member

Choose a reason for hiding this comment

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

yep makes sense!

color="subdued"
grow
css={css`
//width: ${euiTheme.base * 4}px;
Copy link
Member

@joemcelroy joemcelroy Sep 27, 2024

Choose a reason for hiding this comment

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

this suppose to be commented out?

Copy link
Member Author

Choose a reason for hiding this comment

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

This was supposed to go away :D it is not even correct syntax

@joemcelroy
Copy link
Member

also double check your labels, I suggest to add backport:prev-minor

@efegurkan efegurkan added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) and removed backport:version Backport to applied version labels labels Sep 30, 2024
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
enterpriseSearch 2301 2302 +1
searchIndices 179 180 +1
searchPlayground 241 263 +22
serverlessSearch 281 282 +1
total +25

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/search-index-documents 30 33 +3

Async chunks

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

id before after diff
enterpriseSearch 2.6MB 2.6MB +4.0KB
searchIndices 89.3KB 93.2KB +3.9KB
searchPlayground 151.2KB 165.2KB +14.0KB
serverlessSearch 327.2KB 331.3KB +4.1KB
total +25.9KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/search-index-documents 1 2 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
searchPlayground 7.1KB 7.2KB +55.0B
Unknown metric groups

API count

id before after diff
@kbn/search-index-documents 30 33 +3

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@efegurkan efegurkan merged commit 5bc33cd into elastic:main Oct 1, 2024
21 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 1, 2024
## Summary

https://github.com/user-attachments/assets/552e1198-ba95-45d6-b13b-e1b26060d34c

This PR adds an option to add a richer design for Result card.
Defaults still stay the same with old design.
Screenshot from Index Management.
<img width="1139" alt="Screenshot 2024-09-27 at 14 52 25"
src="https://github.com/user-attachments/assets/754a22c5-c3db-4385-b1ad-4e93a8615b9c">

Added a bunch of options to show score, show amount of fields to show
when collapsed by default etc.

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 5bc33cd)
@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

kibanamachine added a commit that referenced this pull request Oct 2, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [Update Search Index Document Card design.
(#194061)](#194061)

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

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

<!--BACKPORT [{"author":{"name":"Efe Gürkan
YALAMAN","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-01T11:29:31Z","message":"Update
Search Index Document Card design. (#194061)\n\n##
Summary\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/552e1198-ba95-45d6-b13b-e1b26060d34c\r\n\r\nThis
PR adds an option to add a richer design for Result card. \r\nDefaults
still stay the same with old design.\r\nScreenshot from Index
Management.\r\n<img width=\"1139\" alt=\"Screenshot 2024-09-27 at 14 52
25\"\r\nsrc=\"https://github.com/user-attachments/assets/754a22c5-c3db-4385-b1ad-4e93a8615b9c\">\r\n\r\nAdded
a bunch of options to show score, show amount of fields to show\r\nwhen
collapsed by default etc.\r\n\r\n\r\n### Checklist\r\n\r\nDelete any
items that are not applicable to this PR.\r\n\r\n- [x] Any text added
follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [x] Any UI touched in this PR is
usable by keyboard only (learn more\r\nabout [keyboard
accessibility](https://webaim.org/techniques/keyboard/))\r\n- [x] Any UI
touched in this PR does not create any new axe failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[x] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[x] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"5bc33cd69eeb828d519ca44b8a3c3ba35c306e19","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","v8.16.0"],"title":"Update
Search Index Document Card
design.","number":194061,"url":"https://github.com/elastic/kibana/pull/194061","mergeCommit":{"message":"Update
Search Index Document Card design. (#194061)\n\n##
Summary\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/552e1198-ba95-45d6-b13b-e1b26060d34c\r\n\r\nThis
PR adds an option to add a richer design for Result card. \r\nDefaults
still stay the same with old design.\r\nScreenshot from Index
Management.\r\n<img width=\"1139\" alt=\"Screenshot 2024-09-27 at 14 52
25\"\r\nsrc=\"https://github.com/user-attachments/assets/754a22c5-c3db-4385-b1ad-4e93a8615b9c\">\r\n\r\nAdded
a bunch of options to show score, show amount of fields to show\r\nwhen
collapsed by default etc.\r\n\r\n\r\n### Checklist\r\n\r\nDelete any
items that are not applicable to this PR.\r\n\r\n- [x] Any text added
follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [x] Any UI touched in this PR is
usable by keyboard only (learn more\r\nabout [keyboard
accessibility](https://webaim.org/techniques/keyboard/))\r\n- [x] Any UI
touched in this PR does not create any new axe failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[x] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[x] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"5bc33cd69eeb828d519ca44b8a3c3ba35c306e19"}},"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/194061","number":194061,"mergeCommit":{"message":"Update
Search Index Document Card design. (#194061)\n\n##
Summary\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/552e1198-ba95-45d6-b13b-e1b26060d34c\r\n\r\nThis
PR adds an option to add a richer design for Result card. \r\nDefaults
still stay the same with old design.\r\nScreenshot from Index
Management.\r\n<img width=\"1139\" alt=\"Screenshot 2024-09-27 at 14 52
25\"\r\nsrc=\"https://github.com/user-attachments/assets/754a22c5-c3db-4385-b1ad-4e93a8615b9c\">\r\n\r\nAdded
a bunch of options to show score, show amount of fields to show\r\nwhen
collapsed by default etc.\r\n\r\n\r\n### Checklist\r\n\r\nDelete any
items that are not applicable to this PR.\r\n\r\n- [x] Any text added
follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [x] Any UI touched in this PR is
usable by keyboard only (learn more\r\nabout [keyboard
accessibility](https://webaim.org/techniques/keyboard/))\r\n- [x] Any UI
touched in this PR does not create any new axe failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[x] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[x] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"5bc33cd69eeb828d519ca44b8a3c3ba35c306e19"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Efe Gürkan YALAMAN <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: Alex Szabo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants