elastic / eui

Elastic UI Framework 🙌
https://eui.elastic.co/
Other
6.09k stars 838 forks source link

[EuiCodeBlock] #7554

Closed andrew-moldovan closed 7 months ago

andrew-moldovan commented 7 months ago

Is your feature request related to a problem? Please describe. On the API Console page of the Cloud UI, responses are shown in an EUICodeBlock. This codeblock has virtualization turned on because the responses can take ages to show up if the payload is large enough (which sometimes it is). However, when a user tries to search via cmd+f they are only able to search the results that are currently shown, not the entire payload.

Describe the solution you'd like Would be great to have a search/highlight/scroll functionality built into the codeblock so that when a user has tapped into the block, cmd+f would be captured and search results highlighted and scrolled to. Very similar to what Dev Tools does in Kibana today. I think they use an Ace editor? I'm hoping to not have to import an entirely different library into the cloud ui repo to handle this.

cee-chen commented 7 months ago

Hey Andrew - I'm going to be super up front, this feature request for is a fairly massive technical lift (basically requires a completely custom Ctrl+F implementation to work with virtualization) and it's incredibly unlikely that the EUI team will have the bandwidth to do this anytime in the near future.

My personal 2c is that this kind of functionality is complex enough to be its own library, and doesn't really belong in a design system. I'd say importing another library for a technically challenging problem like this is totally warranted in this case.

andrew-moldovan commented 7 months ago

That's a completely fair response to my ticket. I certainly can't disagree with this being a large technical effort. If this isn't something that EUI is interested in doing, please feel free to close the ticket as won't do

JasonStoltz commented 7 months ago

Hey @andrew-moldovan, after discussing this as a team, we think that the size of the lift here is just too large for EUI -- both in terms of implementation effort as well as maintenance. We're going to close this for now, but we appreciate you reaching out with the suggestion!