-
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
Porting fixes 1 #88477
Porting fixes 1 #88477
Conversation
Also updated TS types to match ent-search
@elasticmachine merge upstream |
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.
Small change regarding constants. Also, make sure your tests still pass. You can run both of these (adjust the path to match your local)
Source Row
cd ~/kibana/x-pack/plugins/enterprise_search && sh jest.sh public/applications/workplace_search/components/shared/source_row
Add Source
x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source
@@ -24,6 +24,7 @@ const SUCCESS_MESSAGE = 'Display Settings have been successfuly updated.'; | |||
|
|||
import { DetailField, SearchResultConfig, OptionValue, Result } from '../../../../types'; | |||
|
|||
export const UNASSIGNED_FIELD = 'Leave unassigned'; |
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.
Can you go ahead and create a constants.ts
file in the this folder and move this here?
x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/display_settings/constants.ts
Also, let's go ahead and add i18n to this constant. You can view the patterns here.
@yakhinvadim Looks like the tests passed. If you don't mind, just make sure you still have 100% coverage on those folders above. Those commands will give you a report |
@scottybollinger I moved both constants from logic file to a separate file. All tests are passing and coverage is 100%: |
import { i18n } from '@kbn/i18n'; | ||
|
||
export const LEAVE_UNASSIGNED_FIELD = i18n.translate( | ||
'xpack.enterpriseSearch.workplaceSearch.contentSources.displaySettingsLogic.leaveUnassignedField', |
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.
Small change here but we don't use component names in these; just a contextual path. So instead of displaySettingsLogic
, let's stick with displaySettings
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.
Gotcha, thanks! Updated in the following commit.
Please continue being vocal in comments, I feel almost blind in the codebase so far. 🙈
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.
Thanks for knocking this out and welcome to Kibana!
💚 Build SucceededMetrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
* master: (33 commits) [Security Solution][Case] Fix patch cases integration test with alerts (elastic#88311) [Security Solutions][Detection Engine] Removes duplicate API calls (elastic#88420) Fix log msg (elastic#88370) [Test] Add tag cloud visualization to dashboard in functional test for reporting (elastic#87600) removing kibana-core-ui from codeowners (elastic#88111) [Alerting] Migrate Event Log plugin to TS project references (elastic#81557) [Maps] fix zooming while drawing shape filter logs errors in console (elastic#88413) Porting fixes 1 (elastic#88477) [APM] Explicitly set environment for cross-service links (elastic#87481) chore(NA): remove mocha junit ci integrations (elastic#88129) [APM] Only display relevant sections for rum agent in service overview (elastic#88410) [Enterprise Search] Automatically mock shared logic files (elastic#88494) [APM] Disable Create custom link button on Transaction details page for read-only users [Docs] clean-up vega map reference documenation (elastic#88487) [Security Solution] Fix Timeline event details layout (elastic#88377) Change DELETE to POST for _bulk_delete to avoid incompatibility issues (elastic#87914) [Monitoring] Change cloud messaging on no data page (elastic#88375) [Uptime] clear ping state when PingList component in unmounted (elastic#88321) [APM] Consistent terminology for latency and throughput (elastic#88452) fix copy (elastic#88481) ...
* Add type Our code allows for an array but the type did not. * Add exampleResult mock * Add test-subj attrs * Remove FIXMEs for linter errors The linter was complaining when these were initially migrated, stating that a11y required all mouse events to have focus and blur events. This commit uses the hover events for those. EuiColorPicker was added in error and removing them does not disrupt the linter. * Add tests for components * Add test for router Also updates routes to use consistent syntax and remove the render prop * Use helper instead of history.push * Remove redundant resetDisplaySettingsState method Since all this does is wrap the clearFlashMessages function, we can just call it directly. Also use the new clearFlashMessages helper instead of using FlashMessageLogic directly insideof toggleFieldEditorModal * Add tests for DisplaySettings container * Fix a typo and associated tests Also adds ‘subtitleField’ that is needed in a future test * Add constants from PR to test #88477 * Add tests for DisplaySettingsLogic * Remove unused imports and use new mocks Co-authored-by: Kibana Machine <[email protected]>
Summary
This PR ports the bugfixes that were previously made in ent-search but after the code was already migrated to Kibana.
i18n and tests for changed code will be added in future PRs.