Skip to content

Commit

Permalink
Merge branch 'main' into bose/2721
Browse files Browse the repository at this point in the history
  • Loading branch information
BorghildSelle committed Jan 21, 2025
2 parents 7765084 + f3d5923 commit 5728684
Show file tree
Hide file tree
Showing 95 changed files with 2,077 additions and 2,205 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dataset-backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ jobs:
pnpm sanity dataset export ${{ matrix.dataset }} ${{ env.BUILD_ARTIFACT_PATH }}/${{ matrix.dataset }}.tar.gz
- name: Upload backup.tar.gz
id: upload-backup
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: backup-tarball
name: backup-tarball-${{ matrix.dataset}}
path: ${{ env.BUILD_ARTIFACT_PATH }}/${{ matrix.dataset }}.tar.gz
# Fails the workflow if no files are found; defaults to 'warn'
if-no-files-found: error
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/equinor-algolia-indexers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
popd
- name: Package Azure Function release build
id: package-artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ vars.AZ_ALGOLIA_FUNC_APP_NAME }}
path: ${{ env.BUILD_ARTIFACT_PATH }}
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
# Fetch published code
- name: Download Azure function release build
id: download-artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
name: ${{ vars.AZ_ALGOLIA_FUNC_APP_NAME }}
path: ${{ env.BUILD_ARTIFACT_PATH }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/fotoware-redirect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Package Azure Function release build
id: package-artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ vars.AZ_FOTOWARE_FUNC_APP_NAME }}
path: ${{ env.BUILD_ARTIFACT_PATH }}
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
# Fetch published code
- name: Download Azure function release build
id: download-artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
name: ${{ vars.AZ_FOTOWARE_FUNC_APP_NAME }}
path: ${{ env.BUILD_ARTIFACT_PATH }}
Expand Down
2 changes: 1 addition & 1 deletion sanityv3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@types/react-dom": "^18.0.5",
"@types/styled-components": "^5.1.26",
"eslint": "^8.6.0",
"nanoid": "^5.0.4",
"nanoid": "^5.0.9",
"prettier": "^2.8.3",
"typescript": "^4.0.0"
}
Expand Down
10 changes: 5 additions & 5 deletions sanityv3/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions sanityv3/schemas/documents/subMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import routes from '../routes'
import { filterByRoute, filterByRouteNewsMagazineAndTitle } from '../../helpers/referenceFilters'
import { Flags } from '../../src/lib/datasetHelpers'
import { lang } from './langField'
import { description } from '../objects/iframe/sharedIframeFields'

export type SubMenu = {
_type: 'subMenu'
Expand Down Expand Up @@ -45,6 +46,14 @@ export default {
collapsed: false,
},
},
{
title: 'Featured content',
name: 'featured',
options: {
collapsible: true,
collapsed: false,
},
},
],
fields: [
lang,
Expand Down Expand Up @@ -103,6 +112,24 @@ export default {
filter: filterByRouteNewsMagazineAndTitle,
disableNew: true,
},
fieldset: 'featured',
},
{
name: 'featuredIngress',
title: 'Featured ingress',
description:
'If the featured content does not have ingress and is not event, you can add an ingress here (max. 215 chars)',
type: 'array',
of: [introBlockContentType],
validation: (Rule: Rule) => Rule.custom((value: any) => validateCharCounterEditor(value, 215, true)),
fieldset: 'featured',
},
{
name: 'featuredCTALabel',
title: 'Featured CTA label text',
description: 'The label text appearing with the CTA arrow link style if not event',
fieldset: 'featured',
type: 'string',
},
{
name: 'intro',
Expand Down
18 changes: 18 additions & 0 deletions sanityv3/schemas/objects/accordionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const contentType = configureBlockContent({
h3: false,
h4: false,
attachment: false,
internalLink: false,
externalLink: false,
})

export default {
Expand All @@ -27,12 +29,28 @@ export default {
type: 'string',
validation: (Rule: Rule) => Rule.required().error(),
},
{
title: 'Image',
name: 'image',
type: 'image',
description: 'Image will be presented as landscape format',
options: {
hotspot: true,
collapsed: false,
},
},
{
title: 'Content',
name: 'content',
type: 'array',
of: [contentType],
},
{
name: 'links',
type: 'array',
title: 'Links',
of: [{ type: 'linkSelector', title: 'Link' }],
},
],
preview: {
select: {
Expand Down
15 changes: 15 additions & 0 deletions sanityv3/schemas/textSnippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,11 @@ const snippets: textSnippet = {
defaultValue: 'Submit Form',
group: groups.pensionForm,
},
footer_to_top_button: {
title: 'To top button',
defaultValue: 'To top',
group: groups.others,
},
career_fair_form_organisation: {
title: 'Organisation',
defaultValue: 'School / Organisation',
Expand Down Expand Up @@ -822,6 +827,16 @@ const snippets: textSnippet = {
defaultValue: 'Carousel controls',
group: groups.carousel,
},
logolink_title: {
title: 'Equinor logo link',
defaultValue: 'Equinor homepage',
group: groups.common,
},
featured_content: {
title: 'Featured content',
defaultValue: 'Featured content',
group: groups.common,
},
}

type textSnippetGroup = { title: string; hidden?: boolean }
Expand Down
11 changes: 0 additions & 11 deletions search/IndexArchivedNews/algolia.ts

This file was deleted.

2 changes: 1 addition & 1 deletion search/IndexArchivedNews/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import * as T from 'fp-ts/lib/Task'
import { init, getClient, getFileList, copyFile } from './blobStorage'
import { ContainerClient } from '@azure/storage-blob'
import { update, generateIndexName, getEnvironment, languageFromIso, languageOrDefault, NewsIndex } from '../common'
import { indexSettings } from './algolia'
import { indexSettings } from '../IndexSanityContent/common/news/algolia'
import { mapData } from './mapper'
import { loadJson } from './fileStorage'

Expand Down
2 changes: 1 addition & 1 deletion search/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@azure/storage-blob": "^12.15.0",
"@sanity/client": "^5.4.2",
"algoliasearch": "^4.19.1",
"axios": "^1.7.4",
"axios": "^1.7.9",
"dotenv-azure": "^2.0.0",
"fp-ts": "^2.16.0"
}
Expand Down
Loading

0 comments on commit 5728684

Please sign in to comment.