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

Convert to TypeScript ui/field_formats #44370

Merged
merged 3 commits into from
Sep 5, 2019

Conversation

alexwizp
Copy link
Contributor

@alexwizp alexwizp commented Aug 29, 2019

Partially fix #43439

Summary

What was done in this PR:

  • Convert to TypeScript
  • Convert tests from Mocha to Jest

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@alexwizp alexwizp requested a review from gospodarsky August 29, 2019 11:02
@alexwizp alexwizp changed the title Convert to TypeScript ui/field_formats [WIP] Convert to TypeScript ui/field_formats Aug 29, 2019
@alexwizp alexwizp added the WIP Work in progress label Aug 29, 2019
@alexwizp alexwizp self-assigned this Aug 29, 2019
@alexwizp alexwizp requested a review from a team as a code owner August 29, 2019 12:51
@alexwizp alexwizp force-pushed the ui/field_formats branch 2 times, most recently from 34a46c0 to f15f0fb Compare August 30, 2019 10:46
@elastic elastic deleted a comment from elasticmachine Aug 30, 2019
@elastic elastic deleted a comment from elasticmachine Aug 30, 2019
@elastic elastic deleted a comment from elasticmachine Aug 30, 2019
@alexwizp alexwizp added the release_note:skip Skip the PR/issue when compiling release notes label Aug 30, 2019
@elastic elastic deleted a comment from elasticmachine Aug 30, 2019
@elastic elastic deleted a comment from elasticmachine Aug 30, 2019
@alexwizp alexwizp force-pushed the ui/field_formats branch 4 times, most recently from cfa5373 to b782282 Compare September 2, 2019 11:11
@elastic elastic deleted a comment from elasticmachine Sep 2, 2019
@elastic elastic deleted a comment from elasticmachine Sep 2, 2019
@elastic elastic deleted a comment from elasticmachine Sep 2, 2019
@lizozom lizozom self-requested a review September 2, 2019 12:25
@elastic elastic deleted a comment from elasticmachine Sep 2, 2019
@elastic elastic deleted a comment from elasticmachine Sep 2, 2019
@alexwizp
Copy link
Contributor Author

alexwizp commented Sep 2, 2019

retest

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Member

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

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

LGTM, tested on chrome linux

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch

Copy link
Contributor

@lizozom lizozom left a comment

Choose a reason for hiding this comment

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

Tested and working.

Added some TS questions.

// @ts-ignore
import { getHighlightHtml } from '../../../core_plugins/kibana/common/highlight/highlight_html';

type HtmlConventTypeConvert = (
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we TS this better?

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 added interface for Field property.

src/legacy/ui/field_formats/field_format.ts Show resolved Hide resolved
src/legacy/ui/field_formats/types.ts Outdated Show resolved Hide resolved

export type ContentType = 'html' | 'text';

export interface IFieldFormat {
Copy link
Contributor

Choose a reason for hiding this comment

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

// brain-pick

Could we benefit from using generics here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure that we should use generics here.

Please see:
image

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@lizozom lizozom left a comment

Choose a reason for hiding this comment

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

LGTM

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@rayafratkina
Copy link
Contributor

@elastic/ml-ui can you please take a look?

Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

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

ML changes LGTM

@alexwizp alexwizp merged commit b5d59c2 into elastic:master Sep 5, 2019
alexwizp added a commit to alexwizp/kibana that referenced this pull request Sep 5, 2019
* Convert to TypeScript ui/field_formats

* Fix PR comments

* Fix PR comments
alexwizp added a commit that referenced this pull request Sep 5, 2019
* Convert to TypeScript ui/field_formats

* Fix PR comments

* Fix PR comments
@alexwizp alexwizp deleted the ui/field_formats branch January 4, 2020 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ui/field_formats 👉 src/plugins/data
7 participants