[CodeEditor] Add grok highlighting#159334
Conversation
I think its good, the syntax is pretty minimal so its fine to keep it simple as you did!
I'm a bit rusty with regexes but it seems like it matches any backslashes followed by square brackets, parentheses, question marks, colons, or vertical bars? I'm unsure what this is for, but perhaps @alisonelizabeth might have some idea 🤔 |
|
Pinging @elastic/appex-sharedux (Team:SharedUX) |
|
I think this is a good start. Thanks @Dosant! Grok debugger has been around a long time and unfortunately I do not have much context into the original implementation. That said, I was able to track down #18572, where it looks like the syntax highlighting was implemented. There is a screenshot that shows the previous behavior. |
|
@sabarasaba, @alisonelizabeth, thanks! so I think I understand what it is now: first, there were the following CSS classes that added color (probably they were removed by mistake so highlighting stoped working on some point for ace) you can see that from we highlighted with css only so the idea was to highlight either I'll try to repro with monaco highlighting |
|
I think this should work as before in ace now including special symbols and escaping them (a bit different on colors and less variance, as I wanted to avoid adding custom themes):
@sabarasaba, should be ready for review 👍 |
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
sabarasaba
left a comment
There was a problem hiding this comment.
Thanks a lot for working on this @Dosant! Changes lgtm, tested locally 🚀
* main: [Lens] Add custom formatter within the Lens editor (elastic#158468) [Uptime] Hide app if no data is available (elastic#159118) [CodeEditor] Add grok highlighting (elastic#159334)
* main: (199 commits) [Lens] Add custom formatter within the Lens editor (elastic#158468) [Uptime] Hide app if no data is available (elastic#159118) [CodeEditor] Add grok highlighting (elastic#159334) Expose decoded cloudId components from the cloud plugin's contract (elastic#159442) [Profiling] Use collector and symbolizer integrations in the add data page (elastic#159481) [Infrastructure UI] Hosts View: Unified Search bar with auto-refresh enabled (elastic#157011) [APM] Add feature flag for not available apm schema (elastic#158911) [Lens] Remove deprecated componentWillReceiveProps usage (elastic#159502) [api-docs] 2023-06-13 Daily api_docs build (elastic#159536) [data views] Use versioned router for REST routes (elastic#158608) [maps] fix geo line source not loaded unless maps application is opened (elastic#159432) [Enterprise Search][Search application]Fix Create Api key url (elastic#159519) [Security Solution] Increase timeout for indexing hosts (elastic#159518) dashboard Reset button disable (elastic#159430) [Security Solution] Unskip Endpoint API tests after package fix (elastic#159484) [Synthetics] adjust alert timing (elastic#159511) [ResponseOps][rule registry] Remove usages of `refresh: true` (elastic#159252) Revert "Remove unused package (elastic#158597)" [Serverless] Adding config to disable authentication on task manager background worker utilization API (elastic#159505) Remove unused package (elastic#158597) ...



Summary
Close #155506
I didn't introduce any custom colors here but just used built-in token types for highlighting (
stringfor red andvariablefor blue)