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

[8.9] Add ESRE landing page sections #159809

Merged
merged 13 commits into from
Jun 15, 2023

Conversation

demjened
Copy link
Contributor

@demjened demjened commented Jun 15, 2023

Summary

This PR continues #159589 and adds 4 sections to the ESRE landing page, with a few caveats - these will be addressed in subsequent PRs:

  • The accordions only have placeholders for inner content
  • Multiple accordions can be opened at the same time
  • Links are missing

ESRE_landing_page

Checklist

@demjened demjened added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Team:EnterpriseSearch v8.9.0 labels Jun 15, 2023
pageHeader={{
pageTitle: i18n.translate('xpack.enterpriseSearch.esre.guide.pageTitle', {
defaultMessage: 'Enhance your search with ESRE',
}),
}}
>
<SetPageChrome />
<p>ESRE placeholder</p>
<EuiPanel color="transparent" paddingSize="none">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I decided to use EuiPanel instead of <EuiPageTemplate.Section>. I had issues with padding when using the latter (for example the header is wider than the sections).

import { MeasurePerformanceSection } from './measure_performance_section';
import { RankAggregationSection } from './rank_aggregation_section';
import { SemanticSearchSection } from './semantic_search_section';

export const EsreGuide: React.FC = () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure what logic I should cover with unit tests; everything in this PR is using EUI components. Maybe I can add a test that <EsreGuide> renders the custom sections. Thoughts?

Copy link
Contributor

@TattdCodeMonkey TattdCodeMonkey Jun 15, 2023

Choose a reason for hiding this comment

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

I think you're good for now. We will sometimes test components with enzyme, but usually only if there is complex logic controlling rendering.

We also want to start using react-testing-library instead of enzyme for this kind of testing.

@demjened demjened marked this pull request as ready for review June 15, 2023 15:36
@demjened demjened requested a review from a team June 15, 2023 15:36
@demjened
Copy link
Contributor Author

@elasticmachine merge upstream

@demjened
Copy link
Contributor Author

@TattdCodeMonkey @sphilipse I've addressed your comments.

import { MeasurePerformanceSection } from './measure_performance_section';
import { RankAggregationSection } from './rank_aggregation_section';
import { SemanticSearchSection } from './semantic_search_section';

export const EsreGuide: React.FC = () => {
Copy link
Contributor

@TattdCodeMonkey TattdCodeMonkey Jun 15, 2023

Choose a reason for hiding this comment

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

I think you're good for now. We will sometimes test components with enzyme, but usually only if there is complex logic controlling rendering.

We also want to start using react-testing-library instead of enzyme for this kind of testing.

@demjened demjened enabled auto-merge (squash) June 15, 2023 20:44
@demjened demjened merged commit 323cd25 into elastic:main Jun 15, 2023
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
enterpriseSearch 2116 2129 +13

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.4MB 2.5MB +28.2KB
Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 13 15 +2
securitySolution 410 414 +4
total +6

miscellaneous assets size

id before after diff
enterpriseSearch 2.1MB 2.6MB ⚠️ +535.9KB

Total ESLint disabled count

id before after diff
enterpriseSearch 14 16 +2
securitySolution 493 497 +4
total +6

History

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

@demjened demjened deleted the demjened/esre-landing-page-sections branch June 15, 2023 21:53
demjened added a commit that referenced this pull request Jun 20, 2023
## Summary

This PR follows #159809 and adds content to the expandable accordion
sections. The 1st accorion (ELSER) is open by default on page visit.

We're also adding links in the sections, which point to documentation or
to internal Kibana pages (e.g. Behavioral Analytics, Trained Models).
New entries are being added to the doc links files.


![ESRE_panels](https://github.com/elastic/kibana/assets/14224983/a50c5705-0192-4a86-8444-9d4b1a9859b2)


### Checklist
- [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)
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [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))

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:EnterpriseSearch v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants