Skip to content

Conversation

@zacharyparikh
Copy link
Contributor

Summary

image

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.

@zacharyparikh zacharyparikh added the release_note:skip Skip the PR/issue when compiling release notes label Sep 16, 2025
@zacharyparikh zacharyparikh requested a review from a team as a code owner September 16, 2025 16:31
@zacharyparikh zacharyparikh added the backport:skip This PR does not require backporting label Sep 16, 2025
@zacharyparikh
Copy link
Contributor Author

Hey @chrisbmar I wanted to ask you if these layout changes will break the auto scrolling? Just because the way I'm doing the NewConversationPrompt is it fully swaps in the resizable container on the first input, I can't tell if that is breaking your scrolling behavior or not.

@zacharyparikh
Copy link
Contributor Author

@elasticmachine merge upstream

@zacharyparikh
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Member

@jedrazb jedrazb left a comment

Choose a reason for hiding this comment

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

tested locally works well! some nits

const gridStyles = css`
display: grid;
grid-template-columns: ${sideColumnWidth} minmax(auto, ${contentMaxWidth}) ${sideColumnWidth};
grid-template-columns:
Copy link
Member

Choose a reason for hiding this comment

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

where is tailwind css when we need it ....

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've actually never used Tailwind in any larger project. Pretty used to using CSS-in-JS

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does tailwind have good utility classes for CSS grid? I can't imagine that's much easier to read/write is it?

'xpack.onechat.newConversationPrompt.agentBuilderDocsAriaLabel',
{
defaultMessage: 'Read Agent Builder documentation',
<EuiFlexGroup
Copy link
Member

Choose a reason for hiding this comment

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

Hmm can't we use https://eui.elastic.co/docs/components/display/empty-prompt/ here?

I believe this is default style for empty state pages in EUI cc @julianrosado

Copy link
Contributor

Choose a reason for hiding this comment

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

i don't think empty prompt will accommodate all this

{cards.map(({ key, title, description, iconType, path }) => {
return (
<EuiFlexItem key={key}>
<EuiCard
Copy link
Member

Choose a reason for hiding this comment

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

for a11y

role=button
aria-label=...

this is just div so readers might nor recognize this as clickable?

Copy link
Member

Choose a reason for hiding this comment

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

also data-test-subj for full story analytics and synthetics would be good to have

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So an EuiCard with an href does use an <a> element which has role="link", I think that will be picked up properly by screen readers even though it's not the parent element.

It seems like the EUI team has had some discussion around this elastic/eui#2521, citing this article https://inclusive-components.design/cards/

Based on these things, I'm inclined to leave it how it is? I can add the data-test-subj though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay made some adjustments here:

  • I'm using ul and li elements for the list and listitem roles to help group the markup a bit better
  • Added the data-test-subj attributes to the list and to each item
  • Added an aria-label for the list

Copy link
Contributor

@chrisbmar chrisbmar left a comment

Choose a reason for hiding this comment

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

Left you a few comments to consider.

Why did you go with grid over flexbox here? I feel the grid syntax adds a lot of unnecessary complexity - curious about your thinking on the tradeoffs.

Nice work, I think it looks really great and is a much better landing page than before.

@zacharyparikh
Copy link
Contributor Author

Why did you go with grid over flexbox here? I feel the grid syntax adds a lot of unnecessary complexity - curious about your thinking on the tradeoffs.

@chrisbmar
Not sure if you're referencing my usage for the larger ConversationGrid, the NewConversationPrompt, or both.

In general, I like to use flex when the items' layout is being controlled in one dimension, and CSS grid when the items' layout needs to be controlled in both dimensions.

Certainly you could achieve the layouts I built with flexbox rather than a grid, but I thought this layout was a good use case for grid. The CSS grid API is definitely a little bit complex, but I also think it's really powerful if you get used to using it.

Also! I didn't think about it, but maybe I should have used subgrids for this. It's a new feature and I'm used to having to support some older browsers, but maybe that's not the case for Kibana?

@zacharyparikh
Copy link
Contributor Author

@chrisbmar For the grid template we could also do this, which is pretty cool

    grid-template-columns:
      [left] ${sideColumnWidth} [content-start] ${contentMarginWidth}
      [center] minmax(auto, ${centerColumnWidth})
      ${contentMarginWidth} [content-end right] ${sideColumnWidth};

Then the containers would be styled like

const leftContainerStyles = css`
  grid-column: left;
`;
const centerContainerStyles = css`
  grid-column: center;
`;
const rightContainerStyles = css`
  grid-column: right;
`;
const contentWithMarginsStyles = css`
  grid-column: content;
`;

grid-column: content; automatically expands to

grid-column-start: content-start;
grid-column-end: content-end;

Could do this if you think it makes the column areas clearer

@chrisbmar
Copy link
Contributor

@chrisbmar For the grid template we could also do this, which is pretty cool

    grid-template-columns:
      [left] ${sideColumnWidth} [content-start] ${contentMarginWidth}
      [center] minmax(auto, ${centerColumnWidth})
      ${contentMarginWidth} [content-end right] ${sideColumnWidth};

Then the containers would be styled like

const leftContainerStyles = css`
  grid-column: left;
`;
const centerContainerStyles = css`
  grid-column: center;
`;
const rightContainerStyles = css`
  grid-column: right;
`;
const contentWithMarginsStyles = css`
  grid-column: content;
`;

grid-column: content; automatically expands to

grid-column-start: content-start;
grid-column-end: content-end;

Could do this if you think it makes the column areas clearer

I think the grid syntax in general is just complex and difficult to read 😄 that's a personal thing though, not a reflection on the code you've written. The new suggestion you shared does seem slightly easier to read, but it's up to you if you want to implement that or you want to try subgrid's - I don't want to hold this PR up on styling, it achieves the same thing at the end of the day and what you've implemented is a great improvement and I'd love to see it in before the cutoff tomorrow.

Copy link
Contributor

@chrisbmar chrisbmar left a comment

Choose a reason for hiding this comment

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

Good work! Approving now but I think Lee has some requests - but code LGTM. Let me know if you need another approval if you push another commit. Looking forward to seeing this landing :)

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #132 / discover/esql Index editor allows creation by manually adding data

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
onechat 570 572 +2

Async chunks

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

id before after diff
onechat 297.7KB 301.1KB +3.4KB

Page load bundle

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

id before after diff
onechat 14.2KB 14.2KB +1.0B

History

* 2.0.
*/

const docsRoot = 'https://www.elastic.co/docs/solutions/search/elastic-agent-builder';
Copy link
Member

Choose a reason for hiding this comment

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

doc paths are provided via another way, rather than you needing to hardcode the url for them.

see playground as an example:

  • need to create a place for the onechat plugin to set doc_links (x-pack/solutions/search/plugins/search_playground/common/doc_links.ts)
  • then the docLinks are set at plugin start (x-pack/solutions/search/plugins/search_playground/public/plugin.ts)

Copy link
Member

Choose a reason for hiding this comment

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

chris opened up a pr to put in the support for docLinks :) #235804

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice. Should I just remove these doc links and wait for the PR that adds all of the links together?

Copy link
Member

@joemcelroy joemcelroy left a comment

Choose a reason for hiding this comment

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

Looks good. one issue with the docs handling however.

@zacharyparikh zacharyparikh merged commit 3ba0c39 into elastic:main Sep 19, 2025
12 checks passed
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Sep 24, 2025
…stic#235240)

## Summary

<img width="974" height="772" alt="image"
src="https://github.com/user-attachments/assets/428b0328-1bf4-48d8-98c6-0ed38ef6adb6"
/>


### 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](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/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
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) 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](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

---------

Co-authored-by: Elastic Machine <[email protected]>
niros1 pushed a commit that referenced this pull request Sep 30, 2025
…5240)

## Summary

<img width="974" height="772" alt="image"
src="https://github.com/user-attachments/assets/428b0328-1bf4-48d8-98c6-0ed38ef6adb6"
/>


### 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](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/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
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) 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](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

---------

Co-authored-by: Elastic Machine <[email protected]>
rylnd pushed a commit to rylnd/kibana that referenced this pull request Oct 17, 2025
…stic#235240)

## Summary

<img width="974" height="772" alt="image"
src="https://github.com/user-attachments/assets/428b0328-1bf4-48d8-98c6-0ed38ef6adb6"
/>


### 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](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/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
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) 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](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

---------

Co-authored-by: Elastic Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants