Add initial support for region in launcher#1131
Conversation
a10a401 to
e2aecbb
Compare
|
Only the right region is supported currently in the launcher layout. Other region could be added to the launcher layout in the future. |
andreniggemann
left a comment
There was a problem hiding this comment.
I like this approach. It's much better than the iFrame Version we discussed.
Having searched the docs for this topic I stumbled across View Components https://learn.microsoft.com/en-us/aspnet/core/mvc/views/view-components?view=aspnetcore-10.0
They seem like a natural fit.
1nf0rmagician
left a comment
There was a problem hiding this comment.
Any thought on how routing would/could be possible in the region or what would happen if anyone used it there? Or is it, that routing cannot be part of the regions themselves?
Routing was not supported in older WPF and there was never a requirement for it. It might be possible without changing the URL or using a custom tag for it. Problem with the current launcher is the "refresh" on module change. |
I don't tinkh we should handle routing because that would conflict the entire routing of the main view. so the idea is that the partial view that you are implementing don't need routing or you could use |
The plugin can also be exported as a web component and can have their own routing without embed or iframe. |
|
Important missing step: Extend documentation 📄 |
164db41 to
056889b
Compare
Currently Right Region is supported but PartialView can be decorated as plugin an the Launcher will display it on the Left/Top/Right/Bottom based on the Configuration in the Launcher.config initial
4fae44e to
a8e3ca3
Compare
a8e3ca3 to
9d5fff2
Compare
| return null; | ||
| } | ||
|
|
||
| var partialViewAssembly = ReflectionTool.GetAssemblies(); |
There was a problem hiding this comment.
Can't you use ReflectionTool.GetPublicClasses here? I know we have some more detailed filtering on the classes in there which prevented several exceptions 🙈
There was a problem hiding this comment.
I tried but couldn't find a better way, @dbeuchler also tried i think.
There was a problem hiding this comment.
The ReflectionTool provides only public classes (exported types) and does not export internals of the assembly. The razor pages are compiled as internal types only.
There was a problem hiding this comment.
The razor pages are compiled as internal types only.
Ahh ok, didn't now that. Then keep it that way 👍
…-regionitem Made RegionItem internal
Problem
There is not support right now for region/plugin in the launcher , as it used to be in the old version.
Solution
This PR adds a region/plugin support, for that couple elements where introduced:
LauncherPluginAttributedecorate a partial view to be used as plugin/region in the launcher.LauncherRegionItemdescribes the name (without extension) of the partial view associated to theLayoutPluginAttributeLauncherRegionConfigmapping class for the configuration .LauncherConfigThe launcher config file could look like this:
{ "ModuleSortIndices": [], "ExternalModules": [], "Regions": [ { "Region": "Right", "PluginName": "Hydra" } ], "ConfigState": "Valid" }Here is an image of a PartialView that was defined in the
Moryx.Shifts.Webproject and configured in the*.Launcher.Config.json, region section, to be placed o the right.Screenshot