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

Docs: Toolkit extensibility #317

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

marcel-rbro
Copy link
Collaborator

Response to #238 (comment) in #238

@marcel-rbro marcel-rbro requested a review from a team as a code owner December 2, 2024 17:23
@marcel-rbro marcel-rbro marked this pull request as draft December 3, 2024 13:23
Comment on lines +6 to +8
- [Field migrations](#Customize field migrations)
- [Widget migrations](#Customize widget migrations)
- [Widget property migrations](#Customize widget property migrations)
Copy link
Contributor

Choose a reason for hiding this comment

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


You can see a sample: [SampleWidgetMigration.cs](./CommunityMigrations/SampleWidgetMigration.cs)

After implementing the migration, you need to [register the migration](#Register migrations) in the system.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do these link really work? I am not sure whether this is the correct format of the section link but in preview it seems to be broken.

- [File selector migration](./DefaultMigrations/WidgetFileMigration.cs)

After implementing the migration, you need to [register the migration](#Register migrations) in the system.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do these link really work? I am not sure whether this is the correct format of the section link but in preview it seems to be broken.

- implement `MigrateValue` where goal is to return new migrated value derived from `object? sourceValue`
- finally register in `Migration.Tool.Extensions/ServiceCollectionExtensions.cs` as `Transient` dependency into service collection. For example `services.AddTransient<IFieldMigration, AssetMigration>()`

## Custom class mappings for page types
Copy link
Contributor

Choose a reason for hiding this comment

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

IMHO the examples for custom class mappings are helpful as well. It contains real scenario samples based on which we have implemented this extension module. Would it be possible to mention custom class mapping scenarios in the new version? Or at least keep the link to Migration.Tool.Extensions/ClassMappings/ClassMappingSample.cs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants