Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
59 changes: 43 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ on:
- minor
- major

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
Expand All @@ -36,13 +32,17 @@ jobs:
with:
node-version: '20'

- name: 🚀 Create Manual Release PR
- name: 🚀 Create Manual Release Commit
if: github.event_name == 'workflow_dispatch'
id: manual_release
run: |
npm install -g release-please
npm install semver

# Configure git
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

# Get current version from manifest
CURRENT_VERSION=$(cat .release-please-manifest.json | jq -r '.Website')
echo "Current version: $CURRENT_VERSION"
Expand All @@ -57,19 +57,46 @@ jobs:

echo "Next version will be: $NEXT_VERSION"

# Create release PR with specific version
release-please release-pr \
--repo-url="https://github.com/${{ github.repository }}" \
--config-file=release-please-config.json \
--manifest-file=.release-please-manifest.json \
--release-as=$NEXT_VERSION \
--skip-labeling \
--token=${{ secrets.GITHUB_TOKEN }}

# Update version in package.json
cd Website
npm version $NEXT_VERSION --no-git-tag-version
cd ..

# Update manifest file
jq --arg version "$NEXT_VERSION" '.Website = $version' .release-please-manifest.json > temp.json && mv temp.json .release-please-manifest.json

# Generate changelog entry
echo "## [$NEXT_VERSION] - $(date +'%Y-%m-%d')" > temp_changelog.md
echo "" >> temp_changelog.md
echo "### Changed" >> temp_changelog.md
echo "- Manual ${{ github.event.inputs.release_type }} release" >> temp_changelog.md
echo "" >> temp_changelog.md

# Prepend to existing changelog if it exists
if [ -f "Website/CHANGELOG.md" ]; then
cat temp_changelog.md Website/CHANGELOG.md > temp_full_changelog.md
mv temp_full_changelog.md Website/CHANGELOG.md
else
mv temp_changelog.md Website/CHANGELOG.md
fi

# Commit and push changes
git add .
git commit -m "chore(release): release $NEXT_VERSION

Release type: ${{ github.event.inputs.release_type }}
Previous version: $CURRENT_VERSION
New version: $NEXT_VERSION"

git push origin HEAD

echo "releases_created=true" >> $GITHUB_OUTPUT
echo "version=$NEXT_VERSION" >> $GITHUB_OUTPUT

- name: 📝 Manual Release Summary
if: github.event_name == 'workflow_dispatch'
run: |
echo "✅ Manual release PR created with type: ${{ github.event.inputs.release_type }}"
echo "🔍 Check the Pull Requests tab for the release PR to review and merge."
echo "✅ Manual release commit created with type: ${{ github.event.inputs.release_type }}"
echo "🏷️ New version: ${{ steps.manual_release.outputs.version }}"
echo "📝 Changes have been committed and pushed to the current branch."
echo "🔗 View the commit: https://github.com/${{ github.repository }}/commit/$(git rev-parse HEAD)"
5 changes: 4 additions & 1 deletion Generator/MetadataExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@ private static bool StandardDescriptionHasChanged(this IEnumerable<(string Logic
return EnglishDefaultFields.Concat(new[] {
("statuscode", "Status Reason", $"Reason for the status of the {entityDisplayName}"),
("statecode", "Status Reason", $"Status of the {entityDisplayName}"),
("organizationid", "Organization", $"Unique identifier of the organization associated with the {entityDisplayName}."),
});
default:
return EnglishDefaultFields.Concat(new[] {
("statuscode", "Status Reason", $"Reason for the status of the {entityDisplayName}"),
("statecode", "Status Reason", $"Status of the {entityDisplayName}"),
("organizationid", "Organization", $"Unique identifier of the organization associated with the {entityDisplayName}."),
}); ;
}
}
Expand Down Expand Up @@ -225,6 +227,7 @@ private static bool StandardDescriptionHasChanged(this IEnumerable<(string Logic
( "utcconversiontimezonecode", "Tidszonekode til UTC-konvertering", "Den tidszonekode, der var i brug ved oprettelse af posten." ),
( "utcconversiontimezonecode", "Tidszonekode for UTC-konvertering", "Den tidszonekode, der var i brug ved oprettelse af posten." ),
( "versionnumber", "Versionsnummer", "Versionsnummer" ),
( "versionnumber", "Versionsnummer", "Versionsnummer for aktiviteten." )
( "versionnumber", "Versionsnummer", "Versionsnummer for aktiviteten." ),
( "organizationid", "Organisations-id", "Entydigt id for organisationen" ),
};
}
32 changes: 18 additions & 14 deletions Website/components/attributes/BooleanAttribute.tsx
Original file line number Diff line number Diff line change
@@ -1,45 +1,49 @@
import { useIsMobile } from "@/hooks/use-mobile";
import { BooleanAttributeType } from "@/lib/Types"
import { CheckCircle, Circle } from "lucide-react"

export default function BooleanAttribute({ attribute }: { attribute: BooleanAttributeType }) {

const isMobile = useIsMobile();

return (
<div className="flex flex-col gap-1">
<div className="flex items-center gap-2">
<span className="font-bold">Boolean</span>
{attribute.DefaultValue !== null && (
<span className="text-xs bg-green-100 text-green-700 px-1.5 py-0.5 rounded-full flex items-center gap-1">
<CheckCircle className="w-3 h-3" />
<span className="font-semibold text-xs md:font-bold md:text-sm">Boolean</span>
{attribute.DefaultValue !== null && !isMobile && (
<span className="text-xs bg-green-100 text-green-700 px-1 py-0.5 rounded-full flex items-center gap-1 md:px-1.5">
<CheckCircle className="w-2 h-2 md:w-3 md:h-3" />
Default: {attribute.DefaultValue === true ? attribute.TrueLabel : attribute.FalseLabel}
</span>
)}
</div>
<div className="space-y-1">
<div className="flex items-center justify-between py-1">
<div className="flex items-center justify-between py-0.5 md:py-1">
<div className="flex items-center gap-1">
{attribute.DefaultValue === true ? (
<CheckCircle className="w-3 h-3 text-green-600" />
<CheckCircle className="w-2 h-2 text-green-600 md:w-3 md:h-3" />
) : (
<Circle className="w-3 h-3 text-gray-400" />
<Circle className="w-2 h-2 text-gray-400 md:w-3 md:h-3" />
)}
<span className="text-sm">{attribute.TrueLabel}</span>
<span className="text-xs md:text-sm">{attribute.TrueLabel}</span>
</div>
<div className="flex items-center gap-2">
<span className="text-xs bg-gray-200 text-gray-700 px-1.5 py-0.5 rounded font-mono">
<span className="text-xs bg-gray-200 text-gray-700 px-1 py-0.5 rounded font-mono md:px-1.5">
True
</span>
</div>
</div>
<div className="flex items-center justify-between py-1">
<div className="flex items-center justify-between py-0.5 md:py-1">
<div className="flex items-center gap-1">
{attribute.DefaultValue === false ? (
<CheckCircle className="w-3 h-3 text-green-600" />
<CheckCircle className="w-2 h-2 text-green-600 md:w-3 md:h-3" />
) : (
<Circle className="w-3 h-3 text-gray-400" />
<Circle className="w-2 h-2 text-gray-400 md:w-3 md:h-3" />
)}
<span className="text-sm">{attribute.FalseLabel}</span>
<span className="text-xs md:text-sm">{attribute.FalseLabel}</span>
</div>
<div className="flex items-center gap-2">
<span className="text-xs bg-gray-200 text-gray-700 px-1.5 py-0.5 rounded font-mono">
<span className="text-xs bg-gray-200 text-gray-700 px-1 py-0.5 rounded font-mono md:px-1.5">
False
</span>
</div>
Expand Down
40 changes: 27 additions & 13 deletions Website/components/attributes/ChoiceAttribute.tsx
Original file line number Diff line number Diff line change
@@ -1,48 +1,62 @@
import { useIsMobile } from "@/hooks/use-mobile"
import { ChoiceAttributeType } from "@/lib/Types"
import { formatNumberSeperator } from "@/lib/utils"
import { CheckCircle, Circle } from "lucide-react"
import { CheckCircle, Circle, Square, CheckSquare } from "lucide-react"

export default function ChoiceAttribute({ attribute }: { attribute: ChoiceAttributeType }) {

const isMobile = useIsMobile();

return (
<div className="flex flex-col gap-1">
<div className="flex items-center gap-2">
<span className="font-bold">{attribute.Type}-select</span>
{attribute.DefaultValue !== null && attribute.DefaultValue !== -1 && (
<span className="text-xs bg-green-100 text-green-700 px-1.5 py-0.5 rounded-full flex items-center gap-1">
<CheckCircle className="w-3 h-3" />
<span className="font-semibold text-xs md:font-bold md:text-sm">{attribute.Type}-select</span>
{attribute.DefaultValue !== null && attribute.DefaultValue !== -1 && !isMobile && (
<span className="text-xs bg-green-100 text-green-700 px-1 py-0.5 rounded-full flex items-center gap-1 md:px-1.5">
<CheckCircle className="w-2 h-2 md:w-3 md:h-3" />
Default: {attribute.Options.find(o => o.Value === attribute.DefaultValue)?.Name}
</span>
)}
</div>
<div className="space-y-1">
{attribute.Options.map(option => (
<div key={option.Value}>
<div className="flex items-center justify-between py-1">
<div className="flex items-center justify-between py-0.5 md:py-1">
<div className="flex items-center gap-2">
<div className="flex items-center gap-1">
{option.Value === attribute.DefaultValue ? (
<CheckCircle className="w-3 h-3 text-green-600" />
{attribute.Type === "Multi" ? (
// For multi-select, show checkboxes
option.Value === attribute.DefaultValue ? (
<CheckSquare className="w-2 h-2 text-green-600 md:w-3 md:h-3" />
) : (
<Square className="w-2 h-2 text-gray-400 md:w-3 md:h-3" />
)
) : (
<Circle className="w-3 h-3 text-gray-400" />
// For single-select, show radio buttons
option.Value === attribute.DefaultValue ? (
<CheckCircle className="w-2 h-2 text-green-600 md:w-3 md:h-3" />
) : (
<Circle className="w-2 h-2 text-gray-400 md:w-3 md:h-3" />
)
)}
<span className="text-sm">{option.Name}</span>
<span className="text-xs md:text-sm">{option.Name}</span>
</div>
{option.Color && (
<div
className="w-3 h-3 rounded-full border border-gray-300 shadow-sm"
className="w-2 h-2 rounded-full border border-gray-300 shadow-sm md:w-3 md:h-3"
style={{ backgroundColor: option.Color }}
title={`Color: ${option.Color}`}
/>
)}
</div>
<div className="flex items-center gap-2">
<span className="text-xs bg-gray-200 text-gray-700 px-1.5 py-0.5 rounded font-mono">
<span className="text-xs bg-gray-200 text-gray-700 px-1 py-0.5 rounded font-mono md:px-1.5">
{formatNumberSeperator(option.Value)}
</span>
</div>
</div>
{option.Description && (
<div className="text-xs text-gray-600 italic pl-6 break-words">
<div className="text-xs text-gray-600 italic pl-4 break-words md:pl-6">
{option.Description}
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion Website/components/attributes/DateTimeAttribute.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DateTimeAttributeType } from "@/lib/Types";

export default function DateTimeAttribute({ attribute } : { attribute: DateTimeAttributeType }) {
return <><span className="font-bold">{attribute.Format}</span> - {attribute.Behavior}</>
return <><span className="font-semibold text-xs md:font-bold md:text-sm">{attribute.Format}</span> - <span className="text-xs md:text-sm">{attribute.Behavior}</span></>
}
4 changes: 2 additions & 2 deletions Website/components/attributes/DecimalAttribute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export default function MoneyAttribute({ attribute }: { attribute: DecimalAttrib
: FormatDecimal

return <>
<p><span className="font-bold">{attribute.Type}</span> ({formatNumber(attribute.MinValue)} to {formatNumber(attribute.MaxValue)})</p>
<p>Precision: {attribute.Precision}</p>
<p><span className="font-semibold text-xs md:font-bold md:text-sm">{attribute.Type}</span> <span className="text-xs md:text-sm">({formatNumber(attribute.MinValue)} to {formatNumber(attribute.MaxValue)})</span></p>
<p className="text-xs md:text-sm">Precision: {attribute.Precision}</p>
</>
}

Expand Down
2 changes: 1 addition & 1 deletion Website/components/attributes/FileAttribute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { FileAttributeType } from "@/lib/Types";
import { formatNumberSeperator } from "@/lib/utils";

export default function FileAttribute({ attribute } : { attribute: FileAttributeType }) {
return <><span className="font-bold">File</span> (Max {formatNumberSeperator(attribute.MaxSize)}KB)</>
return <><span className="font-semibold text-xs md:font-bold md:text-sm">File</span> <span className="text-xs md:text-sm">(Max {formatNumberSeperator(attribute.MaxSize)}KB)</span></>
}
2 changes: 1 addition & 1 deletion Website/components/attributes/GenericAttribute.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { GenericAttributeType } from "@/lib/Types";

export default function GenericAttribute({ attribute } : { attribute: GenericAttributeType }) {
return <span className="font-bold">{attribute.Type}</span>
return <span className="font-semibold text-xs md:font-bold md:text-sm">{attribute.Type}</span>
}
2 changes: 1 addition & 1 deletion Website/components/attributes/IntegerAttribute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { IntegerAttributeType } from "@/lib/Types"
import { formatNumberSeperator } from "@/lib/utils"

export default function IntegerAttribute({ attribute } : { attribute: IntegerAttributeType }) {
return <><span className="font-bold">{attribute.Format}</span> ({FormatNumber(attribute.MinValue)} to {FormatNumber(attribute.MaxValue)})</>
return <><span className="font-semibold text-xs md:font-bold md:text-sm">{attribute.Format}</span> <span className="text-xs md:text-sm">({FormatNumber(attribute.MinValue)} to {FormatNumber(attribute.MaxValue)})</span></>
}

function FormatNumber(number: number) {
Expand Down
20 changes: 10 additions & 10 deletions Website/components/attributes/LookupAttribute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ export default function LookupAttribute({ attribute }: { attribute: LookupAttrib

const { scrollToSection } = useDatamodelView();

return <>
<p className="font-bold">Lookup</p>
<div className="flex flex-wrap gap-1 mt-1">
return <div className="flex flex-wrap items-center gap-1 md:gap-2">
<p className="font-semibold text-xs md:font-bold md:text-sm">Lookup</p>
<div className="flex flex-wrap gap-1">
{attribute.Targets
.map(target => target.IsInSolution ?
<button
key={target.Name}
className="h-6 px-2 text-xs flex items-center gap-1 hover:bg-blue-50 hover:border-blue-300 border border-gray-300 rounded-md bg-white shadow-sm"
className="h-5 px-1.5 text-xs flex items-center gap-1 hover:bg-blue-50 hover:border-blue-300 border border-gray-300 rounded-md bg-white shadow-sm md:h-6 md:px-2"
onClick={() => scrollToSection(target.Name)}
>
<FileSearch className="w-3 h-3" />
{target.Name}
<FileSearch className="w-2 h-2 md:w-3 md:h-3" />
<span className="text-xs">{target.Name}</span>
</button> :
<div
key={target.Name}
className="h-6 px-2 text-xs flex items-center gap-1 bg-gray-100 text-gray-600 rounded border"
className="h-5 px-1.5 text-xs flex items-center gap-1 bg-gray-100 text-gray-600 rounded border md:h-6 md:px-2"
>
<FileX2 className="w-3 h-3" />
{target.Name}
<FileX2 className="w-2 h-2 md:w-3 md:h-3" />
<span className="text-xs">{target.Name}</span>
</div>)}
</div>
</>
</div>
}
12 changes: 6 additions & 6 deletions Website/components/attributes/StatusAttribute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ export default function StatusAttribute({ attribute }: { attribute: StatusAttrib
}, {} as Record<string, StatusOption[]>)

return (
<div className="flex flex-col gap-4">
<span className="font-bold">State/Status</span>
<div className="flex flex-col gap-2 md:gap-4">
<span className="font-semibold text-xs md:font-bold md:text-sm">State/Status</span>
{Object.entries(groupedOptions).map(([state, options]) => (
<div key={state} className="flex flex-col gap-1">
<span className="font-medium">{state}</span>
<div className="grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 pl-4">
<span className="font-medium text-xs md:text-sm">{state}</span>
<div className="grid grid-cols-[1fr_auto] gap-x-2 gap-y-1 pl-2 md:gap-x-4 md:pl-4">
{options.map(option => (
<div key={option.Value} className="contents">
<span>{option.Name}</span>
<span className="text-right">{formatNumberSeperator(option.Value)}</span>
<span className="text-xs md:text-sm">{option.Name}</span>
<span className="text-right text-xs md:text-sm">{formatNumberSeperator(option.Value)}</span>
</div>
))}
</div>
Expand Down
Loading
Loading