oqtane / oqtane.framework

CMS & Application Framework for Blazor & .NET MAUI
http://www.oqtane.org
MIT License
1.84k stars 529 forks source link

[ENH] Load Resources for Headless components #4500

Closed leigh-pointer closed 2 weeks ago

leigh-pointer commented 1 month ago

Oqtane Info

Version - 5.2.0 Render Mode - Static Interactivity - Server Database - SQL Server

Describe the enhancement

I am currently working with a module that can be extended through control libraries. To facilitate this, I have configured the packages to run in a headless mode, which has been functioning as expected.

However, I’ve encountered a situation where a component that inherits from ModuleControlBase and overrides the List Resources property does not load the resources as anticipated during runtime. While the property is successfully invoked, the resources specified are not being loaded.

Anything else?

sbwalker commented 1 month ago

I believe this is a duplicate of #4257 ie. resource for components which are nested inside of a module or theme component are not currently processed by Oqtane

sbwalker commented 1 month ago

@leigh-pointer could you please provide more information... the idea behind "headless" modules is that they do not have any razor components (ie. no UI) - which means that they should not inherit from ModuleControlBase.

leigh-pointer commented 1 month ago

@sbwalker Extension of DynamicForm Module via Headless Method I concur with the approach, but I'd like to elaborate on my experience. I'm currently utilizing the Headless method to extend the DynamicForm module. This method has recently introduced its own SDK, which facilitates the creation of components that can enhance the Toolbox functionality. Observations and Challenges The implementation works exceptionally well, particularly for Resources. However, while the workaround is effective, it doesn't feel entirely seamless. This is understandable given the complexity of the system. Positive Outcomes The ability to extend the framework is undoubtedly a significant advantage. Moreover, the capacity to further extend an existing extension is particularly exciting and opens up new possibilities for customization and functionality. Future Considerations As we continue to work with this method, it may be beneficial to explore ways to make the workaround feel more integrated and fluid. This could potentially enhance the overall user experience and development process.

image

sbwalker commented 2 weeks ago

closing as a duplicate - as the issue related to loading resources in embedded components is already recorded in #4257