Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into fix/register-new-mach…
Browse files Browse the repository at this point in the history
…ine-small-fixes
  • Loading branch information
sigruntg committed Sep 13, 2024
2 parents 30252cd + f9c2668 commit 2b0ee4b
Show file tree
Hide file tree
Showing 140 changed files with 573 additions and 341 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,13 @@ jobs:
# See this for more information:
# https://github.blog/changelog/2020-10-08-github-actions-ability-to-change-retention-days-for-artifacts-and-logs/
- name: Keep PR run event
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@b18b1d32f3f31abcdc29dee3f2484801fe7822f4
with:
name: pr-event
path: event.json
retention-days: 90
include-hidden-files: true
if-no-files-found: error

- name: Get cache
id: get-cache
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,14 @@ jobs:
# See this for more information:
# https://github.blog/changelog/2020-10-08-github-actions-ability-to-change-retention-days-for-artifacts-and-logs/
- name: Keep PR run event
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@b18b1d32f3f31abcdc29dee3f2484801fe7822f4
if: needs.pre-checks.outputs.PRE_CHECK && needs.pre-checks.outputs.PRE_CHECK == 'feature-deploy'
with:
name: pr-event
path: event.json
retention-days: 90
include-hidden-files: true
if-no-files-found: error

- name: Generate nodejs image tag
id: nodejs_image
Expand Down
5 changes: 5 additions & 0 deletions apps/api/infra/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,11 @@ export const serviceSetup = (services: {
FISKISTOFA_ZENTER_CLIENT_ID: '1114',
HSN_WEB_FORM_ID: '1dimJFHLFYtnhoYEA3JxRK',
SESSIONS_API_URL: ref((h) => `http://${h.svc(services.sessionsApi)}`),
AUTH_ADMIN_API_PATH: {
dev: 'https://identity-server.dev01.devland.is/backend',
staging: 'https://identity-server.staging01.devland.is/backend',
prod: 'https://innskra.island.is/backend',
},
AUTH_ADMIN_API_PATHS: {
dev: json({
development: 'https://identity-server.dev01.devland.is/backend',
Expand Down
2 changes: 2 additions & 0 deletions apps/services/auth/admin-api/infra/auth-admin-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
service,
ServiceBuilder,
} from '../../../../../infra/src/dsl/dsl'
import { Base, Client, RskProcuring } from '../../../../../infra/src/dsl/xroad'

const REDIS_NODE_CONFIG = {
dev: json([
Expand Down Expand Up @@ -66,6 +67,7 @@ export const serviceSetup = (): ServiceBuilder<'services-auth-admin-api'> => {
NATIONAL_REGISTRY_IDS_CLIENT_SECRET:
'/k8s/xroad/client/NATIONAL-REGISTRY/IDENTITYSERVER_SECRET',
})
.xroad(Base, Client, RskProcuring)
.ingress({
primary: {
host: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { useMemo, useState } from 'react'
import { useState } from 'react'
import flatten from 'lodash/flatten'
import { useLazyQuery } from '@apollo/client'

import { TeamList, type TeamListProps } from '@island.is/island-ui/contentful'
import { sortAlpha } from '@island.is/shared/utils'
import { GenericList } from '@island.is/web/components'
import {
type GenericTag,
Expand Down Expand Up @@ -67,43 +66,7 @@ export const TeamMemberListWrapper = ({

const totalItems = itemsResponse?.total ?? 0

const items = useMemo(
() =>
(itemsResponse?.items ?? []).map((item) => {
const tagGroups: { groupLabel: string; tagLabels: string[] }[] = []
for (const tag of item.filterTags ?? []) {
if (!tag.genericTagGroup?.title || !tag.title) {
continue
}
const index = tagGroups.findIndex(
(group) => group.groupLabel === tag.genericTagGroup?.title,
)
if (index >= 0) {
tagGroups[index].tagLabels.push(tag.title)
} else {
tagGroups.push({
groupLabel: tag.genericTagGroup.title,
tagLabels: [tag.title],
})
}

// Add a colon to the end of group labels if it doesn't have one
for (const group of tagGroups) {
if (!group.groupLabel.endsWith(':')) {
group.groupLabel += ':'
}
}
}

tagGroups.sort(sortAlpha('groupLabel'))

return {
...(item as TeamListProps['teamMembers'][number]),
tagGroups,
}
}),
[itemsResponse],
)
const items = itemsResponse?.items ?? []

return (
<GenericList
Expand Down Expand Up @@ -132,7 +95,7 @@ export const TeamMemberListWrapper = ({
tagQueryId={tagQueryId}
>
<TeamList
teamMembers={items}
teamMembers={items as TeamListProps['teamMembers']}
variant="accordion"
prefixes={{
email: activeLocale === 'is' ? 'Netfang:' : 'Email:',
Expand Down
13 changes: 11 additions & 2 deletions apps/web/components/Organization/Wrapper/OrganizationWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ import { getBackgroundStyle } from '@island.is/web/utils/organization'

import { LatestNewsCardConnectedComponent } from '../LatestNewsCardConnectedComponent'
import { DigitalIcelandHeader } from './Themes/DigitalIcelandTheme'
import { FiskistofaHeader } from './Themes/FiskistofaTheme'
import {
FiskistofaDefaultHeader,
FiskistofaHeader,
} from './Themes/FiskistofaTheme'
import { FiskistofaFooter } from './Themes/FiskistofaTheme'
import {
FjarsyslaRikisinsFooter,
Expand Down Expand Up @@ -328,7 +331,13 @@ export const OrganizationHeader: React.FC<
/>
)
case 'fiskistofa':
return (
return n('usingDefaultHeader', false) ? (
<FiskistofaDefaultHeader
organizationPage={organizationPage}
logoAltText={logoAltText}
isSubpage={(isSubpage && n('smallerSubpageHeader', false)) ?? false}
/>
) : (
<FiskistofaHeader
organizationPage={organizationPage}
logoAltText={logoAltText}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { style } from '@vanilla-extract/css'

export const gridContainerWidth = style({
maxWidth: '1342px',
margin: '0 auto',
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import React from 'react'

import { ResponsiveSpace } from '@island.is/island-ui/core'
import { theme } from '@island.is/island-ui/theme'
import { DefaultHeader } from '@island.is/web/components'
import { OrganizationPage } from '@island.is/web/graphql/schema'
import { useLinkResolver } from '@island.is/web/hooks/useLinkResolver'
import { useWindowSize } from '@island.is/web/hooks/useViewport'

import * as styles from './FiskistofaDefaultHeader.css'

interface HeaderProps {
organizationPage: OrganizationPage
logoAltText: string
isSubpage: boolean
}

const FiskistofaDefaultHeader: React.FC<
React.PropsWithChildren<HeaderProps>
> = ({ organizationPage, logoAltText, isSubpage }) => {
const { linkResolver } = useLinkResolver()

const { width } = useWindowSize()

const themeProp = organizationPage.themeProperties

return (
<div
style={{
background:
(width > theme.breakpoints.lg && !isSubpage
? themeProp.backgroundColor
: 'no-repeat 52% 30% ,linear-gradient(180deg, #E6F2FB 21.56%, #90D9E3 239.74%)') ??
'',
}}
className={styles.gridContainerWidth}
>
<DefaultHeader
title={organizationPage.title}
titleColor="dark400"
imagePadding={themeProp.imagePadding ?? '0'}
fullWidth={themeProp.fullWidth ?? false}
imageIsFullHeight={themeProp.imageIsFullHeight ?? false}
imageObjectFit={
themeProp?.imageObjectFit === 'cover' ? 'cover' : 'contain'
}
logo={organizationPage.organization?.logo?.url}
logoHref={
linkResolver('organizationpage', [organizationPage.slug]).href
}
logoAltText={logoAltText}
titleSectionPaddingLeft={
organizationPage.themeProperties
.titleSectionPaddingLeft as ResponsiveSpace
}
isSubpage={isSubpage}
mobileBackground={
organizationPage.themeProperties.mobileBackgroundColor
}
/>
</div>
)
}

export default FiskistofaDefaultHeader
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import dynamic from 'next/dynamic'

import DefaultHeader from './FiskistofaDefaultHeader'
import Header from './FiskistofaHeader'

export const FiskistofaFooter = dynamic(() => import('./FiskistofaFooter'), {
ssr: false,
})

export const FiskistofaHeader = Header
export const FiskistofaDefaultHeader = DefaultHeader
Loading

0 comments on commit 2b0ee4b

Please sign in to comment.