Skip to content

Change the copy_icon to check_icon when copied#246090

Merged
saikatsarkar056 merged 12 commits intoelastic:mainfrom
saikatsarkar056:copy_action_icon_change
Dec 15, 2025
Merged

Change the copy_icon to check_icon when copied#246090
saikatsarkar056 merged 12 commits intoelastic:mainfrom
saikatsarkar056:copy_action_icon_change

Conversation

@saikatsarkar056
Copy link
Contributor

@saikatsarkar056 saikatsarkar056 commented Dec 11, 2025

Summary

This PR updates the copy behavior so that when a field is copied, the UI provides clear confirmation. The copy icon now briefly changes to a checkmark to indicate success, and then automatically switches back to the copy icon after about a second.

Screen.Recording.2025-12-12.at.9.44.03.AM.mov

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, 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
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • 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 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
  • Review the backport guidelines and apply applicable backport:* labels.

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.

Release note

Enhances the copy behavior by providing clear visual confirmation:

@saikatsarkar056 saikatsarkar056 requested a review from a team as a code owner December 11, 2025 22:45
@saikatsarkar056 saikatsarkar056 marked this pull request as draft December 11, 2025 22:46
@saikatsarkar056 saikatsarkar056 self-assigned this Dec 11, 2025
@saikatsarkar056 saikatsarkar056 marked this pull request as ready for review December 12, 2025 16:59
await testSubjects.existOrFail('endpointValueField');
});

it('shows checkmark icon feedback when copy button is clicked', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Definitely run the flakey test runner for these.

My gut reaction is these might be flakey, and this is a case where I think a unit test of the component would be better than a functional test IMO.

Copy link
Contributor

Choose a reason for hiding this comment

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

FYI, These tests are still skipped, see line 31. so adding these doesn't do anything currently.

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#10075

[✅] x-pack/solutions/search/test/functional_search/config.ts: 200/200 tests passed.

see run history

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#10076

[✅] x-pack/solutions/search/test/serverless/functional/configs/config.search_features.ts: 200/200 tests passed.

see run history

@saikatsarkar056
Copy link
Contributor Author

@elasticmachine merge upstream

await testSubjects.existOrFail('endpointValueField');
});

it('shows checkmark icon feedback when copy button is clicked', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI, These tests are still skipped, see line 31. so adding these doesn't do anything currently.

await testSubjects.existOrFail('apiKeyFormNoUserPrivileges');
});

it('shows checkmark icon feedback when copy button is clicked', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

These tests are also currently skipped, see line 33

expect(endpointValue).to.contain('https://');
});

it('shows checkmark icon feedback when copy button is clicked', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

this is the only test you added that is being run, getting started is run as a part of the feature flags config for now, and you did not run the flakey test runner for those tests.

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#10088

[✅] x-pack/solutions/search/test/functional_search/config/config.feature_flags.ts: 200/200 tests passed.

see run history

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#10089

[✅] x-pack/solutions/search/test/serverless/functional/configs/config.feature_flags.ts: 200/200 tests passed.

see run history

@saikatsarkar056 saikatsarkar056 enabled auto-merge (squash) December 15, 2025 21:28
@saikatsarkar056 saikatsarkar056 merged commit a209ccf into elastic:main Dec 15, 2025
13 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
searchGettingStarted 155.1KB 155.4KB +382.0B
searchHomepage 177.6KB 178.0KB +384.0B
searchIndices 194.1KB 194.5KB +382.0B
total +1.1KB

History

cc @saikatsarkar056

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants