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

[Share] Add loading state to link_content #196809

Conversation

kowalczyk-krzysztof
Copy link
Member

@kowalczyk-krzysztof kowalczyk-krzysztof commented Oct 18, 2024

Summary

This PR adds a loading state to Copy Link button in share modal.

Fixes: #194641

@kowalczyk-krzysztof kowalczyk-krzysztof added bug Fixes for quality problems that affect the customer experience Feature:SharingURLs Short URLs and Share URL features release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Oct 18, 2024
@kowalczyk-krzysztof kowalczyk-krzysztof self-assigned this Oct 18, 2024
@kowalczyk-krzysztof kowalczyk-krzysztof requested a review from a team as a code owner October 18, 2024 08:11
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

Copy link
Contributor

@Dosant Dosant left a comment

Choose a reason for hiding this comment

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

lgtm!

@@ -112,6 +114,7 @@ export const LinkContent = ({
copyToClipboard(urlToCopy);
setUrl(urlToCopy);
setTextCopied(true);
setIsLoading(false);
Copy link
Contributor

Choose a reason for hiding this comment

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

not for this pr, but looks like this funciton could benefit from error handling logic. wonder what happens if create short url request fails

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
share 57.2KB 57.2KB +53.0B

cc @kowalczyk-krzysztof

@kowalczyk-krzysztof kowalczyk-krzysztof merged commit 32dec20 into elastic:main Oct 18, 2024
33 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 18, 2024
## Summary

This PR adds a loading state to `Copy Link` button in share modal.

Fixes: elastic#194641
(cherry picked from commit 32dec20)
@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 Oct 18, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Share] Add loading state to link_content
(#196809)](#196809)

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

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

<!--BACKPORT [{"author":{"name":"Krzysztof
Kowalczyk","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-18T10:09:54Z","message":"[Share]
Add loading state to link_content (#196809)\n\n## Summary\r\n\r\nThis PR
adds a loading state to `Copy Link` button in share modal.\r\n\r\nFixes:
#194641","sha":"32dec20719f12277234d99953370a4060d4ebaac","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Feature:SharingURLs","release_note:skip","v9.0.0","Team:SharedUX","backport:prev-minor"],"title":"[Share]
Add loading state to
link_content","number":196809,"url":"https://github.com/elastic/kibana/pull/196809","mergeCommit":{"message":"[Share]
Add loading state to link_content (#196809)\n\n## Summary\r\n\r\nThis PR
adds a loading state to `Copy Link` button in share modal.\r\n\r\nFixes:
#194641","sha":"32dec20719f12277234d99953370a4060d4ebaac"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196809","number":196809,"mergeCommit":{"message":"[Share]
Add loading state to link_content (#196809)\n\n## Summary\r\n\r\nThis PR
adds a loading state to `Copy Link` button in share modal.\r\n\r\nFixes:
#194641","sha":"32dec20719f12277234d99953370a4060d4ebaac"}}]}]
BACKPORT-->

Co-authored-by: Krzysztof Kowalczyk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) bug Fixes for quality problems that affect the customer experience Feature:SharingURLs Short URLs and Share URL features release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Share] Make Share this search "Copy Link" Action Visible
4 participants