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

Remove v8, build on Mac and update to v15 #48

Merged
merged 28 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e0132c8
Kill v8
CarlSargunar Sep 6, 2024
64ff011
Remove multi-targeting for now
CarlSargunar Sep 6, 2024
ec5fa81
Remove more multi-targeting
CarlSargunar Sep 6, 2024
ef1aab7
Update v9 -> v13
CarlSargunar Oct 6, 2024
697f909
Merge branch 'develop' into feature/build-on-mac
CarlSargunar Oct 7, 2024
686344b
Project update
CarlSargunar Oct 7, 2024
5a4db7b
Merge remote-tracking branch 'origin/feature/build-on-mac' into featu…
CarlSargunar Oct 7, 2024
e34ccef
DB Connection for v13 switched to sqlite
CarlSargunar Oct 7, 2024
fcadaed
Merge branch 'develop' into feature/build-on-mac
CarlSargunar Jan 7, 2025
5dc0ba5
Rename everything to v13 and v15 - everything builds!
CarlSargunar Jan 7, 2025
4ed4c04
clean
CarlSargunar Jan 7, 2025
c8aff5d
Build steps updated with new path
CarlSargunar Jan 7, 2025
7ef969b
more references to v14
CarlSargunar Jan 7, 2025
ee92e45
update Cms to v15
CarlSargunar Jan 7, 2025
d814e74
Startup fix
CarlSargunar Jan 7, 2025
ee41433
Restructure example sites
ronaldbarendse Feb 5, 2025
70adca7
Update mentions of samples to examples and clean up files
ronaldbarendse Feb 5, 2025
e222dab
Add global.json and nuget.config
ronaldbarendse Feb 6, 2025
1430a35
Use CPM and global package references
ronaldbarendse Feb 6, 2025
7cddef7
Use RCL and client assets restore/build MSBuild targets
ronaldbarendse Feb 6, 2025
b99d860
Update NPM and NuGet packages, fix v15 client code
ronaldbarendse Feb 6, 2025
f385f44
Set version to '3.0.0-alpha'
ronaldbarendse Feb 6, 2025
a314d79
Update GitHub Actions
ronaldbarendse Feb 6, 2025
504cfc7
Update Microsoft.ICU.ICU4C.Runtime package reference in v13 example site
ronaldbarendse Feb 6, 2025
2051262
Update NPM package lock file
ronaldbarendse Feb 6, 2025
4b7077c
Include a readme to show how to get started with the example projects
Rockerby Feb 7, 2025
148d638
Add dev readme to the Examples folder in the sln file
Rockerby Feb 7, 2025
b9483de
Add info about troubleshooting to the readme
Feb 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 17 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,50 @@ name: Build
on:
push:
branches:
- master
- main
- develop
- support/*
tags:
- v*
pull_request:
branches:
- master
- main
- develop
- support/*
workflow_call:

env:
DOTNET_NOLOGO: true
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
PROJECT: ./src/Our.Umbraco.UiExamples/Our.Umbraco.UiExamples.csproj
OUTPUT: ./dist
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages

jobs:
build:
name: Build
runs-on: windows-latest
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Cache NuGet packages
uses: actions/cache@v1
- uses: actions/setup-dotnet@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
cache: true
cache-dependency-path: '**/package-lock.json'

- name: Restore
run: dotnet restore ${{ env.PROJECT }} --locked-mode
run: dotnet restore --locked-mode

- name: Build
run: dotnet build ${{ env.PROJECT }} -c Release -p:ContinuousIntegrationBuild=true --no-restore

- name: Setup UmbPack
run: dotnet tool install --tool-path $(Split-Path ${{ env.PROJECT }}) Umbraco.Tools.Packages
run: dotnet build --configuration Release --property:ContinuousIntegrationBuild=true --no-restore

- name: Pack
run: dotnet pack ${{ env.PROJECT }} -c Release -o ${{ env.OUTPUT }} --no-restore --no-build
run: dotnet pack --configuration Release --no-restore --no-build --output ./artifacts/

- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: packages
path: ${{ env.OUTPUT }}
path: ./artifacts/
16 changes: 6 additions & 10 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ on:
description: 'The prerelease tag to apply on the release branch (if any). If not specified, any existing prerelease tag will be removed.'
required: false
default: ''
type: choice
options:
- ''
- 'beta'
- 'rc'
type: string
versionIncrement:
description: 'Overrides the versionIncrement setting set in version.json for determining the next version of the current branch.'
required: false
Expand All @@ -31,11 +27,11 @@ env:
jobs:
prepare-release:
name: Prepare release
runs-on: windows-latest
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -45,14 +41,14 @@ jobs:
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'

- name: Setup Nerdbank.GitVersioning
run: dotnet tool install --tool-path . nbgv
run: dotnet tool install nbgv --tool-path ./artifacts/

- name: Prepare release
run: |
if ("${{ github.event.inputs.versionIncrement }}") {
./nbgv prepare-release ${{ github.event.inputs.tag }} -p src --versionIncrement ${{ github.event.inputs.versionIncrement }}
./artifacts/nbgv prepare-release ${{ github.event.inputs.tag }} --versionIncrement ${{ github.event.inputs.versionIncrement }}
} else {
./nbgv prepare-release ${{ github.event.inputs.tag }} -p src
./artifacts/nbgv prepare-release ${{ github.event.inputs.tag }}
}

- name: Push commit (and new branch)
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ env:
jobs:
publish-release:
name: Publish release
runs-on: windows-latest
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -25,10 +25,10 @@ jobs:
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'

- name: Setup Nerdbank.GitVersioning
run: dotnet tool install --tool-path . nbgv
run: dotnet tool install nbgv --tool-path ./artifacts/

- name: Tag release
run: ./nbgv tag -p src
run: ./artifacts/nbgv tag

- name: Push git tags
run: git push --tags
20 changes: 3 additions & 17 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,16 @@ env:
jobs:
build:
name: Build
uses: umbraco/UI-Examples/.github/workflows/build.yml@master
uses: umbraco/UI-Examples/.github/workflows/build.yml@${GITHUB_REF}

publish:
name: Publish
needs: build
runs-on: windows-latest
runs-on: ubuntu-latest

steps:
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: packages

- name: Get Umbraco package file name
id: get_package
run: echo "::set-output name=PACKAGE::$(Get-Item *.zip | Select-Object -First 1 -ExpandProperty Name)"

- name: Setup UmbPack
if: steps.get_package.outputs.PACKAGE
run: dotnet tool install --tool-path . Umbraco.Tools.Packages

- name: Push to Our.Umbraco
if: steps.get_package.outputs.PACKAGE
run: ./umbpack push ${{ steps.get_package.outputs.PACKAGE }} -k ${{ secrets.OURUMBRACO_API_KEY }} -a *
uses: actions/download-artifact@v4

- name: Push to NuGet
run: dotnet nuget push *.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,7 @@ FodyWeavers.xsd
**/Media/**
!**/Media/Web.config

# Ignore the copied App_Plugins folder
samples/*/App_Plugins/uiexamples/*
/samples/Umbraco14.Website/App_Plugins

/samples/Umbraco14.Website/App_Plugins/Example.UI
# Ignore the copied App_Plugins folder and appsettings-schema.json files
/examples/*/App_Plugins/**
/examples/*/appsettings-schema.json
/examples/*/appsettings-schema.*.json
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ If you want to add more UI examples to this package, please [raise an issue](./i

## Working locally
Open the solution file `UI Examples.sln` in Visual Studio. You will see three projects:
- `Our.Umbraco.UiExamples` is the main project containing the files that you will be working with
- `Umbraco8.Website` is an Umbraco v8 test site
- `Umbraco9.Website` is an Umbraco v9 test site
- `Umbraco14.Website` is an Umbraco v14 test site
- `Our.Umbraco.UiExamples.v13` is the main project containing the files that you will be working with for v13
- `Our.Umbraco.UiExamples.v15` is the main project containing the files that you will be working with for v15
- `Umbraco13.Website` is an Umbraco v13 LTS test site
- `Umbraco15.Website` is an Umbraco v15 STS test site

Steps to get the test sites working:
- Build the solution
Expand All @@ -15,7 +15,7 @@ Steps to get the test sites working:
- Username: [email protected]
- Password: 1234567890

For v14 you will also need to run `npm ci` within the `src\Our.Umbraco.UiExamples.v14` directory, and then `npm run dev` to start the development batch job. This will copy the files from the package into `samples\Umbraco14.Website` ready to see in the backoffice.
For v115 you will also need to run `npm ci` within the `src\Our.Umbraco.UiExamples.v15` directory, and then `npm run dev` to start the development batch job. This will copy the files from the package into `examples\Umbraco15.Website` ready to see in the backoffice.

## Making changes
The files you will be working on are in the `App_Plugins` folder in the main `Our.Umbraco.UiExamples` project. Changed files need to be copied into the test websites so you can confirm they work, which is automatically done when building the test websites (using a MSBuild target).
Expand Down
20 changes: 20 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<Title>Umbraco UI Examples</Title>
<Description>A collection of backoffice elements designed to help Umbraco developers extend the backoffice.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageTags>umbraco ui examples</PackageTags>
<RepositoryUrl>https://github.com/umbraco/UI-Examples</RepositoryUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
</PropertyGroup>
<PropertyGroup>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<GitVersionBaseDirectory>$(MSBuildThisFileDirectory)</GitVersionBaseDirectory>
</PropertyGroup>
</Project>
10 changes: 10 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<!-- Global packages (private, build-time packages for all projects) -->
<ItemGroup>
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.7.115" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Umbraco UI Examples
> [!IMPORTANT]
> Hey you! Are you looking to get involved in development of the Umbraco 14 version? Head over to the [issues tagged with Umbraco 14](https://github.com/umbraco/UI-Examples/issues?q=is%3Aissue+is%3Aopen+label%3A%22Umbraco+14%22) ripe for the picking.
> Hey you! Are you looking to get involved in development of the Umbraco 14 version? Head over to the [issues tagged with Umbraco 15](https://github.com/umbraco/UI-Examples/issues?q=is%3Aissue+is%3Aopen+label%3A%22Umbraco+15%22) ripe for the picking.

UI Examples is a package that adds a new 'UI Examples' section to your Umbraco instance with working examples of how to customise the backoffice. During installation the Administrators user group will be given access to the section.

Expand Down
45 changes: 24 additions & 21 deletions UI Examples.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,38 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{318FCC8D-7A91-4CAB-BA56-DBDC730BD532}"
ProjectSection(SolutionItems) = preProject
examples\README.md = examples\README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco13.Website", "examples\Umbraco13.Website\Umbraco13.Website.csproj", "{7C6C2FFA-25A4-4CC4-9AA1-49B2DFB68DFC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco15.Website", "examples\Umbraco15.Website\Umbraco15.Website.csproj", "{D9B26368-94C2-4A90-B84C-506411254F9D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6C66805F-8D60-40A9-AD57-856E38793846}"
ProjectSection(SolutionItems) = preProject
.gitattributes = .gitattributes
.gitignore = .gitignore
.github\workflows\build.yml = .github\workflows\build.yml
CONTRIBUTING.md = CONTRIBUTING.md
.github\workflows\prepare-release.yml = .github\workflows\prepare-release.yml
.github\workflows\publish-release.yml = .github\workflows\publish-release.yml
.github\workflows\publish.yml = .github\workflows\publish.yml
Directory.Build.props = Directory.Build.props
Directory.Packages.props = Directory.Packages.props
global.json = global.json
nuget.config = nuget.config
README.md = README.md
src\version.json = src\version.json
version.json = version.json
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Our.Umbraco.UiExamples", "src\Our.Umbraco.UiExamples\Our.Umbraco.UiExamples.csproj", "{027820BF-156B-476F-A7AF-2E6A747D292E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Our.Umbraco.UiExamples.v13", "src\Our.Umbraco.UiExamples.v13\Our.Umbraco.UiExamples.v13.csproj", "{027820BF-156B-476F-A7AF-2E6A747D292E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbraco8.Website", "samples\Umbraco8.Website\Umbraco8.Website.csproj", "{278F12BA-8B25-46AE-8BB0-A0B9AB50EEA4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco9.Website", "samples\Umbraco9.Website\Umbraco9.Website.csproj", "{7C6C2FFA-25A4-4CC4-9AA1-49B2DFB68DFC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco14.Website", "samples\Umbraco14.Website\Umbraco14.Website.csproj", "{D9B26368-94C2-4A90-B84C-506411254F9D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Our.Umbraco.UiExamples.v14", "src\Our.Umbraco.UiExamples.v14\Our.Umbraco.UiExamples.v14.csproj", "{E99F9B42-9A45-4008-8BD7-002444460335}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Our.Umbraco.UiExamples.v15", "src\Our.Umbraco.UiExamples.v15\Our.Umbraco.UiExamples.v15.csproj", "{E99F9B42-9A45-4008-8BD7-002444460335}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{027820BF-156B-476F-A7AF-2E6A747D292E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{027820BF-156B-476F-A7AF-2E6A747D292E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{027820BF-156B-476F-A7AF-2E6A747D292E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{027820BF-156B-476F-A7AF-2E6A747D292E}.Release|Any CPU.Build.0 = Release|Any CPU
{278F12BA-8B25-46AE-8BB0-A0B9AB50EEA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{278F12BA-8B25-46AE-8BB0-A0B9AB50EEA4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{278F12BA-8B25-46AE-8BB0-A0B9AB50EEA4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{278F12BA-8B25-46AE-8BB0-A0B9AB50EEA4}.Release|Any CPU.Build.0 = Release|Any CPU
{7C6C2FFA-25A4-4CC4-9AA1-49B2DFB68DFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7C6C2FFA-25A4-4CC4-9AA1-49B2DFB68DFC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C6C2FFA-25A4-4CC4-9AA1-49B2DFB68DFC}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -48,6 +43,10 @@ Global
{D9B26368-94C2-4A90-B84C-506411254F9D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D9B26368-94C2-4A90-B84C-506411254F9D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D9B26368-94C2-4A90-B84C-506411254F9D}.Release|Any CPU.Build.0 = Release|Any CPU
{027820BF-156B-476F-A7AF-2E6A747D292E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{027820BF-156B-476F-A7AF-2E6A747D292E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{027820BF-156B-476F-A7AF-2E6A747D292E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{027820BF-156B-476F-A7AF-2E6A747D292E}.Release|Any CPU.Build.0 = Release|Any CPU
{E99F9B42-9A45-4008-8BD7-002444460335}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E99F9B42-9A45-4008-8BD7-002444460335}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E99F9B42-9A45-4008-8BD7-002444460335}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -56,6 +55,10 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{7C6C2FFA-25A4-4CC4-9AA1-49B2DFB68DFC} = {318FCC8D-7A91-4CAB-BA56-DBDC730BD532}
{D9B26368-94C2-4A90-B84C-506411254F9D} = {318FCC8D-7A91-4CAB-BA56-DBDC730BD532}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FE8099F5-7725-409F-A884-D50A8747C561}
EndGlobalSection
Expand Down
17 changes: 17 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Getting started with the examples

To get started, open the `UI Examples.sln` file in the root and run one of the websites within the `Examples` folder.

The project will boot into an empty Umbraco site. Navigate to the backoffice and user the credentials in the `appsettings.json` to login.

You will see a new section for `UI Examples` which contains the work from the `Our.Umbraco.UiExamples.v13` and `Our.Umbraco.UiExamples.v15` in their respective sites.

## Making changes

Both projects will automatically compile and bring the assets into the example sites when building.

**Quicker dev in v15** can be acheived by opening the `Our.Umbraco.UiExamples.v15` in the command line/terminal and running the `npm run dev` command (make sure to either build or run `npm ci` first to install node dependencies).

## Troubleshooting

If you receive errors about node commands during build, make sure that you have the correct version of node installed (22.12.0 at the time of writing). You can also try running the command that outputs directly in the command line/terminal to get a more verbose reason.
32 changes: 32 additions & 0 deletions examples/Umbraco13.Website/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using Microsoft.AspNetCore.Builder;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Extensions;

WebApplicationBuilder builder = WebApplication.CreateBuilder(args);

builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddDeliveryApi()
.AddComposers()
.Build();

WebApplication app = builder.Build();

await app.BootUmbracoAsync();


app.UseUmbraco()
.WithMiddleware(u =>
{
u.UseBackOffice();
u.UseWebsite();
})
.WithEndpoints(u =>
{
u.UseInstallerEndpoints();
u.UseBackOfficeEndpoints();
u.UseWebsiteEndpoints();
});

await app.RunAsync();
Loading