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

Add typedefs for EuiAvatar component and color service #1120

Merged
merged 4 commits into from
Aug 17, 2018

Conversation

legrego
Copy link
Member

@legrego legrego commented Aug 16, 2018

This PR adds typedefs for the following:

  • EuiAvatar component
  • color service

@cchaos
Copy link
Contributor

cchaos commented Aug 16, 2018

@stacey-gammon Do you mind just glancing over these TS defs? Our resident TS expert, @chandlerprall is out for the next week.

type rgbDef = [number, number, number];

export const hexToRbg: (hex: string) => rgbDef;
export const rbgToHex: (rbg: string) => string;
Copy link
Contributor

Choose a reason for hiding this comment

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

(rbg: rgbDef) => string; ?

Copy link
Member Author

Choose a reason for hiding this comment

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

If I understand the function correctly (https://github.com/legrego/eui/blob/typedef-updates/src/services/color/rgb_to_hex.js#L2), rbgToHex accepts a string, rather than an array of numbers.

I did transpose rgb into rbg by mistake, so I'll fix that now.

Copy link
Contributor

@stacey-gammon stacey-gammon left a comment

Choose a reason for hiding this comment

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

Minus the one comment, lgtm. Did not pull down though and verify, just gave a quick glance.

legrego added a commit to elastic/kibana that referenced this pull request Aug 16, 2018
…19497)

This replaces the existing Modal with a smaller Popover which is less intrusive. The popover also features a search bar for finding the desired Space when there are 8 or more Spaces to choose from.

### Details
When there are less than 8 spaces available, the selector will render a simple list of spaces.

When there are >= 8 spaces available, the selector will also render a search bar to let users search for their space.


### Prerequisites 
- [x] Merge #18862 into `spaces-phase-1`

### Known Issues
- elastic/eui#1043 (fixed in `v3.2.0`)
- elastic/eui#1052 (fixed in `v3.2.1`)
- Missing typdefs (not a blocker to merge): elastic/eui#1120
@legrego
Copy link
Member Author

legrego commented Aug 17, 2018

Thanks for the review @stacey-gammon!

@cchaos any objections to merging this?

@cchaos
Copy link
Contributor

cchaos commented Aug 17, 2018

Nope, go for it!

@legrego legrego merged commit c508b75 into elastic:master Aug 17, 2018
@legrego legrego deleted the typedef-updates branch August 22, 2018 12:01
legrego added a commit to legrego/eui that referenced this pull request Aug 23, 2018
legrego added a commit that referenced this pull request Aug 23, 2018
This adds an entry for the 3.7.0 changelog for #1120
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.

3 participants