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

[ES|QL] improve tokenizer and theme #190170

Merged
merged 9 commits into from
Aug 9, 2024
Merged

Conversation

drewdaemon
Copy link
Contributor

@drewdaemon drewdaemon commented Aug 8, 2024

Summary

Adds some validation around our Monaco theme and tokenizer. I thought fixing the tokenizer would help with #187184 but it looks like providing an explicit replacement range is actually the right route.

Still, we got a few things out of this since these changes fix a few styling issues.

INLINESTATS
Screenshot 2024-08-08 at 2 34 46 PM

Casting operator
Screenshot 2024-08-08 at 2 34 03 PM

Timespan literals
Screenshot 2024-08-08 at 2 32 58 PM

Subsequent nulls last/first
Screenshot 2024-08-08 at 3 23 52 PM

MATCH
Screenshot 2024-08-08 at 3 42 18 PM

Checklist

@drewdaemon drewdaemon changed the title [ES|QL] improve tokenizer [ES|QL] improve tokenizer and theme Aug 8, 2024
@drewdaemon
Copy link
Contributor Author

/ci

1 similar comment
@drewdaemon
Copy link
Contributor Author

/ci

@drewdaemon drewdaemon added Feature:ES|QL ES|QL related features in Kibana Team:ESQL ES|QL related features in Kibana labels Aug 8, 2024
@drewdaemon
Copy link
Contributor Author

/ci

}
});

it('every valid lexical name should have a corresponding rule', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we like this test? It seemed like a good idea as an extra check that we aren't missing some lexical token that gets added. But, we can remove if it seems like a pain.

Copy link
Contributor

@stratoula stratoula Aug 9, 2024

Choose a reason for hiding this comment

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

Yeah, leave it and let's see how painful it gets

@drewdaemon
Copy link
Contributor Author

/ci

@drewdaemon
Copy link
Contributor Author

/ci

Comment on lines +61 to +64
'false', // @TODO consider if this should get styling
'true', // @TODO consider if this should get styling
'info', // @TODO consider if this should get styling
'colon', // @TODO consider if this should get styling
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 kind of feel like these should be styled somehow cc @ryankeairns

@drewdaemon
Copy link
Contributor Author

/ci

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Page load bundle

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

id before after diff
kbnUiSharedDeps-srcJs 3.3MB 3.3MB -137.0B

History

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

@drewdaemon drewdaemon marked this pull request as ready for review August 9, 2024 00:41
@drewdaemon drewdaemon requested a review from a team as a code owner August 9, 2024 00:41
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-esql (Team:ESQL)

Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

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

nice!

@drewdaemon drewdaemon merged commit 43d0a0b into elastic:main Aug 9, 2024
20 checks passed
@kibanamachine kibanamachine added v8.16.0 backport:skip This commit does not require backporting labels Aug 9, 2024
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 Feature:ES|QL ES|QL related features in Kibana release_note:fix Team:ESQL ES|QL related features in Kibana v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants