Skip to content

Commit

Permalink
v1.9.0 (#1465)
Browse files Browse the repository at this point in the history
* Fix for 3.1 #1267

* Fixed 2.4/2.5 in #1267

* Setting contentAfter in SearchBox to nul until we find a better solution #1267

* Fix for 2.7 in #1267

* Fix for 2.8 in #1267

* Fix for 2.2 #1267

* Visuell oppgradering av fasevelger (#1270)

* Redesign ProjectPhase, use arrows and make dynamic

* Make callout work for new projectphases

* Responsiveness to phases with flex ++ phaseSubText placement

* Add default PhaseSubText values to 'Fase' Taxonomy

* Minor styling

* Popover content styling + finishing touches

* Minor styling

* string for Start and end arrow labels

* Linting to fix build issues

* Fix for 2.10 #1267

* Attempting to fix Build-Release.ps1 for CI

* Added RunRushCommand

* Build-Release adjustment for CI

* Build-Release.ps1: npm i @microsoft/rush@5.98.0 -g >$null 2>&1

* ColumnContextMenu is using Menu from @fluentui/react-components (later it should be refactored to be in List and shared between components)

* Fix for 3.2 #1267

* Update/Add PhaseSubText/PhaseDescription for Bygg/Anlegg and Program

* Flip icons for sorting ascending/descending to match label

* Minor adjustment [skip-ci]

* Update Prosjektinnholdskolonner + GtTag and Timelineline list columns

* Fix bug with WebPartTitle infoLabel rendering behind content

* Fix for 2.12 in #1267

* Fix for 3.4 in #1267

* ProjectInformation now loading in project status #1267

* Støtte for Usikkerhet-tiltak i Planner (#1273)

* Added ClientSideComponentId to GtRiskAction (#1273)

* Script for å legge til gruppen Porteføljeadministratorer på eksisterende prosjekter (#1275) [skip-ci]

* Visuelt løft på redigeringspanel for prosjektinformasjon (#1272) [skip-ci]

Co-authored-by: Ole Martin Pettersen <olemp@puzzlepart.com>

* Fixed an issue with state updates in RiskActionPlanner (#1273)

* ASSIST-5153: Uncomment of line 91 in script (#1276)

* Adjustments to "Globale innstillinger" view

* Sørger for at eksisterende områder får GtRiskActionPlanner (#1273) (#1278)

* CustomEditPanel som delt komponent som kan brukes av både Prosjektinformasjon og Prosjektstatus (#1279)

* Visuelt løft på paneler for redigering av visninger/kolonner (Porteføljeoversikt/Aggregerte) (#1280)

* linting deliciousness

* Added automatic chores workflow [skip-ci]

* adjustments that should trigger automatic chores

* typo in automatic_chores.yml - should trigger on releases/1.9 (for now)

* automatic_chores should run rush update

* no, rush install

* fixed typo [skip-ci]

* need to use relative import in EditPropertiesPanel [skip-ci]

* GH_TOKEN => GITHUB_TOKEN

* relative import of data in useEditPropertiesPanelSubmit [skip-ci]

* automatic_chores using AUTOMATIC_CHORES_GH_TOKEN

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/dev/.github/workflows/automatic_chores.yml.

* fixed typo in commit messsage for automatic_chores [skip-ci]

* Minor adjustments to transition and styling ProjectList/LatestProjects

* Minor bugfix

* Mulighet for søk på personer med mer på porteføljeforside (#1283)

* Add possiblity to search in arrays (manager, owners)  and tax fields

* Linting...

* Changelog

* Custom panel for Prosjektstatus (#1282)

* DetailsCallout refactored to DetailsPopover

* Fiks for 4.1 i #1267 (#1284)

* Fix for single user field sync #1267

* Fix for 2.14 #1267

* Removed caching from fetchProjectContentColumns causing issue 2.15 #1267

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/releases/1.9/.github/workflows/automatic_chores.yml.

* ProjectInformationField => EditableSPField

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/releases/1.9/.github/workflows/automatic_chores.yml.

* Fiks for 2.11 #1267 (#1285)

* Visuelt løft på prosjektstatus og matriser (#1286)

* Corrections for status fields

* Change default props

* Adjustments to toolbar button font + iconCatalog

* Use new shared Toolbar

* Add a TabList component for sections

* Add new styling to sections

* Linting...

* Adjustments to tooltip

* Make adjustments to other sections

* Update Risk matrix default colors

* Update DynamicMatrix webpart

* Edit styling for snapshot

* Linting

* linting

---------

Co-authored-by: Ole Martin Pettersen <olemp@puzzlepart.com>

* Update components overview [skip-ci]

* Update readme to norwegian [skip-ci]

* Fix for 2.6 (#1267)

* Fix tiny visual bug with Toolbar [skip-ci]

* Minor color and font-size adjustment for currentPhase [skpi-ci]

* skipfeature deployment for PortfolioExtensions and only add to hub via Templates

* Remove override -SkipFeatureDeployment parameter in Install script

* Abort mission, revert!

* Initielt custom skjema for prosjekttidslinje - ikke helt fullført (#1288)

* Use react-components

* Remove assets included with PortfolioExtensions, add to CustomActions

* Update with new guids + channel configs + SiteScripts

* Testing - Skip pre-install step

* Revert [skip-ci]

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/releases/1.9/.github/workflows/automatic_chores.yml.

* Mulig fiks for 3.7 i #1267

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/releases/1.9/.github/workflows/automatic_chores.yml.

* Fiks for 3.8 i #1267

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/releases/1.9/.github/workflows/automatic_chores.yml.

* Fiks for 3.10 i #1267

* Update packages, remove outdated preview components

* Use new MessageBar instead of Alert in shared component: UserMessage

* Visuelt løft for idémodulen

* Visuelt løft på dialog for endring av fase (#1289)

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/releases/1.9/.github/workflows/automatic_chores.yml.

* Visuelt løft og endringer på footer (#1290)

* Update Konfigurasjon page

* Add new icons to iconCatalog

* Add editorconfig to all solutions

* Update footer and buttons

* Finish install version popover

* Add tooltip to version button

* Update information in version popover

---------

Co-authored-by: Ole Martin Pettersen <olemp@puzzlepart.com>

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/releases/1.9/.github/workflows/automatic_chores.yml.

* Fiks for 3.11 fra #1267 (#1292)

* Switch PlannerTitle, planTitle first, then project title [skip-ci]

* Fiks for 3.13 fra #1267

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/releases/1.9/.github/workflows/automatic_chores.yml.

* Minor positioning change of milestones (diamond and triangles) [skip-ci]

* Use stable InfoLabel component [skip-ci]

* Fix issues with FluentProvider - Footer

* Use IdPrefixProvider for Fluent component, apply to WebPartTitle component + cleanup

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/releases/1.9/.github/workflows/automatic_chores.yml.

* Build-Release.ps1: Checking potential issues with npm run generate-site-scripts

* Reverted manifest ID for footer (was changed in PR #1290)

* Hand error loading page when no report existed ++

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/releases/1.9/.github/workflows/automatic_chores.yml.

* Bruk av UserMessage gjennom hele løsningen (#1293)

* Update UserMessage and FieldContainer component

* ColumnSearchPropertyField UserMessage adjustments

* Update UserMessages in PortfolioWebParts

* Use UserMessage instead of Alert and MessageBar (PortfolioWebParts

* ProgramWebParts

* shared-library

* ProjectInformation

* ProjectExtensions

* Use message consistency throughout solution

* Minor fix

* Another minor fix

* Redesign av Programadministrasjon (#1294)

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/releases/1.9/.github/workflows/automatic_chores.yml.

* Refaktorering av FilterPanel (#1296)

* Visuelt løft på Hjelpeinnhold (#1295)

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/releases/1.9/.github/workflows/automatic_chores.yml.

* Fiks for #998 (#1297)

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/releases/1.9/.github/workflows/automatic_chores.yml.

* Visulet løft - Programadministrasjon (#1298)

* PortfolioWebParts

* ProjectWebParts

* shared-library

* Linting....

* footer quickfix for program (helpContent)

* Fix for 4.2 #1267

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/releases/1.9/.github/workflows/automatic_chores.yml.

* Visuelt løft - Filterpanel (#1299)

* Visual overhaul - FilterPanel

* Minor change

* Use Icon component from shared

* Fix for 3.14 #1267

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/releases/1.9/.github/workflows/automatic_chores.yml.

* Fiks for #1310

* ProjectSetup._isProjectSetup() now checks if WelcomePage equals 'SitePages/ProjectHome.aspx'

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/releases/1.9/.github/workflows/automatic_chores.yml.

* Adjusted ProjectSetup._isProjectSetup() as some customers might have custom frontpage names

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/releases/1.9/.github/workflows/automatic_chores.yml.

* GtStatus*: High=>Medium=>Low

* Innføre nivå for Hjelpeinnhold (#1309)

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/releases/1.9/.github/workflows/automatic_chores.yml.

* Fix for #1312 (#1313)

* Oppdaterte lenke til Prosjektveiviseren (https://prosjektveiviseren.digdir.no) #1311 [skip-ci]

* Forbedringer tiltakshåndtering (#1317)

See #1315

* Fix for "Name cannot begin with the '&' character, hexadecimal value 0x26. Line 8, position 1143." [skip-ci]

* Program-feltnavn i programmer (#1314)

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/releases/1.9/.github/workflows/automatic_chores.yml.

* Fix for #1318

* Fix for #1341

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/releases/1.9/.github/workflows/automatic_chores.yml.

* Fix for #1339 [skip-ci]

* Update fluent ui packages and use new theme utility to match site themes

This fixes #1307

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/releases/1.9/.github/workflows/automatic_chores.yml.

* Adjustment to lighter portion of fluent ui theme

* Add missing "Lenker" list with links

* Minor fix - GtLinkUrl

* Fix for #1322 og #1324 [skip-ci]

* Fix for #1336 [skip-ci]

* Fix for #1335 [skip-ci]

* Fix for #1320

* Fix for #1326, #1327 og #1325

* Fix for #1300

* Fix for #1331

* Fix for #1303

* Fix for #1333

* Fix issues with 'Datakilder' list

* Fix hardcoded url in Konfigurasjon page

* Fix for #1332

* Fix for #1308

* Fix for #1343

* Fix for #1305

* Fix locale for Program and Portfolio

* Prosjektforsiden blir nå vist når prosjektoppsett er ferdig (#1351)

* automatic chores: linting [skip-ci]

This is a commit done by the GitHub action https://github.com/Puzzlepart/prosjektportalen365/blob/releases/1.9/.github/workflows/automatic_chores.yml.

* Fiks for programtidslinje (#1352)

* Footer skal også vises for medlemmer (#1353)

* NoCrawl="true" for Prosjektdata (#1354)

* Fiks for GtRiskAction (#1357)

* Fix for #1363

* Update workflows

* Correct main channel component id's

* Fix for #1368

* Add title to links list so that UpdateBehavior skip works [skip-ci]

* Add missing string to ProgramWebParts [skip-ci]

* Aggregated list/fields changes cleanup

* Fix grammar for function comments [skip-ci]

* Minor cleanup [skip-ci]

* Translate dev guides to norgwegian + cleanup [skip-ci]

* Update Readmes

* Update README.md

* Update README.md

* Fix missing title in ProgramAdministration webpart

* Updated changelog with all new additions, improvements and fixes

* Update and init 1.9.0 release notes [skip-ci]

* Add smoketest issue template [test]

* Minor update to 1.9.0 releasenotes

* Fix problem with componentId for ideaProcessing

* Update releasenotes for 1.9.0 [skip-ci]

* Finish 1.9.0 visual overhaul release notes [skip-ci]

* Update all old photos from release notes + update footer section [skip-ci]

* Finish releasenotes for 1.9.0 [skip-ci]

* Add idea module related content to Projectportal configuration page

* Update version for shared package to 1.9.0.0 [test]

* CI [upgrade-all-sites-to-latest]

* Fix for #1390 [skip-ci]

* Add EnsureFooterExtension [upgrade-all-sites-to-latest]

* Disable various features for aggregated webpart [upgrade-all-sites-to-latest]

set as isParentProject

* Fix for #1416 [skip-ci]

* Fix issues with Program aggregated webparts for updating columns/views

* Add missing data source [skip-ci]

* Fix UpgradeAllSitesToLatest - aggregated webparts [skip-ci]

* Add missing locale strings for ProgramWebParts (aggregated overviews ++)

* Update scripts to ensure program aggregation webparts have the correct setup for 1.9.0 [skip-ci]

This had to be done due to deprecated data sources still in use

* Add additonal missing locale strings for ProgramWebParts + fixes to strings in PortfolioWebParts

* Even more locale strings missing from ProgramWebParts

* Another one...

* Update JsonTemplates for Program and Parent

* CI [test]

* Fix problems with Program/aggregated functionality for creating columns/views and changing order ++

* Linting...

* Move shared functions for Portfolio/Aggregating to shared PortalDataService [skip-install]

* Rework logic for adding columns to data sources

also fix bugs regarding creating/editing columns

* Fix problem with deleting columns from aggregated webparts + cleanup and improvements [skip-ci]

* Fix issues creating/deleting columns from Program aggregated lists

* Fix for issue where a published statusreport wasn't indicated as published top right [skip-ci]

* Fix issues with missing data i 'Økonomi' statussection #1419 #1380

* Fix for #1400

* Fix problems with creating columns in portfoliowebpart [skip-ci]

* Fix problem creating columns from PortfolioOverview webpart (Program) [skip-ci]

* Additional locale strings ++

* Fix problems with FluentProvider styling not working properly for all components

* Fix issue with PortfolioWebParts crashing [skip-ci]

* Fix RiskActionPlanner script when upgrading + various templates changes [skip-ci]

* Minor fix to smoketest issue template [skip-ci]

* Rework some of the functionality to deactivate ability to move hidden columns in EditViewColumnsPanel

Also add additonal aria's

* Always show uncategorized ProjectContentColumns for all aggregated categories

* Fix issues where users could change view while waiting for a newly changed view

* Fix for #1418 [skip-install]

* Properly hide 'SiteTitle' columns from project level aggregated views [skip-ci]

* Fix for #1443

* Fix for #1449

* Fix for #1397

* Fix for #1453

* Add message in FilterPanel if it is empty #1444

* Fix for #1403 [skip-ci]

* Actual fix for #1403

* Fix for #1393 [skip-ci]

* Fix for #1411 [skip-ci]

* Fix for #1384 [skip-ci]

* Partial fix for #1399 [skip-ci]

* Fix for #1424

* Fix issue with Project admin roles not working properly #1420

* Partial fix for #1454

* Adjustments to required fields and logic in EditPanels for PortfolioWebParts [skip-install]

* Remove mentions in changelog and releasenotes for #1225 as this doesn't work [skip-ci]

To be fixed/added in 1.9.0

* Fix for #1454

* Update build-release to include test channel build [skip-ci]

* Temporary disable of Add and Edit columns from overviews/aggregated webparts [skip-ci]

* Linting after merge [skip-ci]

---------

Co-authored-by: Ole Martin Pettersen <olemp@puzzlepart.com>
Co-authored-by: trondoe <trondoe@puzzlepart.com>
Co-authored-by: github-automatic-chores <github-automatic-chores@users.noreply.github.com>
  • Loading branch information
4 people authored Feb 7, 2024
1 parent 79276c2 commit f2726c9
Show file tree
Hide file tree
Showing 1,459 changed files with 65,926 additions and 375,298 deletions.
2 changes: 1 addition & 1 deletion .README
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@

[[load:readme/5-Vedlikehold.md]]

[[load:readme/6-Utvikling.md]]
[[load:readme/6-Utvikling.md]]
231 changes: 11 additions & 220 deletions .development-guide/.README
Original file line number Diff line number Diff line change
@@ -1,236 +1,27 @@
[[template:logo]] [[template:description]]

<details>
<summary>📖 Table of Contents</summary>
<summary>📖 Innholdsfortegnelse</summary>
<br />
[[ template:toc ]]
</details>

## Site Design / Site Scripts
[[load:.development-guide/1-Site_Design_Site_Scripts.md]]

Everything related to the site design and the corresponding site scripts reside in the folder **SiteScripts**.
[[load:.development-guide/2-JS_Provisioning_Template.md]]

The source files are found in the **src** folder.
[[load:.development-guide/3-Templates.md]]

## JS Provisioning Template
[[load:.development-guide/4-NPM.md]]

Not everything we want to do is available with site designs, so we're also using [sp-js-provisioning](https://github.com/Puzzlepart/sp-js-provisioning). Please note that we're using the Puzzlepart fork from **pnp**.
[[load:.development-guide/5-Building_New_Release.md]]

With our PnP content templates (see **3.2.2**) we're provisioning a default template. The default templates for our supported languages are built from the source file [_JsonTemplate.json](../Templates/_JsonTemplate.json).
[[load:.development-guide/6-Continuous_Integration.md]]

Please note the **Parameters** object.
[[load:.development-guide/7-Creating_New_Release.md]]

```json
{
"Parameters": {
"ProvisionSiteFields": "Kolonner for Prosjektportalen (Prosjekt)",
"ProjectContentTypeId": "0x0100805E9E4FEAAB4F0EABAB2600D30DB70C",
"ProjectStatusContentTypeId": "0x010022252E35737A413FB56A1BA53862F6D5"
}
}
```
[[load:.development-guide/8-Versioning.md]]

| Parameter | Description |
| -------------------------- | ------------------------------------------------------------------------------------- |
| ProvisionSiteFields | The site fields in this group will be copied to the project site during provisioning. |
| ProjectContentTypeId | Content type ID for the Project properties content type |
| ProjectStatusContentTypeId | Content type ID for the Project status content type |
[[load:.development-guide/9-Channels.md]]

In addition to the parameters specified in [Standardmal.txt](../Templates/Portfolio/Prosjektmaler/Standardmal.txt), there's also the following parameters:

| Parameter | Description |
| ---------- | ------------------------------------------------------------------------------------- |
| TermSetIds | An map of term set fields and term set id. Used to override the default term set ids. |

Say you'd like to use the term set with ID **54da9f47-c64e-4a26-80f3-4d3c3fa1b7b2** for project phase. The internal field name for project phase is **GtProjectPhase**. With the default template, the **Parameters** object would look like this:

```json
{
"Parameters": {
"ProvisionSiteFields": "Kolonner for Prosjektportalen (Prosjekt)",
"ProjectContentTypeId": "0x0100805E9E4FEAAB4F0EABAB2600D30DB70C",
"ProjectStatusContentTypeId": "0x010022252E35737A413FB56A1BA53862F6D5",
"TermSetIds": {
"GtProjectPhase": "54da9f47-c64e-4a26-80f3-4d3c3fa1b7b2"
}
}
}
```

## Templates

### JSON provisioning template

At the root level of the **Templates** folder, the following files are found:

| File/Folder | Description |
| ------------------------------- | --------------------------------------------------------------------------------------------- |
| `Clean-Resx.ps1` | Script to remove unused **.resx** resources |
| `Find-FieldUsage.ps1` | Script to find field usage |
| `Get-ComponentProperties.ps1` | Script to get component properties from `<pnp:ClientSidePage>` instances |
| `Encode-JSON.ps1` | Script to take the content of a JSON file, encode and minfiy at, and store it in a `.txt`file |
| `Search-Resx.ps1` | Script to search for unused **.resx** resources |
| `tasks/generateResxJson.js` | Node script to generate a JSON representation of the **.resx** files |
| `tasks/generateJsonTemplate.js` | Node script to generate JSON templates for each language |
| `_JsonTemplate.json` | JSON project template |

#### Building JSON templates

When doing changes to the JSON template the npm task `watch` can be used. This watches `_JsonTemplate.json` and builds localized version of this to the corresponding Content template.

Resources from the **.resx** files in the folder Portfolio can be used in the template using `{{tokens}}`.

**Example:**

```json
{
"ID": "0x0100A87AE71CBF2643A6BC9D0948BD2EE897",
"Name": "{{ContentTypes_Uncertainty_Name}}",
"Description": "",
"Group": "{{ContentTypes_Group}}"
}
```

### PnP templates

In addition we have two PnP provisioning templates.

| Template | Description |
| ----------------------------------- | ---------------- |
| [Portfolio](../Templates/Portfolio) | Portfolio assets |
| [Taxonomy](../Templates/Taxonomy) | Taxonomy |

#### Portfolio

| File/Folder | Description |
| ------------------ | -------------------------------------------------------------- |
| Objects | PnP assets. See https://github.com/pnp/PnP-Provisioning-Schema |
| SiteAssets | Files to be uploaded to SiteAssets |
| Portfolio.xml | Main template file |
| `Resources.*.resx` | Resource files |

#### Content templates

Content templates are found in the **Content** folder. The name of the template follows the following pattern:

`Portfolio_content.{language_code}.xml`
`Portfolio_content_BA.{language_code}.xml`

`language_code` can be for example **no-NB** or **en-US**.

The templates contains the JSON template(s), planner tasks and phase checklist items.

## NPM

The SharePoint Framework solutions are published to `npm` independently.

- [@Shared](https://www.npmjs.com/package/pp365-shared)
- [ProjectWebParts](https://www.npmjs.com/package/pp365-projectwebparts)
- [ProjectExtensions](https://www.npmjs.com/package/pp365-projectextensions)
- [PortfolioWebParts](https://www.npmjs.com/package/pp365-portfoliowebparts)
- [ProgramWebParts](https://www.npmjs.com/package/pp365-programwebparts)
- [PortfolioExtensions](https://www.npmjs.com/package/pp365-portfolioextensions)

## Building a new release

To build a new release make sure your on the `main` branch and in sync with **origin**.

Run the PowerShell script `Build-Release.ps1` located in the `Install` directory:

```powershell
./Install/Build-Release.ps1
```

The installation package should be found in the release folder.

## Building only PnP templates

To only build PnP templates make sure your on the `main` branch and in sync with **origin**.

Run the PowerShell script `Build-Release.ps1` located in the `Install` directory:

```powershell
./Install/Build-Release.ps1 -SkipBuildSharePointFramework
```

The PnP templates should be found in the release folder.

## Continuous integration

We have set up continuous integration using GitHub actions.

[![CI (dev)](https://github.com/Puzzlepart/prosjektportalen365/actions/workflows/ci-dev.yml/badge.svg?branch=dev)](https://github.com/Puzzlepart/prosjektportalen365/actions/workflows/ci-dev.yml)

Keywords can be used in the commit message to avoid (or force) the CI running some of the jobs.

- `[skip-ci]` to avoid the _Build release package_ job starting. This will result in no jobs starting as the _Upgrade_ and _Install_ jobs are dependent on the job _Build release package_
- `[skip-upgrade]` to avoid the _Uprade_ job starting. This will also skip the _Install_ job as it's dependent on _Upgrade_
- `[skip-install]` to avoid the _Install_ job starting.
- `[upgrade-all-sites-to-latest]` to run script `UpgradeAllSitesToLatest.ps1` in CI mode

### Build and install (dev)

[ci-releases](../.github/workflows/ci-releases.yml) builds a new release on _push_ to **releases/***.

It runs [Build-Release.ps1](../Install/Build-Release.ps1) with `-CI` param, then runs [Install.ps1](../Install/Install.ps1) (also with `-CI` param, this time with a encoded string consisting of the username and password, stored in a GitHub secret). The URL to install to is stored in the GitHub secret `CI_DEV_TARGET_URL`.

With the current approach, with no cache (as it runs `npm ci`), a full run takes about 25-35 minutes.

![image-20201121133532960](assets/image-20201121133532960.png)

### Build release (main)

[build-release](../.github/workflows/build-release.yml) builds a new release package on **push** to **main**.

## Creating a new release

For creating a new release, we have two options: Minor and patch. New minor version should be created when there is new functionality of interest to users, while patch versions can be created often with bug fixes, adjustments and minimal functional improvements.

Increasing the version number is done by npm scripts. This is done on the dev-branch when the functionality currently in dev is deemed ready for release.


### Patch-release
```powershell
npm version patch
git push --tags
```

### Minor-release
```powershell
npm version minor
git push --tags
```

Then create a Pull Request to merge `dev` into `main`. The output from GitHub Actions will include a release package that can be shared as a release on GitHub. No manual build required.

## Versioning

After updating the version using `npm version patch` or `npm version minor` the task `tasks/automatic-versioning.js` are run. This synchronizes versions across the solution.

This `automatic-versioning.js` task can also be run as a **npm script** outside the `postversion` event.

```powershell
npm run sync-version
```

After the `sync-version` script has been run, it is important to publish the SharePointFramework packages (@Shared, PortfolioWebParts, etc...) to npm.

This is done for each package by running the following script:

```powershell
npm install; npm run build; npm publish;
```

If you have to update and use a package under development add a temp tag:

```powershell
npm install; npm run build; npm publish --tag temp;
```

N.B.: To be able to publish you must sign in with an account that has access to the packages at [npmjs](https://www.npmjs.com)

## README generation

READMEs are automatically generated using [@appnest/readme](https://github.com/andreasbm/readme). The main README is generated from [.README](../.README) while this README is generated from [.README](.README). The generation is configured with the `blueprint.json` files.

For the main [README.md)[../README.md] generation, the different parts are included from the [readme](../readme) folder at root level.
[[load:.development-guide/10-README_Generation.md]]
5 changes: 5 additions & 0 deletions .development-guide/1-Site_Design_Site_Scripts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Site Design / Site Scripts

Alt som er relatert til `site design` og tilhørende `site scripts` befinner seg i mappen **SiteScripts**.

Kildefilene finnes i mappen **src**.
5 changes: 5 additions & 0 deletions .development-guide/10-README_Generation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## README generering

README er automatisk generert ved hjelp av [@appnest/readme](https://github.com/andreasbm/readme). Hoved README er generert fra [.README](../.README) mens denne er generert fra [.README](.README). Generering konfigureres med `blueprint.json` filene.

For hoved [.README](../.README) generering er de forskjellige delene inkludert fra [readme](../readme) mappen på rot nivå.
44 changes: 44 additions & 0 deletions .development-guide/2-JS_Provisioning_Template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## JS Provisjoneringsmal

Ikke alt vi ønsker å gjøre er tilgjengelig med `site design`, så vi bruker også [sp-js-provisioning](https://github.com/Puzzlepart/sp-js-provisioning). Vær oppmerksom på at vi bruker `Puzzlepart-branch` fra **pnp**.

Med våre PnP-innholdsmaler (se **3.2.2**) setter vi opp en standardmal. Standardmalene for våre støttede språk er bygget fra kildefilen [_JsonTemplate.json](../Templates/_JsonTemplate.json).

Vennligst merk **Parameters**-objektet.

```json
{
"Parameters": {
"ProvisionSiteFields": "Kolonner for Prosjektportalen (Prosjekt)",
"ProjectContentTypeId": "0x0100805E9E4FEAAB4F0EABAB2600D30DB70C",
"ProjectStatusContentTypeId": "0x010022252E35737A413FB56A1BA53862F6D5"
}
}
```

| Parameter | Beskrivelse |
| -------------------------- | ------------------------------------------------------------------------------------------- |
| ProvisionSiteFields | Feltene på nettstedet i denne gruppen vil bli kopiert til prosjektnettstedet under oppsett. |
| ProjectContentTypeId | Innholdstype-ID for egenskapsinnholdstypen for prosjektet |
| ProjectStatusContentTypeId | Innholdstype-ID for innholdstypen for prosjektstatus |

I tillegg til parameterne som er spesifisert i [Standardmal.txt](../Templates/Portfolio/Prosjektmaler/Standardmal.txt), er det også følgende parametere:

| Parameter | Beskrivelse |
| ---------- | ----------------------------------------------------------------------------------------- |
| TermSetIds | Et kart over termsettfelt og termsett-ID. Brukes til å overstyre standard termsett-ID-er. |

Si at du vil bruke termsettet med ID-en **54da9f47-c64e-4a26-80f3-4d3c3fa1b7b2** for prosjektfase. Det interne feltnavnet for prosjektfasen er **GtProjectPhase**. Med standardmalen ville **Parameters**-objektet se slik ut:

```json
{
"Parameters": {
"ProvisionSiteFields": "Kolonner for Prosjektportalen (Prosjekt)",
"ProjectContentTypeId": "0x0100805E9E4FEAAB4F0EABAB2600D30DB70C",
"ProjectStatusContentTypeId": "0x010022252E35737A413FB56A1BA53862F6D5",
"TermSetIds": {
"GtProjectPhase": "54da9f47-c64e-4a26-80f3-4d3c3fa1b7b2"
}
}
}
```
62 changes: 62 additions & 0 deletions .development-guide/3-Templates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
## Maler

### JSON-provisjonmal

På rotnivået i mappen **Maler** finner du følgende filer:

| Fil/Mappe | Beskrivelse |
| ------------------------------- | -------------------------------------------------------------------------------------------- |
| `Clean-Resx.ps1` | Skript for å fjerne ubrukte **.resx**-ressurser |
| `Find-FieldUsage.ps1` | Skript for å finne bruk av felt |
| `Get-ComponentProperties.ps1` | Skript for å hente komponentegenskaper fra `<pnp:ClientSidePage>`-instanser |
| `Encode-JSON.ps1` | Skript for å ta innholdet av en JSON-fil, kode og minimere det, og lagre det i en `.txt`-fil |
| `Search-Resx.ps1` | Skript for å søke etter ubrukte **.resx**-ressurser |
| `tasks/generateResxJson.js` | Node-skript for å generere en JSON-representasjon av **.resx**-filene |
| `tasks/generateJsonTemplate.js` | Node-skript for å generere JSON-maler for hver språk |
| `_JsonTemplate.json` | JSON-prosjektmal |

#### Bygging av JSON-maler

Ved endringer i JSON-malen kan npm-oppgaven `watch` brukes. Den overvåker `_JsonTemplate.json` og bygger lokalversjon av dette til den tilsvarende innholdsmalen.

Ressurser fra **.resx**-filene i mappen "Portfolio" kan brukes i malen ved å bruke `{{tokens}}`.

**Eksempel:**

```json
{
"ID": "0x0100A87AE71CBF2643A6BC9D0948BD2EE897",
"Name": "{{ContentTypes_Uncertainty_Name}}",
"Description": "",
"Group": "{{ContentTypes_Group}}"
}
```

### PnP-maler

I tillegg har vi to PnP-provisjonsmaler.

| Mal | Beskrivelse |
| ----------------------------------- | ------------------- |
| [Portfolio](../Templates/Portfolio) | Porteføljeelementer |
| [Taxonomy](../Templates/Taxonomy) | Taksonomi |

#### Portefølje

| Fil/Mappe | Beskrivelse |
| ------------------ | ---------------------------------------------------------------- |
| Objects | PnP-elementer. Se https://github.com/pnp/PnP-Provisioning-Schema |
| SiteAssets | Filer som skal lastes opp til SiteAssets |
| Portfolio.xml | Hovedmal-fil |
| `Resources.*.resx` | Ressursfiler |

#### Innholdsmaler

Innholdsmaler finnes i mappen **Innhold**. Navnet på malen følger følgende mønster:

`Portfolio_content.{language_code}.xml`
`Portfolio_content_BA.{language_code}.xml`

`language_code` kan for eksempel være **no-NB** eller **en-US**.

Malene inneholder JSON-mal(er), oppgaver for planleggeren og elementer for sjekkliste for faser.
10 changes: 10 additions & 0 deletions .development-guide/4-NPM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## NPM

SharePoint Framework-løsninger publiseres uavhengig til `npm`.

- [PortfolioWebParts](https://www.npmjs.com/package/pp365-portfoliowebparts)
- [PortfolioExtensions](https://www.npmjs.com/package/pp365-portfolioextensions)
- [ProgramWebParts](https://www.npmjs.com/package/pp365-programwebparts)
- [ProjectWebParts](https://www.npmjs.com/package/pp365-projectwebparts)
- [ProjectExtensions](https://www.npmjs.com/package/pp365-projectextensions)
- [shared-library](https://www.npmjs.com/package/pp365-shared-library)
13 changes: 13 additions & 0 deletions .development-guide/5-Building_New_Release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Bygge en ny utgivelse

For å lage en ny Prosjektportalen utgivelse, forsikre deg om at du er på `main` branch og synkronisert med **origin**.

Kjør PowerShell-skriptet `Build-Release.ps1` som ligger i `Install`-mappen:

```powershell
./Install/Build-Release.ps1
# For å kun bygge PnP-maler, bruk parameteren -SkipBuildSharePointFramework
```

Installasjonspakken skal finnes i utgivelsesmappen.
Loading

0 comments on commit f2726c9

Please sign in to comment.