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

Create SpaServices Module #3681

Open
wants to merge 3 commits into
base: dev
from

Conversation

Projects
None yet
4 participants
@MichaelPetrinolis
Copy link
Contributor

commented May 21, 2019

This PR allows to serve a Single Page Application per tenant.
The user can bootstrap the SPA from a static file (eg.index.html) or a liquid template.
Added the SampleDataController in OrchardCore.Demo that is used by the dotnet spa templates
in order to work OOB (for someone testing the orchardcore). I also added a reference to it in OrchardCore.CMS.Web, Also added a recipe that enables the SpaServices using the static file option

@@ -14,6 +14,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\OrchardCore.Modules\OrchardCore.Demo\OrchardCore.Demo.csproj" />

This comment has been minimized.

Copy link
@sebastienros

sebastienros May 21, 2019

Member

Not an acceptable solution

<ProjectReference Include="..\..\OrchardCore\OrchardCore.ContentManagement.Display\OrchardCore.ContentManagement.Display.csproj" />
<ProjectReference Include="..\..\OrchardCore\OrchardCore.Module.Targets\OrchardCore.Module.Targets.csproj" />
<ProjectReference Include="..\..\OrchardCore\OrchardCore.Navigation.Core\OrchardCore.Navigation.Core.csproj" />
<ProjectReference Include="..\OrchardCore.Recipes\OrchardCore.Recipes.csproj" />

This comment has been minimized.

Copy link
@sebastienros

sebastienros May 21, 2019

Member

We don't reference modules from other modules

This comment has been minimized.

Copy link
@MichaelPetrinolis

MichaelPetrinolis May 22, 2019

Author Contributor

fixed the references.

MichaelPetrinolis added some commits May 22, 2019

removes Orchard Demo from CMS project
replaces reference to Recipes with Recipes.Abstractions in SpaServices
uncomment Alternates in view.cshtml
use index.html on empty StaticFile
minor changes and documentation
@agriffard

This comment has been minimized.

Copy link
Member

commented May 23, 2019

The name SpaServices could be confusing from my point of view.
It has to be clear for the user when he chooses the recipe, whose name is Headless btw.
These are a lot of various concepts and I can't really see the consistency between them.

It seems to be a one page site based on a static file and editable with a template.

@MichaelPetrinolis

This comment has been minimized.

Copy link
Contributor Author

commented May 23, 2019

The name SpaServices could be confusing from my point of view.
It has to be clear for the user when he chooses the recipe, whose name is Headless btw.

I agree, SpaServices is for developing/hosting a spa, this modules sets the homepage to the SPA.
What about OrchardCore.SPAHomepage or OrchardCore.Headless ?

These are a lot of various concepts and I can't really see the consistency between them.

It seems to be a one page site based on a static file and editable with a template.

Indeed, i thought that would be helpful to have an easy way to create a tenant and host a Single Page Application for the headless scenario. It misses a way to update the SPA from admin, but it would be easy to add this functionality.

I have tested it with oob dotnet new for angular, aurelia, react and vue and one must only set the <base href="/tenantprefix/"> in order to work. The routing works fine and it fallback to SPA on a not found result

@Skrypt

This comment has been minimized.

Copy link
Contributor

commented May 29, 2019

I was thinking. Is it obligated that we have a checkbox to enable/disable the index.html file option? Could we not just display an error message if there is no index.html or template found and if a template is found it would just take precedence on the index.html file or vice versa?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.