-
Notifications
You must be signed in to change notification settings - Fork 4k
Improvement for CopyMarkdown action #3465
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
Conversation
🦋 Changeset detectedLatest commit: 5ce9748 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
e98855c
to
e916bd4
Compare
e916bd4
to
6dd0798
Compare
6dd0798
to
a62558f
Compare
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.
I will approve but this code is quite messy to be honest.
@gregberge I've updated the timeout, I know it's quite messy but I need to share the whole state between multiple instances (default action button + dropdown-menu item), so the goal of this PR is to fetch the markdown only once if you click multiple times on the copy button, with better loading state for default action and dropdown menu, etc |
Introduced IconWithLoading component to handle icon rendering with loading state for both Button and link variants in AIActionWrapper. Also reset copied and loading states in CopyMarkdown cleanup. This improves code reuse and UI consistency for loading indicators.
53b181b
to
39ac254
Compare
@SamyPesse @gregberge I’ve updated the code to use an LRU cache for markdown content (max 10 paths), simplified |
This pull request introduces improvements to the CopyMarkdown action in the GitBook project. The main goal of these enhancements is to optimize the functionality, improve performance, and ensure better usability for end-users.