Skip to content

Commit

Permalink
[Search] Delete confirmation modal content fix (elastic#208184)
Browse files Browse the repository at this point in the history
## Summary

This PR fixes the issue described
[here](elastic/search-team#8917) where the
input label was misleading when a connector doesn't have a name. Now
this label is rendered only when it has a name, otherwise the label is
not rendered.


https://github.com/user-attachments/assets/ae53fd20-4e7a-481d-bcc0-daa5e4fe809d


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
JoseLuisGJ and elasticmachine authored Jan 24, 2025
1 parent 2812f8b commit 000d682
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,16 @@ export const DeleteConnectorModal: React.FC<DeleteConnectorModalProps> = ({
</p>
<EuiForm>
<EuiFormRow
label={i18n.translate(
'xpack.serverlessSearch.connectors.deleteModal.connectorNameInput.label',
{
defaultMessage: 'Connector name',
}
)}
label={
connectorName
? i18n.translate(
'xpack.serverlessSearch.connectors.deleteModal.connectorNameInput.label',
{
defaultMessage: 'Connector name',
}
)
: undefined
}
>
<EuiFieldText
data-test-subj="serverlessSearchDeleteConnectorModalFieldText"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { i18n } from '@kbn/i18n';
import { ConnectorIcon } from '@kbn/search-shared-ui';
import { SearchEmptyPrompt, DecorativeHorizontalStepper } from '@kbn/search-shared-ui';
import { SERVERLESS_ES_CONNECTORS_ID } from '@kbn/deeplinks-search/constants';
import { BACK_LABEL } from '../../../../common/i18n_string';
import { BACK_LABEL, COMING_SOON_LABEL } from '../../../../common/i18n_string';
import { useKibanaServices } from '../../hooks/use_kibana';
import { useConnectorTypes } from '../../hooks/api/use_connector_types';
import { useAssetBasePath } from '../../hooks/use_asset_base_path';
Expand Down Expand Up @@ -46,6 +46,7 @@ export const ElasticManagedConnectorsEmptyPrompt: React.FC = () => {
}
)}
isComingSoon
comingSoonLabel={COMING_SOON_LABEL}
body={
<EuiFlexGroup
alignItems="stretch"
Expand Down

0 comments on commit 000d682

Please sign in to comment.