V14: Rename new projects (#15836)

* Rename Web.UI.New back to Web.UI

* Delete new backoffiec folder

* Rename client project

* Add new submodule

* Update template csproj

* Remove more mentions of new

* Add missing views

* Moving up the "Umbraco.Web.UI" proj reference, so that it is the first project listed in solution file (.sln) since it will be selected as startup one in VS by default.

* don't include grid

* Update with section of how to get started with backoffice

* Update .github/BUILD.md

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>

* Add line about white page

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
This commit is contained in:
Nikolaj Geisle
2024-03-12 10:17:42 +01:00
committed by GitHub
parent 69a691f315
commit 9c58714343
25 changed files with 43 additions and 83 deletions

10
.github/BUILD.md vendored
View File

@@ -13,6 +13,16 @@ If the answer is yes, please read on. Otherwise, make sure to head on over [to t
↖️ You can jump to any section by using the "table of contents" button ( ![Table of contents icon](img/tableofcontentsicon.svg) ) above.
## Getting Started:
To run umbraco, we first need to initialize the client git submodule:
* Execute `git submodule init` and then `git submodule update` to get the files into Umbraco.Web.UI.Client project
* If you are going to work on the Backoffice, you can either go to the Umbraco.Web.UI.Client folder and check out a new branch or set it up in your IDE, which will allow you to commit to each repository simultaneously:
* **Rider**: Preferences -> Version Control -> Directory Mappings -> Click the '+' sign
* If you get a white page delete Umbraco.Cms.StaticAssets\wwwroot\umbraco folder and run `npm ci && npm run build:for:cms` inside Umbraco.Web.UI.Client folder to clear out any leftover files from older versions.
### Latest version
* If you want to get the latest changes from the client repository, run `git submodule update` again which will pull the latest main branch.
## Debugging source locally

View File

@@ -1,38 +0,0 @@
# New backoffice
> **Warning**:
> This is an early WIP and is set not to be packable since we don't want to release this yet. There will be breaking changes in these projects.
This solution folder contains the projects for the new backoffice. If you're looking to fix or improve the existing CMS, this is not the place to do it, although we do very much appreciate your efforts.
### Getting Started: Management API
This branch contains the project for the new Management API as well as the new Backoffice. To get started with the Management API you should:
* Run any of the executables (Umbraco.Web.UI or Umbraco.Web.UI.New)
* Access "/umbraco/swagger" in the browser to see the Swagger interface
* The API lives in the Umbraco.Cms.Api.Management project
### Getting Started: Backoffice
To run the new Backoffice:
* Execute `git submodule init` and then `git submodule update` to get the files into Umbraco.Web.UI.New.Client project
* Run Umbraco.Web.UI.New project
* If you get a white page delete Umbraco.Cms.StaticAssets\wwwroot\umbraco folder and run `npm ci && npm run build:for:cms` inside Umbraco.Web.UI.New.Client folder to clear out any leftover files from older versions.
* If you are going to work on the Backoffice, you can either go to the Umbraco.Web.UI.New.Client folder and check out a new branch or set it up in your IDE, which will allow you to commit to each repository simultaneously:
* **Rider**: Preferences -> Version Control -> Directory Mappings -> Click the '+' sign
### Latest version
* If you want to get the latest changes from the Backoffice repository, run `git submodule update` again which will pull the latest main branch.
### Project structure
Since the new backoffice API is still very much a work in progress, we've created new projects for the new backoffice API:
* Umbrao.Cms.ManagementApi - The "presentation layer" for the management API
* "New" versions of existing projects, should be merged with the existing projects when the new API is released:
* Umbraco.Cms.Core
* Umbraco.Cms.Infrastructure
* Umbraco.Cms.Web.Common
* Umbraco.Web.UI.New
* Umbraco.Web.UI.New.Client
This also means that we have to use "InternalsVisibleTo" for the new projects since these should be able to access the internal classes since they will when they get merged.

4
.gitmodules vendored
View File

@@ -1,3 +1,3 @@
[submodule "src/Umbraco.Web.UI.New.Client"]
path = src/Umbraco.Web.UI.New.Client
[submodule "src/Umbraco.Web.UI.Client"]
path = src/Umbraco.Web.UI.Client
url = https://github.com/umbraco/Umbraco.CMS.Backoffice.git

View File

@@ -93,17 +93,17 @@ stages:
workingDirectory: src/Umbraco.Web.UI.Login
- script: npm ci --no-fund --no-audit --prefer-offline
displayName: Run npm ci (Bellissima)
workingDirectory: src/Umbraco.Web.UI.New.Client
workingDirectory: src/Umbraco.Web.UI.Client
- script: npm run generate:api-local
displayName: Generate API models (Bellissima)
workingDirectory: src/Umbraco.Web.UI.New.Client
workingDirectory: src/Umbraco.Web.UI.Client
enabled: false
- script: npm run build:for:cms
displayName: Run build (Bellissima)
workingDirectory: src/Umbraco.Web.UI.New.Client
workingDirectory: src/Umbraco.Web.UI.Client
- script: npm run build
displayName: Run Login Build (Bellissima)
workingDirectory: src/Umbraco.Web.UI.New.Client/apps/auth
workingDirectory: src/Umbraco.Web.UI.Client/apps/auth
- task: UseDotNet@2
displayName: Use .NET SDK from global.json
inputs:
@@ -142,7 +142,7 @@ stages:
displayName: Prepare Bellissima npm package
env:
PACKAGE_VERSION: $(build.NBGV_NpmPackageVersion)
workingDirectory: src/Umbraco.Web.UI.New.Client
workingDirectory: src/Umbraco.Web.UI.Client
- task: PublishPipelineArtifact@1
displayName: Publish Bellissima npm artifact
inputs:
@@ -225,26 +225,26 @@ stages:
- task: Cache@2
displayName: Cache node_modules
inputs:
key: '"npm_client" | "$(Agent.OS)"| $(Build.SourcesDirectory)/src/Umbraco.Web.UI.New.Client/package-lock.json'
key: '"npm_client" | "$(Agent.OS)"| $(Build.SourcesDirectory)/src/Umbraco.Web.UI.Client/package-lock.json'
restoreKeys: |
"npm_client" | "$(Agent.OS)"
"npm_client"
path: $(npm_config_cache)
- script: npm ci --no-fund --no-audit --prefer-offline
workingDirectory: src/Umbraco.Web.UI.New.Client
workingDirectory: src/Umbraco.Web.UI.Client
displayName: Run npm ci
- script: npm run storybook:build
displayName: Build Storybook
env:
VITE_BASE_PATH: $(BASE_PATH)/
workingDirectory: $(Build.SourcesDirectory)/src/Umbraco.Web.UI.New.Client
workingDirectory: $(Build.SourcesDirectory)/src/Umbraco.Web.UI.Client
- script: sed -i "s|/umbraco/backoffice|$(BASE_PATH)/umbraco/backoffice|" assets/*.js
displayName: Replace BASE_PATH on assets
workingDirectory: $(Build.SourcesDirectory)/src/Umbraco.Web.UI.New.Client/storybook-static
workingDirectory: $(Build.SourcesDirectory)/src/Umbraco.Web.UI.Client/storybook-static
- task: ArchiveFiles@2
displayName: Archive js Docs
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)/src/Umbraco.Web.UI.New.Client/storybook-static
rootFolderOrFile: $(Build.SourcesDirectory)/src/Umbraco.Web.UI.Client/storybook-static
includeRootFolder: false
archiveFile: $(Build.ArtifactStagingDirectory)/ui-docs.zip
- task: PublishPipelineArtifact@1

View File

@@ -31,12 +31,12 @@
</Target>
<Target Name="BuildBellissima">
<Exec WorkingDirectory="$(ProjectDir)..\Umbraco.Web.UI.New.Client\" Command="npm ci --no-fund --no-audit --prefer-offline" />
<Exec WorkingDirectory="$(ProjectDir)..\Umbraco.Web.UI.New.Client\" Command="npm run build:for:cms" />
<Exec WorkingDirectory="$(ProjectDir)..\Umbraco.Web.UI.Client\" Command="npm ci --no-fund --no-audit --prefer-offline" />
<Exec WorkingDirectory="$(ProjectDir)..\Umbraco.Web.UI.Client\" Command="npm run build:for:cms" />
</Target>
<Target Name="BuildLogin" DependsOnTargets="BuildBellissima">
<Exec WorkingDirectory="$(ProjectDir)..\Umbraco.Web.UI.New.Client\apps\auth" Command="npm run build" />
<Exec WorkingDirectory="$(ProjectDir)..\Umbraco.Web.UI.Client\apps\auth" Command="npm run build" />
<Exec WorkingDirectory="$(ProjectDir)..\Umbraco.Web.UI.Login\" Command="npm ci --no-fund --no-audit --prefer-offline" />
<Exec WorkingDirectory="$(ProjectDir)..\Umbraco.Web.UI.Login\" Command="npm run build" />
</Target>

View File

@@ -62,7 +62,7 @@
<!-- Generate JSON package schema on build (and before copying to project) -->
<Target Name="GenerateUmbracoPackageSchema" BeforeTargets="Build;CopyUmbracoJsonSchemaFiles" Condition="!Exists('$(_UmbracoCmsPackageSchemaReference)')">
<Message Text="Generating $(_UmbracoCmsPackageSchemaReference) because it doesn't exist" Importance="high" />
<Exec WorkingDirectory="$(MsBuildThisFileDirectory)..\Umbraco.Web.UI.New.Client" Command="npm run generate:jsonschema -- --out &quot;$(MSBuildThisFileDirectory)$(_UmbracoCmsPackageSchemaReference)&quot; tsconfig.json UmbracoPackage" />
<Exec WorkingDirectory="$(MsBuildThisFileDirectory)..\Umbraco.Web.UI.Client" Command="npm run generate:jsonschema -- --out &quot;$(MSBuildThisFileDirectory)$(_UmbracoCmsPackageSchemaReference)&quot; tsconfig.json UmbracoPackage" />
</Target>
<!-- Remove generated JSON package schema on clean -->

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<RootNamespace>Umbraco.Cms.Web.UI.New</RootNamespace>
<RootNamespace>Umbraco.Cms.Web.UI</RootNamespace>
<IsPackable>false</IsPackable>
<EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup>

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -13,30 +13,26 @@
</PropertyGroup>
<ItemGroup>
<Content Include="UmbracoPackage\**" Exclude="bin;obj" />
<Content Include="UmbracoPackageRcl\**" Exclude="bin;obj" />
<Content Include="UmbracoProject\**" Exclude="bin;obj" />
<Content Include="..\src\Umbraco.Web.UI.New\Program.cs">
<Content Include="..\src\Umbraco.Web.UI\Program.cs">
<Link>UmbracoProject\Program.cs</Link>
<PackagePath>UmbracoProject</PackagePath>
</Content>
<Content Include="..\src\Umbraco.Web.UI.New\Views\Partials\blocklist\**">
<Content Include="UmbracoPackage\**" Exclude="bin;obj" />
<Content Include="UmbracoPackageRcl\**" Exclude="bin;obj" />
<Content Include="UmbracoProject\**" Exclude="bin;obj" />
<Content Include="..\src\Umbraco.Web.UI\Views\Partials\blocklist\**">
<Link>UmbracoProject\Views\Partials\blocklist\%(RecursiveDir)%(Filename)%(Extension)</Link>
<PackagePath>UmbracoProject\Views\Partials\blocklist</PackagePath>
</Content>
<Content Include="..\src\Umbraco.Web.UI.New\Views\Partials\grid\**">
<Link>UmbracoProject\Views\Partials\grid\%(RecursiveDir)%(Filename)%(Extension)</Link>
<PackagePath>UmbracoProject\Views\Partials\grid</PackagePath>
</Content>
<Content Include="..\src\Umbraco.Web.UI.New\Views\Partials\blockgrid\**">
<Content Include="..\src\Umbraco.Web.UI\Views\Partials\blockgrid\**">
<Link>UmbracoProject\Views\Partials\blockgrid\%(RecursiveDir)%(Filename)%(Extension)</Link>
<PackagePath>UmbracoProject\Views\Partials\blockgrid</PackagePath>
</Content>
<Content Include="..\src\Umbraco.Web.UI.New\Views\_ViewImports.cshtml">
<Content Include="..\src\Umbraco.Web.UI\Views\_ViewImports.cshtml">
<Link>UmbracoProject\Views\_ViewImports.cshtml</Link>
<PackagePath>UmbracoProject\Views</PackagePath>
</Content>
<Content Include="..\src\Umbraco.Web.UI.New\wwwroot\favicon.ico">
<Content Include="..\src\Umbraco.Web.UI\wwwroot\favicon.ico">
<Link>UmbracoProject\wwwroot\favicon.ico</Link>
<PackagePath>UmbracoProject\wwwroot</PackagePath>
</Content>

View File

@@ -120,7 +120,7 @@ public static class UmbracoBuilderExtensions
var currFolder = new DirectoryInfo(srcFolder);
var uiProject = currFolder.GetDirectories("Umbraco.Web.UI.New", SearchOption.TopDirectoryOnly).First();
var uiProject = currFolder.GetDirectories("Umbraco.Web.UI", SearchOption.TopDirectoryOnly).First();
var mainLangFolder = new DirectoryInfo(Path.Combine(uiProject.FullName, globalSettings.Value.UmbracoPath.TrimStart("~/"), "config", "lang"));
return new LocalizedTextServiceFileSources(

View File

@@ -2,6 +2,8 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32328.378
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Web.UI", "src\Umbraco.Web.UI\Umbraco.Web.UI.csproj", "{C55CA725-9F4E-4618-9435-6B8AE05DA14D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{B5BD12C1-A454-435E-8A46-FF4A364C0382}"
ProjectSection(SolutionItems) = preProject
tests\.editorconfig = tests\.editorconfig
@@ -92,11 +94,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Templates", "templa
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Cms", "src\Umbraco.Cms\Umbraco.Cms.csproj", "{92EAA57A-CC99-4F5D-9D9C-B865293F6000}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NewBackoffice", "NewBackoffice", "{995D9EFA-8BB1-4333-80AD-C525A06FD984}"
ProjectSection(SolutionItems) = preProject
.github\New BackOffice - README.md = .github\New BackOffice - README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Cms.Api.Management", "src\Umbraco.Cms.Api.Management\Umbraco.Cms.Api.Management.csproj", "{0946531B-F06D-415B-A4E3-6CBFF5DB1C12}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Cms.Targets", "src\Umbraco.Cms.Targets\Umbraco.Cms.Targets.csproj", "{B51C10FC-FD20-451E-90DD-A117133403DF}"
@@ -153,29 +150,27 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Cms.Imaging.ImageSh
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{05878304-40EB-4F84-B40B-91BDB70DE094}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Web.UI.New", "src\Umbraco.Web.UI.New\Umbraco.Web.UI.New.csproj", "{C55CA725-9F4E-4618-9435-6B8AE05DA14D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Cms.Api.Common", "src\Umbraco.Cms.Api.Common\Umbraco.Cms.Api.Common.csproj", "{D48B5D6B-82FF-4235-986C-CDE646F41DEC}"
EndProject
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Umbraco.Web.UI.New.Client", "src\Umbraco.Web.UI.New.Client\", "{D88A926B-E8D6-495A-A2ED-8EFD0C847C62}"
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Umbraco.Web.UI.Client", "src\Umbraco.Web.UI.Client\", "{D88A926B-E8D6-495A-A2ED-8EFD0C847C62}"
ProjectSection(WebsiteProperties) = preProject
TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.8"
Debug.AspNetCompiler.VirtualPath = "/localhost_55211"
Debug.AspNetCompiler.PhysicalPath = "src\Umbraco.Web.UI.New.Client\"
Debug.AspNetCompiler.PhysicalPath = "src\Umbraco.Web.UI.Client\"
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_55211\"
Debug.AspNetCompiler.Updateable = "true"
Debug.AspNetCompiler.ForceOverwrite = "true"
Debug.AspNetCompiler.FixedNames = "false"
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.VirtualPath = "/localhost_55211"
Release.AspNetCompiler.PhysicalPath = "src\Umbraco.Web.UI.New.Client\"
Release.AspNetCompiler.PhysicalPath = "src\Umbraco.Web.UI.Client\"
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_55211\"
Release.AspNetCompiler.Updateable = "true"
Release.AspNetCompiler.ForceOverwrite = "true"
Release.AspNetCompiler.FixedNames = "false"
Release.AspNetCompiler.Debug = "False"
VWDPort = "55211"
SlnRelativePath = "src\Umbraco.Web.UI.New.Client\"
SlnRelativePath = "src\Umbraco.Web.UI.Client\"
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbraco.Cms.Api.Delivery", "src\Umbraco.Cms.Api.Delivery\Umbraco.Cms.Api.Delivery.csproj", "{9AA3D21F-81A9-4F27-85D1-CE850B59DC2D}"
@@ -388,14 +383,11 @@ Global
{9102ABDF-E537-4E46-B525-C9ED4833EED0} = {B5BD12C1-A454-435E-8A46-FF4A364C0382}
{2A5027D9-F71D-4957-929E-F7A56AA1B95A} = {05878304-40EB-4F84-B40B-91BDB70DE094}
{05C1D0C8-C592-468F-AF8F-A299B9B3A903} = {6D72A60B-0542-4AA9-A493-DD4179E838A1}
{0946531B-F06D-415B-A4E3-6CBFF5DB1C12} = {995D9EFA-8BB1-4333-80AD-C525A06FD984}
{20CE9C97-9314-4A19-BCF1-D12CF49B7205} = {E5D4B5F9-6CCE-46CE-8985-9A350445F92B}
{F2BF84D9-0A14-40AF-A0F3-B9BBBBC16A44} = {20CE9C97-9314-4A19-BCF1-D12CF49B7205}
{2B47AD9F-FFF1-448A-88F1-D4F568811738} = {F2BF84D9-0A14-40AF-A0F3-B9BBBBC16A44}
{25AECCB5-B187-4406-844B-91B8FF0FCB37} = {2B47AD9F-FFF1-448A-88F1-D4F568811738}
{EA628ABD-624E-4AF3-B548-6710D4D66531} = {2B47AD9F-FFF1-448A-88F1-D4F568811738}
{C55CA725-9F4E-4618-9435-6B8AE05DA14D} = {995D9EFA-8BB1-4333-80AD-C525A06FD984}
{D88A926B-E8D6-495A-A2ED-8EFD0C847C62} = {995D9EFA-8BB1-4333-80AD-C525A06FD984}
{A13FF0A0-69FA-468A-9F79-565401D5C341} = {B5BD12C1-A454-435E-8A46-FF4A364C0382}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution