Skip to content

Commit 21de32c

Browse files
authored
Merge pull request #41 from delegateas/patch/misc-changes-01
Minor misc changes
2 parents 49c15bb + 366dd5b commit 21de32c

16 files changed

+261
-128
lines changed

.github/workflows/release.yml

Lines changed: 43 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ on:
1414
- minor
1515
- major
1616

17-
permissions:
18-
contents: write
19-
pull-requests: write
20-
2117
jobs:
2218
release-please:
2319
runs-on: ubuntu-latest
@@ -36,13 +32,17 @@ jobs:
3632
with:
3733
node-version: '20'
3834

39-
- name: 🚀 Create Manual Release PR
35+
- name: 🚀 Create Manual Release Commit
4036
if: github.event_name == 'workflow_dispatch'
4137
id: manual_release
4238
run: |
4339
npm install -g release-please
4440
npm install semver
4541
42+
# Configure git
43+
git config --global user.name "github-actions[bot]"
44+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
45+
4646
# Get current version from manifest
4747
CURRENT_VERSION=$(cat .release-please-manifest.json | jq -r '.Website')
4848
echo "Current version: $CURRENT_VERSION"
@@ -57,19 +57,46 @@ jobs:
5757
5858
echo "Next version will be: $NEXT_VERSION"
5959
60-
# Create release PR with specific version
61-
release-please release-pr \
62-
--repo-url="https://github.com/${{ github.repository }}" \
63-
--config-file=release-please-config.json \
64-
--manifest-file=.release-please-manifest.json \
65-
--release-as=$NEXT_VERSION \
66-
--skip-labeling \
67-
--token=${{ secrets.GITHUB_TOKEN }}
68-
60+
# Update version in package.json
61+
cd Website
62+
npm version $NEXT_VERSION --no-git-tag-version
63+
cd ..
64+
65+
# Update manifest file
66+
jq --arg version "$NEXT_VERSION" '.Website = $version' .release-please-manifest.json > temp.json && mv temp.json .release-please-manifest.json
67+
68+
# Generate changelog entry
69+
echo "## [$NEXT_VERSION] - $(date +'%Y-%m-%d')" > temp_changelog.md
70+
echo "" >> temp_changelog.md
71+
echo "### Changed" >> temp_changelog.md
72+
echo "- Manual ${{ github.event.inputs.release_type }} release" >> temp_changelog.md
73+
echo "" >> temp_changelog.md
74+
75+
# Prepend to existing changelog if it exists
76+
if [ -f "Website/CHANGELOG.md" ]; then
77+
cat temp_changelog.md Website/CHANGELOG.md > temp_full_changelog.md
78+
mv temp_full_changelog.md Website/CHANGELOG.md
79+
else
80+
mv temp_changelog.md Website/CHANGELOG.md
81+
fi
82+
83+
# Commit and push changes
84+
git add .
85+
git commit -m "chore(release): release $NEXT_VERSION
86+
87+
Release type: ${{ github.event.inputs.release_type }}
88+
Previous version: $CURRENT_VERSION
89+
New version: $NEXT_VERSION"
90+
91+
git push origin HEAD
92+
6993
echo "releases_created=true" >> $GITHUB_OUTPUT
94+
echo "version=$NEXT_VERSION" >> $GITHUB_OUTPUT
7095
7196
- name: 📝 Manual Release Summary
7297
if: github.event_name == 'workflow_dispatch'
7398
run: |
74-
echo "✅ Manual release PR created with type: ${{ github.event.inputs.release_type }}"
75-
echo "🔍 Check the Pull Requests tab for the release PR to review and merge."
99+
echo "✅ Manual release commit created with type: ${{ github.event.inputs.release_type }}"
100+
echo "🏷️ New version: ${{ steps.manual_release.outputs.version }}"
101+
echo "📝 Changes have been committed and pushed to the current branch."
102+
echo "🔗 View the commit: https://github.com/${{ github.repository }}/commit/$(git rev-parse HEAD)"

Generator/MetadataExtensions.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,13 @@ private static bool StandardDescriptionHasChanged(this IEnumerable<(string Logic
5858
return EnglishDefaultFields.Concat(new[] {
5959
("statuscode", "Status Reason", $"Reason for the status of the {entityDisplayName}"),
6060
("statecode", "Status Reason", $"Status of the {entityDisplayName}"),
61+
("organizationid", "Organization", $"Unique identifier of the organization associated with the {entityDisplayName}."),
6162
});
6263
default:
6364
return EnglishDefaultFields.Concat(new[] {
6465
("statuscode", "Status Reason", $"Reason for the status of the {entityDisplayName}"),
6566
("statecode", "Status Reason", $"Status of the {entityDisplayName}"),
67+
("organizationid", "Organization", $"Unique identifier of the organization associated with the {entityDisplayName}."),
6668
}); ;
6769
}
6870
}
@@ -225,6 +227,7 @@ private static bool StandardDescriptionHasChanged(this IEnumerable<(string Logic
225227
( "utcconversiontimezonecode", "Tidszonekode til UTC-konvertering", "Den tidszonekode, der var i brug ved oprettelse af posten." ),
226228
( "utcconversiontimezonecode", "Tidszonekode for UTC-konvertering", "Den tidszonekode, der var i brug ved oprettelse af posten." ),
227229
( "versionnumber", "Versionsnummer", "Versionsnummer" ),
228-
( "versionnumber", "Versionsnummer", "Versionsnummer for aktiviteten." )
230+
( "versionnumber", "Versionsnummer", "Versionsnummer for aktiviteten." ),
231+
( "organizationid", "Organisations-id", "Entydigt id for organisationen" ),
229232
};
230233
}

Website/components/attributes/BooleanAttribute.tsx

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,49 @@
1+
import { useIsMobile } from "@/hooks/use-mobile";
12
import { BooleanAttributeType } from "@/lib/Types"
23
import { CheckCircle, Circle } from "lucide-react"
34

45
export default function BooleanAttribute({ attribute }: { attribute: BooleanAttributeType }) {
6+
7+
const isMobile = useIsMobile();
8+
59
return (
610
<div className="flex flex-col gap-1">
711
<div className="flex items-center gap-2">
8-
<span className="font-bold">Boolean</span>
9-
{attribute.DefaultValue !== null && (
10-
<span className="text-xs bg-green-100 text-green-700 px-1.5 py-0.5 rounded-full flex items-center gap-1">
11-
<CheckCircle className="w-3 h-3" />
12+
<span className="font-semibold text-xs md:font-bold md:text-sm">Boolean</span>
13+
{attribute.DefaultValue !== null && !isMobile && (
14+
<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">
15+
<CheckCircle className="w-2 h-2 md:w-3 md:h-3" />
1216
Default: {attribute.DefaultValue === true ? attribute.TrueLabel : attribute.FalseLabel}
1317
</span>
1418
)}
1519
</div>
1620
<div className="space-y-1">
17-
<div className="flex items-center justify-between py-1">
21+
<div className="flex items-center justify-between py-0.5 md:py-1">
1822
<div className="flex items-center gap-1">
1923
{attribute.DefaultValue === true ? (
20-
<CheckCircle className="w-3 h-3 text-green-600" />
24+
<CheckCircle className="w-2 h-2 text-green-600 md:w-3 md:h-3" />
2125
) : (
22-
<Circle className="w-3 h-3 text-gray-400" />
26+
<Circle className="w-2 h-2 text-gray-400 md:w-3 md:h-3" />
2327
)}
24-
<span className="text-sm">{attribute.TrueLabel}</span>
28+
<span className="text-xs md:text-sm">{attribute.TrueLabel}</span>
2529
</div>
2630
<div className="flex items-center gap-2">
27-
<span className="text-xs bg-gray-200 text-gray-700 px-1.5 py-0.5 rounded font-mono">
31+
<span className="text-xs bg-gray-200 text-gray-700 px-1 py-0.5 rounded font-mono md:px-1.5">
2832
True
2933
</span>
3034
</div>
3135
</div>
32-
<div className="flex items-center justify-between py-1">
36+
<div className="flex items-center justify-between py-0.5 md:py-1">
3337
<div className="flex items-center gap-1">
3438
{attribute.DefaultValue === false ? (
35-
<CheckCircle className="w-3 h-3 text-green-600" />
39+
<CheckCircle className="w-2 h-2 text-green-600 md:w-3 md:h-3" />
3640
) : (
37-
<Circle className="w-3 h-3 text-gray-400" />
41+
<Circle className="w-2 h-2 text-gray-400 md:w-3 md:h-3" />
3842
)}
39-
<span className="text-sm">{attribute.FalseLabel}</span>
43+
<span className="text-xs md:text-sm">{attribute.FalseLabel}</span>
4044
</div>
4145
<div className="flex items-center gap-2">
42-
<span className="text-xs bg-gray-200 text-gray-700 px-1.5 py-0.5 rounded font-mono">
46+
<span className="text-xs bg-gray-200 text-gray-700 px-1 py-0.5 rounded font-mono md:px-1.5">
4347
False
4448
</span>
4549
</div>

Website/components/attributes/ChoiceAttribute.tsx

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,62 @@
1+
import { useIsMobile } from "@/hooks/use-mobile"
12
import { ChoiceAttributeType } from "@/lib/Types"
23
import { formatNumberSeperator } from "@/lib/utils"
3-
import { CheckCircle, Circle } from "lucide-react"
4+
import { CheckCircle, Circle, Square, CheckSquare } from "lucide-react"
45

56
export default function ChoiceAttribute({ attribute }: { attribute: ChoiceAttributeType }) {
7+
8+
const isMobile = useIsMobile();
9+
610
return (
711
<div className="flex flex-col gap-1">
812
<div className="flex items-center gap-2">
9-
<span className="font-bold">{attribute.Type}-select</span>
10-
{attribute.DefaultValue !== null && attribute.DefaultValue !== -1 && (
11-
<span className="text-xs bg-green-100 text-green-700 px-1.5 py-0.5 rounded-full flex items-center gap-1">
12-
<CheckCircle className="w-3 h-3" />
13+
<span className="font-semibold text-xs md:font-bold md:text-sm">{attribute.Type}-select</span>
14+
{attribute.DefaultValue !== null && attribute.DefaultValue !== -1 && !isMobile && (
15+
<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">
16+
<CheckCircle className="w-2 h-2 md:w-3 md:h-3" />
1317
Default: {attribute.Options.find(o => o.Value === attribute.DefaultValue)?.Name}
1418
</span>
1519
)}
1620
</div>
1721
<div className="space-y-1">
1822
{attribute.Options.map(option => (
1923
<div key={option.Value}>
20-
<div className="flex items-center justify-between py-1">
24+
<div className="flex items-center justify-between py-0.5 md:py-1">
2125
<div className="flex items-center gap-2">
2226
<div className="flex items-center gap-1">
23-
{option.Value === attribute.DefaultValue ? (
24-
<CheckCircle className="w-3 h-3 text-green-600" />
27+
{attribute.Type === "Multi" ? (
28+
// For multi-select, show checkboxes
29+
option.Value === attribute.DefaultValue ? (
30+
<CheckSquare className="w-2 h-2 text-green-600 md:w-3 md:h-3" />
31+
) : (
32+
<Square className="w-2 h-2 text-gray-400 md:w-3 md:h-3" />
33+
)
2534
) : (
26-
<Circle className="w-3 h-3 text-gray-400" />
35+
// For single-select, show radio buttons
36+
option.Value === attribute.DefaultValue ? (
37+
<CheckCircle className="w-2 h-2 text-green-600 md:w-3 md:h-3" />
38+
) : (
39+
<Circle className="w-2 h-2 text-gray-400 md:w-3 md:h-3" />
40+
)
2741
)}
28-
<span className="text-sm">{option.Name}</span>
42+
<span className="text-xs md:text-sm">{option.Name}</span>
2943
</div>
3044
{option.Color && (
3145
<div
32-
className="w-3 h-3 rounded-full border border-gray-300 shadow-sm"
46+
className="w-2 h-2 rounded-full border border-gray-300 shadow-sm md:w-3 md:h-3"
3347
style={{ backgroundColor: option.Color }}
3448
title={`Color: ${option.Color}`}
3549
/>
3650
)}
3751
</div>
3852
<div className="flex items-center gap-2">
39-
<span className="text-xs bg-gray-200 text-gray-700 px-1.5 py-0.5 rounded font-mono">
53+
<span className="text-xs bg-gray-200 text-gray-700 px-1 py-0.5 rounded font-mono md:px-1.5">
4054
{formatNumberSeperator(option.Value)}
4155
</span>
4256
</div>
4357
</div>
4458
{option.Description && (
45-
<div className="text-xs text-gray-600 italic pl-6 break-words">
59+
<div className="text-xs text-gray-600 italic pl-4 break-words md:pl-6">
4660
{option.Description}
4761
</div>
4862
)}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { DateTimeAttributeType } from "@/lib/Types";
22

33
export default function DateTimeAttribute({ attribute } : { attribute: DateTimeAttributeType }) {
4-
return <><span className="font-bold">{attribute.Format}</span> - {attribute.Behavior}</>
4+
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></>
55
}

Website/components/attributes/DecimalAttribute.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ export default function MoneyAttribute({ attribute }: { attribute: DecimalAttrib
88
: FormatDecimal
99

1010
return <>
11-
<p><span className="font-bold">{attribute.Type}</span> ({formatNumber(attribute.MinValue)} to {formatNumber(attribute.MaxValue)})</p>
12-
<p>Precision: {attribute.Precision}</p>
11+
<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>
12+
<p className="text-xs md:text-sm">Precision: {attribute.Precision}</p>
1313
</>
1414
}
1515

Website/components/attributes/FileAttribute.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ import { FileAttributeType } from "@/lib/Types";
22
import { formatNumberSeperator } from "@/lib/utils";
33

44
export default function FileAttribute({ attribute } : { attribute: FileAttributeType }) {
5-
return <><span className="font-bold">File</span> (Max {formatNumberSeperator(attribute.MaxSize)}KB)</>
5+
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></>
66
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { GenericAttributeType } from "@/lib/Types";
22

33
export default function GenericAttribute({ attribute } : { attribute: GenericAttributeType }) {
4-
return <span className="font-bold">{attribute.Type}</span>
4+
return <span className="font-semibold text-xs md:font-bold md:text-sm">{attribute.Type}</span>
55
}

Website/components/attributes/IntegerAttribute.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { IntegerAttributeType } from "@/lib/Types"
22
import { formatNumberSeperator } from "@/lib/utils"
33

44
export default function IntegerAttribute({ attribute } : { attribute: IntegerAttributeType }) {
5-
return <><span className="font-bold">{attribute.Format}</span> ({FormatNumber(attribute.MinValue)} to {FormatNumber(attribute.MaxValue)})</>
5+
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></>
66
}
77

88
function FormatNumber(number: number) {

Website/components/attributes/LookupAttribute.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,26 @@ export default function LookupAttribute({ attribute }: { attribute: LookupAttrib
66

77
const { scrollToSection } = useDatamodelView();
88

9-
return <>
10-
<p className="font-bold">Lookup</p>
11-
<div className="flex flex-wrap gap-1 mt-1">
9+
return <div className="flex flex-wrap items-center gap-1 md:gap-2">
10+
<p className="font-semibold text-xs md:font-bold md:text-sm">Lookup</p>
11+
<div className="flex flex-wrap gap-1">
1212
{attribute.Targets
1313
.map(target => target.IsInSolution ?
1414
<button
1515
key={target.Name}
16-
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"
16+
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"
1717
onClick={() => scrollToSection(target.Name)}
1818
>
19-
<FileSearch className="w-3 h-3" />
20-
{target.Name}
19+
<FileSearch className="w-2 h-2 md:w-3 md:h-3" />
20+
<span className="text-xs">{target.Name}</span>
2121
</button> :
2222
<div
2323
key={target.Name}
24-
className="h-6 px-2 text-xs flex items-center gap-1 bg-gray-100 text-gray-600 rounded border"
24+
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"
2525
>
26-
<FileX2 className="w-3 h-3" />
27-
{target.Name}
26+
<FileX2 className="w-2 h-2 md:w-3 md:h-3" />
27+
<span className="text-xs">{target.Name}</span>
2828
</div>)}
2929
</div>
30-
</>
30+
</div>
3131
}

0 commit comments

Comments
 (0)