kibana icon indicating copy to clipboard operation
kibana copied to clipboard

[Discover] Migrate field_calculator.js file to field_calculator.ts

Open kertal opened this issue 2 years ago • 9 comments

The year is 2022AD. Discover is entirely occupied by the TS. Well not entirely! One small village of indomitable JS still holds out against the invader. And life is not easy for developers who garrison the fortified camps of common, public, server and .storybook

So the target would be to migrate field_calculator.js to field_calculator.ts.

Note that this is the last significant file in JS, some small villages like jest.config.js can stay.

https://github.com/elastic/kibana/blob/main/src/plugins/discover/public/application/main/components/sidebar/lib/field_calculator.js

kertal avatar Aug 04 '22 13:08 kertal

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

elasticmachine avatar Aug 04 '22 13:08 elasticmachine

Hey! Can I work on that? I think it's an interesting task.

JorgChrist avatar Aug 05 '22 07:08 JorgChrist

@kertal Sorry for asking again but may I work on this?

JorgChrist avatar Aug 06 '22 19:08 JorgChrist

@JorgChrist Sure you can, but there's also another user working on it currently: https://github.com/elastic/kibana/pull/138142

kertal avatar Aug 08 '22 06:08 kertal

hey @kertal can i work on this issue aswell?

AAYUSH-droid avatar Aug 09 '22 16:08 AAYUSH-droid

checking @farjad-akhan, will you iterate on your PR?

kertal avatar Aug 09 '22 17:08 kertal

checking @farjad-akhan, will you iterate on your PR?

I have closed my PR

farjad-akhan avatar Aug 10 '22 05:08 farjad-akhan

thx for your effort @farjad-akhan , @JorgChrist or @AAYUSH-droid , this is free to take. note that it's not sufficient to convert the file to TypeScript, but it's also necessary to find the right types we're using. You would need to check how the function is used, an there you shall find what you need.

kertal avatar Aug 10 '22 06:08 kertal

@kertal Did farjad drop it? I can start working on it. Can you assign me?

JorgChrist avatar Aug 10 '22 06:08 JorgChrist