-
Notifications
You must be signed in to change notification settings - Fork 87
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
Kraken UI improvements #3150
base: master
Are you sure you want to change the base?
Kraken UI improvements #3150
Conversation
Reviewer's Guide by SourceryThis pull request introduces several UI improvements to the Kraken extension creation modal, including a copy configuration feature and a JSON editor for managing extension permissions. It also updates the settings loading mechanism in the cable guy service to include a version number in the settings root. The copy configuration feature allows users to easily copy the extension's configuration as JSON to the clipboard, while the JSON editor provides a more user-friendly interface for managing JSON data. The settings loading mechanism update ensures that the settings root includes a version number. Sequence diagram for copying extension configurationsequenceDiagram
participant User
participant ExtensionCreationModal
participant Clipboard
User->>ExtensionCreationModal: Clicks 'Copy configuration'
ExtensionCreationModal->>ExtensionCreationModal: Retrieves extension configuration
ExtensionCreationModal->>ExtensionCreationModal: Formats configuration as JSON
ExtensionCreationModal->>Clipboard: copyToClipboard(jsonString)
alt Success
Clipboard-->>ExtensionCreationModal: Returns success
ExtensionCreationModal->>ExtensionCreationModal: Sets copySuccess to true
ExtensionCreationModal-->>User: Visual feedback (e.g., checkmark)
else Failure
Clipboard-->>ExtensionCreationModal: Returns failure
ExtensionCreationModal-->>User: Visual feedback (e.g., error message)
end
Sequence diagram for pasting extension configurationsequenceDiagram
participant User
participant ExtensionCreationModal
User->>ExtensionCreationModal: Pastes JSON configuration
ExtensionCreationModal->>ExtensionCreationModal: handlePaste(event)
ExtensionCreationModal->>ExtensionCreationModal: Parses JSON
alt Valid Configuration
ExtensionCreationModal->>ExtensionCreationModal: Updates form data
ExtensionCreationModal-->>User: Form fields updated
else Invalid Configuration
ExtensionCreationModal->>ExtensionCreationModal: Logs error
ExtensionCreationModal-->>User: No change
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
9ec54f3
to
c00b7ba
Compare
c00b7ba
to
0803c3b
Compare
* @param text - The text to copy to clipboard | ||
* @returns Promise<boolean> indicating if the copy operation succeeded | ||
*/ | ||
export const copyToClipboard = async (text: string): Promise<boolean> => { |
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.
You can put this util on cosmo.ts
. And check if is using HTTP just override the navigator.clipboard
with the fallback implementation, otherwise will be a secure context and copy will be available by default.
Summary by Sourcery
Improve the Kraken extension management UI. Add a copy config button to the extension creation/edit modal, and replace the permissions text area with a JSON editor. Add a version field to network interface settings. Introduce a clipboard utility function.
Enhancements: