Code Implementation: Optimizing Directus Components with Merging and Prop Improvements #378
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔧 Types of changes
🚨 Checklist
Title: "Code Implementation: Optimizing Directus Components with Merging and Prop Improvements"
Description
This pull request implements the proposal discussed in discussion #370 .
The following changes have been made:
Merging Directus Components: DirectusAsset and DirectusImage components have been merged into a single DirectusFiles component. This consolidation aims to improve code organization and maintainability.
Prop Improvements: To simplify transformations, I have introduced a new
Directus Transformation
prop that accepts either a preset or a custom transformation (of typestring | CustomTransformations
). I also added the filname prop. We are now on par with the directus API.I believe these changes maintain full backward compatibility, but I would like to seek your opinion before proceeding. Before merging, test cases will need to be written and thoroughly evaluated to ensure the changes function as expected.
Please review the changes and provide your valuable feedback.
Thank you for considering this pull request, and I look forward to your input before proceeding further!
😊