-
Notifications
You must be signed in to change notification settings - Fork 0
Version 1.0.0 #1
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
base: main
Are you sure you want to change the base?
Conversation
…dules, hooks, components, and editor config
- Add webhook endpoint to handle ImageKit file creation events - Create webhook service to process and import files into Strapi - Add frontend functionality to trigger imports from media library - Support importing both main files and their format versions (thumbnails, small, medium, large) - Add comprehensive error handling and user notifications - Use direct database queries for better compatibility with Strapi 5 - Include metadata and format associations during import
- Add new media library read permission - Update permissions system to support media library access - Add translations for the new permission - Register permission in the bootstrap process - Update menu item to require the new permission - Organize settings permissions under a subcategory
Renamed the `isPrivate` setting to `useSignedUrls` across the codebase to better reflect its purpose of enabling signed URLs. This change affects settings forms, schemas, types, and service implementations, making the functionality more intuitive.
- Added `isPrivateFile` toggle in upload options to mark files as private in ImageKit - Enhanced URL generation to respect expiry settings for signed URLs - Fixed upload service to properly handle private file settings - Improved error handling in the upload provider - Updated translations for the new private file option - Ensured consistent behavior between upload and URL generation
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.
Pull Request Overview
This pull request introduces version 1.0.0 of the Strapi ImageKit Provider by enhancing the admin panel integration, adding configuration and documentation files, and providing new hooks and error handling modules. Key updates include new admin UI components (like ImageKitLogo, Initializer, and Field), refined HTTP error handling through a custom HttpError class and useHTTP hook, and comprehensive documentation and configuration improvements.
Reviewed Changes
Copilot reviewed 69 out of 69 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
admin/src/index.ts | Sets up menu links, settings sections, and plugin registration. |
admin/src/hooks/useHttp.ts | Introduces a custom HTTP hook for API calls with error handling. |
admin/src/errors/HttpError.ts | Implements a custom error class for HTTP errors. |
admin/src/components/* | Provides new reusable admin UI components with styling and icons. |
README.md | Updates documentation to reflect plugin usage and setup details. |
Various config files (.editorconfig, .prettierrc, etc.) | Introduces various configuration setups for code consistency. |
super(); | ||
this.message = message; |
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.
Consider calling super(message) instead of super() in the HttpError constructor so that the built-in Error object properly captures and displays the error message.
super(); | |
this.message = message; | |
super(message); |
Copilot uses AI. Check for mistakes.
xmlns="http://www.w3.org/2000/svg" | ||
{...props} | ||
ref={ref} | ||
fill={'#c0c0cf'} |
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.
The hardcoded fill color overrides the fill prop provided by the component. Consider using the fill variable to allow customization via the component's props.
fill={'#c0c0cf'} | |
fill={fill} |
Copilot uses AI. Check for mistakes.
- Moved URL transformation logic from bootstrap to register.ts - Implemented using Strapi's built-in sanitizer system - Added proper type safety with Model and Data types - Improved client caching with clearImageKitClient function - Removed response decorator in favor of sanitizer approach - Enhanced transformation handling for image formats
- Removed unused clearImageKitClient function - Added uploadOptions to toUploadParams for more flexible file uploads
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.
Pull Request Overview
This pull request introduces foundational improvements including new configuration, documentation updates, and new admin interface components for the ImageKit plugin.
- Added standardized configuration files such as .editorconfig and .prettierrc
- Updated documentation with a comprehensive README, CONTRIBUTING guidelines, and LICENSE
- Implemented new admin interface components and hooks to enhance plugin functionality
Reviewed Changes
Copilot reviewed 69 out of 69 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
admin/src/index.ts | Plugin registration with menu link, settings section and translation registration |
admin/src/hooks/useHttp.ts | New HTTP hook implementation for API interactions using error handling |
admin/src/errors/HttpError.ts | Custom HttpError class for enhanced HTTP error details |
admin/src/components/** | New and styled React components including Initializer, ImageKitLogo, Field, etc. |
Various configuration and documentation files | Added config files and updated project documentation for improved consistency and clarity |
super(); | ||
this.message = message; |
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.
Consider calling super(message) instead of super() so that the Error object is properly initialized with the provided error message.
super(); | |
this.message = message; | |
super(message); |
Copilot uses AI. Check for mistakes.
This pull request introduces several foundational updates to the project, including configuration files for development standards, documentation updates, and new components for the admin interface. These changes aim to enhance project maintainability, improve developer experience, and provide a better user interface for the plugin.
Development Environment and Configuration Updates
.editorconfig
: Added a configuration file to standardize code formatting across editors, including settings for indentation, line endings, and character encoding..eslintignore
and.prettierignore
: Ignoreddist
andcoverage
directories for linting and formatting. [1] [2].nvmrc
: Specified Node.js versionv20.13.0
for consistent development environments..prettierrc
: Configured Prettier with rules for line endings, tab width, and trailing commas..vscode/settings.json
: Added workspace settings for consistent formatting and TypeScript preferences..yarnrc.yml
: Configured Yarn to use thenode-modules
linker for dependency management.Documentation Enhancements
CONTRIBUTING.md
: Added contribution guidelines, including setup instructions, code style requirements, and pull request best practices.LICENSE
: Added an MIT license to define the terms of use for the project.README.md
: Overhauled the documentation with installation instructions, configuration details, and usage examples for the ImageKit Strapi plugin.Admin Interface Components
admin/src/components/Code.tsx
: Introduced a styledcode
component for displaying inline code snippets.admin/src/components/Field.tsx
: Added a reusableField
component with error handling and translated labels.admin/src/components/HeaderLink.tsx
andHintLink.tsx
: Created styled components for header and hint links with consistent spacing and font sizes. [1] [2]admin/src/components/ImageKitLogo.tsx
: Added an SVG component for the ImageKit logo, supporting custom properties.admin/src/components/Initializer.tsx
: Implemented an initializer component to register the plugin with the admin panel.Error Handling and Utilities
admin/src/errors/HttpError.ts
: Defined a customHttpError
class for handling HTTP errors with optional response details.admin/src/hooks/index.ts
: Exported hooks, such asuseHttp
, for consistent API interactions.