[Canvas] i18n work on workpad header (and a few header CTAs) and convert to typescript#44943
Conversation
|
Pinging @elastic/kibana-canvas |
clintandrewhall
left a comment
There was a problem hiding this comment.
Nice work! Approving to unblock, but resolve the comments below before merging.
There was a problem hiding this comment.
nit: "Untyped local" - just so we can find them all later
There was a problem hiding this comment.
State should be defined.
There was a problem hiding this comment.
action appears to be a predictable type.
type Action = 'EDITING' | 'FULLSCREEN' | ...?
_keyHandler = (action: Action) => {
Might chat with @cqliu1 about where these are defined, then enumerate them there as a type. Otherwise, for now, just create a type here that matches what we're expecting.
There was a problem hiding this comment.
Spoke with @cqliu1 about it.. seems like there's not a good way right now to grab all the actions. I looked briefly at defining them as a big union type but Catherine and I agreed it might be better to have them all listed as an enum that way you can reference them when adding to the keymap (not just referencing a magic string). Problem with doing that enum is that it might be a really not-fun refactor and I'm not sure we wanna block i18n work for it.
I went ahead and created this issue for it though: #45073
There was a problem hiding this comment.
nit: place const after all imports.
There was a problem hiding this comment.
This should have a value, not use template strings:
defaultMessage: '{percentageUsed} space used',
values: {
percentageUsed
}
https://github.com/elastic/kibana/blob/master/src/dev/i18n/README.md
💔 Build Failed |
💚 Build Succeeded |
💚 Build Succeeded |
💔 Build Failed |
💚 Build Succeeded |
This reverts commit d00e48853bcb16fdb14f9bca8b2536c920e8d650.
2747510 to
27eb09a
Compare
💔 Build Failed |
|
retest |
💔 Build Failed |
💚 Build Succeeded |
…-to-np-ready * 'master' of github.com:elastic/kibana: (138 commits) [Canvas] i18n work on workpad header (and a few header CTAs) and convert to typescript (elastic#44943) update close/delete system index modals (elastic#45037) TS return type of createIndexPatternSelect (elastic#45107) [ML] Fix focus chart updating. (elastic#45146) [ML] Data frame transform: Fix progress in wizard create step. (elastic#45116) [Graph] Re-enable functional test (elastic#44683) [SIEM] unique table id for each top talkers table (elastic#45014) [SIEM] ip details heading draggable (elastic#45179) [Maps][File upload] Set complete on index pattern creation (elastic#44423) [Maps] unmount map embeddable component on destroy (elastic#45183) [SIEM] Adds error toasts to MapEmbeddable component (elastic#45088) fix redirect to maintain search query string (elastic#45184) [APM] One-line trace summary (elastic#44842) [Infra UI] Display non-metric details on Node Detail page (elastic#43551) [Maps][File upload] Removing bbox from parsed file pending upstream lib fix (elastic#45194) [Logs UI] Improve live streaming behavior when scrolling (elastic#44923) [APM] Fix indefinite loading state in agent settings for unauthorized user roles (elastic#44970) [Reporting] Rewrite addForceNowQuerystring to getFullUrls (elastic#44851) [Reporting/ESQueue] Improve logging of doc-update events (elastic#45077) [Reporting] Make screenshot capture less noisy by default (elastic#45185) ...
…ert to typescript (elastic#44943) * i18n work on workpad header and a few header ctas * Convert WorkpadHeader to typescript * String ordering cleanup * Addressing some feedback * Adding state * lint * Shortcut type refactor * Revert "Shortcut type refactor" This reverts commit d00e48853bcb16fdb14f9bca8b2536c920e8d650. * Using new State type * Removing unused type * Updating state type
…ert to typescript (#44943) (#45405) * i18n work on workpad header and a few header ctas * Convert WorkpadHeader to typescript * String ordering cleanup * Addressing some feedback * Adding state * lint * Shortcut type refactor * Revert "Shortcut type refactor" This reverts commit d00e48853bcb16fdb14f9bca8b2536c920e8d650. * Using new State type * Removing unused type * Updating state type
Summary
Converted
WorkpadHeaderto Typescript (with some adjustments to a few related components)Adding i18n strings for the following components:
WorkpadHeader(subcomponents not yet complete)AssetAssetManagerAssetModalslight modification to the embeddable flyout
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.- [ ] This was checked for cross-browser compatibility, including a check against IE11- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support- [ ] Documentation was added for features that require explanation or tutorials- [ ] Unit or functional tests were updated or added to match the most common scenarios- [ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers