Skip to content

Improve DX of creating custom Phoria Islands#26

Merged
CMeeg merged 4 commits intomainfrom
island-factory
Feb 24, 2025
Merged

Improve DX of creating custom Phoria Islands#26
CMeeg merged 4 commits intomainfrom
island-factory

Conversation

@CMeeg
Copy link
Owner

@CMeeg CMeeg commented Feb 24, 2025

  • The existing PhoriaIslandTagHelper can be used to render any Phoria Island
  • However downstream projects may want to create custom Tag Helpers or View Components that encapsulate the rendering of their specific Phoria Island components to make them feel more "integrated" with their project, consistent where they are used, ease maintenance, and to add strong typing for props
  • PhoriaIslandTagHelper can be inherited from for this purpose, but its IOC dependencies and some of the internal rendering logic would need to also be setup each time in the derived class(es), which is not something that should be the responsibility of the consumer to do and get right each time
  • A PhoriaIslandComponentFacory will be created to encapsulate the IOC dependencies and minimise the amount of code needed to create a custom Phoria Island Tag Helper or View Component
  • The PhoriaIslandComponentFactory can then be used internally by PhoriaTagHelper, and by consumers
  • Docs to be updated to show intended usage

@CMeeg CMeeg self-assigned this Feb 24, 2025
@changeset-bot
Copy link

changeset-bot bot commented Feb 24, 2025

🦋 Changeset detected

Latest commit: 8e50db2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
phoria-dotnet Patch

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

@CMeeg CMeeg merged commit f3f0e0b into main Feb 24, 2025
1 check passed
@CMeeg CMeeg deleted the island-factory branch February 24, 2025 18:52
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.

1 participant