Skip to content

Add initial support for region in launcher#1131

Merged
1nf0rmagician merged 7 commits intodevfrom
feat/launcher-region
Mar 3, 2026
Merged

Add initial support for region in launcher#1131
1nf0rmagician merged 7 commits intodevfrom
feat/launcher-region

Conversation

@MathoMathiasCamara
Copy link
Contributor

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:

  • LauncherPluginAttribute decorate a partial view to be used as plugin/region in the launcher.
  • LauncherRegionItem describes the name (without extension) of the partial view associated to the LayoutPluginAttribute
  • LauncherRegionConfig mapping class for the configuration .
  • Added a new property Regions to LauncherConfig

The 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.Web project and configured in the *.Launcher.Config.json, region section, to be placed o the right.

Screenshot

AnimationRegion

@MathoMathiasCamara
Copy link
Contributor Author

Only the right region is supported currently in the launcher layout. Other region could be added to the launcher layout in the future.

Copy link
Contributor

@andreniggemann andreniggemann left a comment

Choose a reason for hiding this comment

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

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.

Copy link
Member

@1nf0rmagician 1nf0rmagician left a comment

Choose a reason for hiding this comment

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

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?

@dbeuchler
Copy link
Member

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.

@MathoMathiasCamara
Copy link
Contributor Author

MathoMathiasCamara commented Feb 27, 2026

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?

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 embed or iframe inside your partial view to point to a module if you need routing just look the external module feature.

@dbeuchler
Copy link
Member

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?

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 embed or iframe inside your partial view to point to a module if you need routing just look the external module feature.

The plugin can also be exported as a web component and can have their own routing without embed or iframe.

@dbeuchler
Copy link
Member

Important missing step: Extend documentation 📄

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
@MathoMathiasCamara MathoMathiasCamara changed the title Draft: Add initial support for region in launcher Add initial support for region in launcher Feb 27, 2026
return null;
}

var partialViewAssembly = ReflectionTool.GetAssemblies();
Copy link
Member

Choose a reason for hiding this comment

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

Can't you use ReflectionTool.GetPublicClasses here? I know we have some more detailed filtering on the classes in there which prevented several exceptions 🙈

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried but couldn't find a better way, @dbeuchler also tried i think.

Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Member

@1nf0rmagician 1nf0rmagician Mar 2, 2026

Choose a reason for hiding this comment

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

The razor pages are compiled as internal types only.

Ahh ok, didn't now that. Then keep it that way 👍

1nf0rmagician
1nf0rmagician previously approved these changes Mar 2, 2026
@1nf0rmagician 1nf0rmagician merged commit 482ae0f into dev Mar 3, 2026
20 of 22 checks passed
@1nf0rmagician 1nf0rmagician deleted the feat/launcher-region branch March 3, 2026 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants