-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Dashboard] [Controls] Refactor options list to align with new code standards #138336
[Dashboard] [Controls] Refactor options list to align with new code standards #138336
Conversation
738d0d3
to
aaf7af1
Compare
8c72b0b
to
8cadc07
Compare
8cadc07
to
0a37b38
Compare
@@ -16,7 +16,7 @@ import { ControlEmbeddable, DataControlField, IEditableControlFactory } from '.. | |||
import { | |||
createOptionsListExtract, | |||
createOptionsListInject, | |||
} from '../../../common/control_types/options_list/options_list_persistable_state'; | |||
} from '../../../common/options_list/options_list_persistable_state'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOL why is time slider using the options list persistable state? Definitely something to fix in the time slider refactor @cqliu1 @ThomThomson 😆
9f75cd3
to
37fbfb4
Compare
37fbfb4
to
0720d1b
Compare
@elastic/kibana-design The only thing I did was move a |
Pinging @elastic/kibana-presentation (Team:Presentation) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sass change LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 I pulled it down and options list still works as expected. One tiny nit but not a dealbreaker
}) => { | ||
} | ||
|
||
export const OptionsListPopover = ({ width, updateSearchString }: OptionsListPopoverProps) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: This might be a personal preference thing, but I like using FC<Props>
export const OptionsListPopover = ({ width, updateSearchString }: OptionsListPopoverProps) => { | |
export const OptionsListPopover: FC<OptionsListPopoverProps> = ({ width, updateSearchString}) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe most of the controls-related components follow the style without the FC<Props>
so I think I'll stick with that? Honestly not a huge deal, but if we wanted to be that thorough about code consistency, it honestly would be easier to remove FC<Props>
from everywhere because, at least in main
right now, only time slider uses that syntax 😆
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @Heenawter |
…tandards (elastic#138336) * Refactor public folder structure * Refactor common folder structure * Refactor server folder structure * Stub out Jest tests and stories * Add popover jest tests * Fix strings + imports * Remove comments and unused strings * Fix jest tests * Clean imports
Summary
This PR serves as the first refactor of the options list control with the goal of aligning with the new code standards that the Presentation team is working on. It has absolutely no user-facing changes.
Checklist
For maintainers