Skip to content
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

[Obs AI Assistant] Remove the copy button if there is no content to copy #199064

Merged
merged 3 commits into from
Nov 12, 2024

Conversation

viduni94
Copy link
Contributor

@viduni94 viduni94 commented Nov 5, 2024

Closes #196986

Summary

Problem

The copy button for a visualization does nothing, as there's no content to copy. When clicked on this button, a message is shown saying "Copied Message", but nothing is copied.

Solution

Remove the copy button, when there's no content to copy.

Screenshots

Before:
copy-button-on-visualization

After:

Screenshot 2024-11-05 at 5 20 17 PM

Checklist

@viduni94 viduni94 added release_note:fix Team:Obs AI Assistant Observability AI Assistant backport:version Backport to applied version labels v8.17.0 labels Nov 5, 2024
@viduni94 viduni94 requested review from sorenlouv, dgieselaar and a team November 5, 2024 22:22
@viduni94 viduni94 self-assigned this Nov 5, 2024
@viduni94 viduni94 requested a review from a team as a code owner November 5, 2024 22:22
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant)

@viduni94 viduni94 force-pushed the copy-button-updates branch from 9e7df43 to 1c4e54f Compare November 5, 2024 22:24
@viduni94 viduni94 force-pushed the copy-button-updates branch from 1c4e54f to 906e6bb Compare November 8, 2024 13:47
Copy link
Contributor

@Samiul-TheSoccerFan Samiul-TheSoccerFan left a comment

Choose a reason for hiding this comment

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

LGTM, code reviews only

@viduni94 viduni94 force-pushed the copy-button-updates branch from 906e6bb to 315dd49 Compare November 12, 2024 14:21
@viduni94 viduni94 force-pushed the copy-button-updates branch from 315dd49 to 5488566 Compare November 12, 2024 15:07
@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
observabilityAIAssistantApp 239.2KB 239.2KB +3.0B
searchAssistant 162.0KB 162.0KB +3.0B
total +6.0B

History

cc @viduni94

@viduni94 viduni94 removed the request for review from sorenlouv November 12, 2024 18:46
@viduni94 viduni94 merged commit a613277 into elastic:main Nov 12, 2024
21 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11804518774

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 12, 2024
…opy (elastic#199064)

Closes elastic#196986

## Summary

### Problem
The copy button for a visualization does nothing, as there's no content
to copy. When clicked on this button, a message is shown saying "Copied
Message", but nothing is copied.

### Solution
Remove the copy button, when there's no content to copy.

### Checklist

- [x] [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

(cherry picked from commit a613277)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Nov 12, 2024
…t to copy (#199064) (#199874)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Obs AI Assistant] Remove the copy button if there is no content to
copy (#199064)](#199064)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Viduni
Wickramarachchi","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-12T19:41:47Z","message":"[Obs
AI Assistant] Remove the copy button if there is no content to copy
(#199064)\n\nCloses
https://github.com/elastic/kibana/issues/196986\r\n\r\n##
Summary\r\n\r\n### Problem\r\nThe copy button for a visualization does
nothing, as there's no content\r\nto copy. When clicked on this button,
a message is shown saying \"Copied\r\nMessage\", but nothing is
copied.\r\n\r\n### Solution\r\nRemove the copy button, when there's no
content to copy.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"a613277a549a1be8643446bdf65517313a0c1e00","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team:Obs
AI Assistant","backport:version","v8.17.0"],"title":"[Obs AI Assistant]
Remove the copy button if there is no content to
copy","number":199064,"url":"https://github.com/elastic/kibana/pull/199064","mergeCommit":{"message":"[Obs
AI Assistant] Remove the copy button if there is no content to copy
(#199064)\n\nCloses
https://github.com/elastic/kibana/issues/196986\r\n\r\n##
Summary\r\n\r\n### Problem\r\nThe copy button for a visualization does
nothing, as there's no content\r\nto copy. When clicked on this button,
a message is shown saying \"Copied\r\nMessage\", but nothing is
copied.\r\n\r\n### Solution\r\nRemove the copy button, when there's no
content to copy.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"a613277a549a1be8643446bdf65517313a0c1e00"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199064","number":199064,"mergeCommit":{"message":"[Obs
AI Assistant] Remove the copy button if there is no content to copy
(#199064)\n\nCloses
https://github.com/elastic/kibana/issues/196986\r\n\r\n##
Summary\r\n\r\n### Problem\r\nThe copy button for a visualization does
nothing, as there's no content\r\nto copy. When clicked on this button,
a message is shown saying \"Copied\r\nMessage\", but nothing is
copied.\r\n\r\n### Solution\r\nRemove the copy button, when there's no
content to copy.\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"a613277a549a1be8643446bdf65517313a0c1e00"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Viduni Wickramarachchi <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
…opy (elastic#199064)

Closes elastic#196986

## Summary

### Problem
The copy button for a visualization does nothing, as there's no content
to copy. When clicked on this button, a message is shown saying "Copied
Message", but nothing is copied.

### Solution
Remove the copy button, when there's no content to copy.

### Checklist

- [x] [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
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
…opy (elastic#199064)

Closes elastic#196986

## Summary

### Problem
The copy button for a visualization does nothing, as there's no content
to copy. When clicked on this button, a message is shown saying "Copied
Message", but nothing is copied.

### Solution
Remove the copy button, when there's no content to copy.

### Checklist

- [x] [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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels release_note:fix Team:Obs AI Assistant Observability AI Assistant v8.17.0 v9.0.0
Projects
None yet
5 participants