Skip to content

Commit

Permalink
Merge branch 'main' into 2926-fallback-language-in-search
Browse files Browse the repository at this point in the history
  • Loading branch information
LeandraH authored Dec 11, 2024
2 parents 0696cb9 + 1f3a145 commit 5b6bf61
Show file tree
Hide file tree
Showing 23 changed files with 101 additions and 124 deletions.
20 changes: 0 additions & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,23 +228,9 @@ commands:
unit_test:
description: Runs the test task and stores coverage and junit data
steps:
- run:
command: |
# download test reporter as a static binary
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
name: Setup Code Climate test-reporter
- run:
command: ./cc-test-reporter before-build
name: Code Climate before build
- run:
command: yarn test:ci --maxWorkers ${TOTAL_CPUS}
name: Unit Tests with Coverage
- run:
command: |
./cc-test-reporter format-coverage -t lcov -o reports/coverage/codeclimate.json reports/coverage/lcov.info
./cc-test-reporter upload-coverage -i reports/coverage/codeclimate.json
name: Code Climate after build
- store_test_results:
path: reports/unit-test
- store_artifacts:
Expand Down Expand Up @@ -1095,7 +1081,6 @@ workflows:
prepare_delivery: false
- check:
context:
- codeclimate-integreat-app
- mattermost
- build_web:
build_config_name: integreat-test-cms
Expand Down Expand Up @@ -1210,7 +1195,6 @@ workflows:
prepare_delivery: true
- check:
context:
- codeclimate-integreat-app
- mattermost
- e2e_web:
context:
Expand Down Expand Up @@ -1543,7 +1527,6 @@ workflows:
prepare_delivery: true
- check:
context:
- codeclimate-integreat-app
- mattermost
- build_android:
build_config_name: integreat-e2e
Expand Down Expand Up @@ -1751,7 +1734,6 @@ workflows:
prepare_delivery: true
- check:
context:
- codeclimate-integreat-app
- mattermost
- build_android:
build_config_name: integreat-e2e
Expand Down Expand Up @@ -2009,7 +1991,6 @@ workflows:
prepare_delivery: true
- check:
context:
- codeclimate-integreat-app
- mattermost
- e2e_web:
context:
Expand Down Expand Up @@ -2086,7 +2067,6 @@ workflows:
prepare_delivery: true
- check:
context:
- codeclimate-integreat-app
- mattermost
- e2e_web:
context:
Expand Down
14 changes: 0 additions & 14 deletions .circleci/src/commands/unit_test.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
description: Runs the test task and stores coverage and junit data
steps:
- run:
name: Setup Code Climate test-reporter
command: |
# download test reporter as a static binary
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
- run:
name: Code Climate before build
command: ./cc-test-reporter before-build
- run:
name: Unit Tests with Coverage
command: yarn test:ci --maxWorkers ${TOTAL_CPUS}
- run:
name: Code Climate after build
command: |
./cc-test-reporter format-coverage -t lcov -o reports/coverage/codeclimate.json reports/coverage/lcov.info
./cc-test-reporter upload-coverage -i reports/coverage/codeclimate.json
- store_test_results:
path: reports/unit-test
- store_artifacts:
Expand Down
1 change: 0 additions & 1 deletion .circleci/src/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:

- check:
context:
- codeclimate-integreat-app
- mattermost

- build_web:
Expand Down
1 change: 0 additions & 1 deletion .circleci/src/workflows/delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:

- check:
context:
- codeclimate-integreat-app
- mattermost

- e2e_web:
Expand Down
1 change: 0 additions & 1 deletion .circleci/src/workflows/native_beta_delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
prepare_delivery: true
- check:
context:
- codeclimate-integreat-app
- mattermost

- build_android:
Expand Down
1 change: 0 additions & 1 deletion .circleci/src/workflows/native_production_delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:

- check:
context:
- codeclimate-integreat-app
- mattermost

- build_android:
Expand Down
1 change: 0 additions & 1 deletion .circleci/src/workflows/web_beta_delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
prepare_delivery: true
- check:
context:
- codeclimate-integreat-app
- mattermost
- e2e_web:
context:
Expand Down
1 change: 0 additions & 1 deletion .circleci/src/workflows/web_production_delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
prepare_delivery: true
- check:
context:
- codeclimate-integreat-app
- mattermost
- e2e_web:
context:
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/facebook/react/blob/master/LICENSE)
[![versioning](https://img.shields.io/badge/calver-YYYY.MM.PATCH-22bfda.svg)](version.json)
[![CircleCI Status](https://circleci.com/gh/digitalfabrik/integreat-app.svg?style=shield)](https://circleci.com/gh/digitalfabrik/integreat-app)
[![Maintainability](https://api.codeclimate.com/v1/badges/5be95233a83e181d8a42/maintainability)](https://codeclimate.com/github/digitalfabrik/integreat-app/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/5be95233a83e181d8a42/test_coverage)](https://codeclimate.com/github/digitalfabrik/integreat-app/test_coverage)
[![CodeScene Code Health](https://codescene.io/projects/53058/status-badges/code-health)](https://codescene.io/projects/53058)

# integreat-app
Expand Down
32 changes: 16 additions & 16 deletions native/src/components/DashboardNavigationTiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,51 +39,51 @@ const DashboardNavigationTiles = ({
const isNewsEnabled = tunewsEnabled || localNewsEnabled
const tiles = []

if (featureFlags.newsStream && isNewsEnabled) {
if (cityModel.poisEnabled && featureFlags.pois) {
tiles.push(
new TileModel({
title: t('news'),
path: 'news',
thumbnail: NewsIcon,
title: t('pois'),
path: 'pois',
thumbnail: POIsIcon,
isExternalUrl: false,
onTilePress: () =>
navigateTo({
route: NEWS_ROUTE,
route: POIS_ROUTE,
cityCode,
languageCode,
newsType: localNewsEnabled ? LOCAL_NEWS_TYPE : TU_NEWS_TYPE,
}),
}),
)
}

if (cityModel.eventsEnabled) {
if (featureFlags.newsStream && isNewsEnabled) {
tiles.push(
new TileModel({
title: t('events'),
path: 'events',
thumbnail: CalendarIcon,
title: t('news'),
path: 'news',
thumbnail: NewsIcon,
isExternalUrl: false,
onTilePress: () =>
navigateTo({
route: EVENTS_ROUTE,
route: NEWS_ROUTE,
cityCode,
languageCode,
newsType: localNewsEnabled ? LOCAL_NEWS_TYPE : TU_NEWS_TYPE,
}),
}),
)
}

if (cityModel.poisEnabled && featureFlags.pois) {
if (cityModel.eventsEnabled) {
tiles.push(
new TileModel({
title: t('pois'),
path: 'pois',
thumbnail: POIsIcon,
title: t('events'),
path: 'events',
thumbnail: CalendarIcon,
isExternalUrl: false,
onTilePress: () =>
navigateTo({
route: POIS_ROUTE,
route: EVENTS_ROUTE,
cityCode,
languageCode,
}),
Expand Down
4 changes: 2 additions & 2 deletions native/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ const Header = ({
return { text: t('locations'), language: undefined } // system language
}

const previousRouteTitle = (previousRoute.params as { path?: string } | undefined)?.path
const previousRouteTitle = (previousRoute.params as { title?: string } | undefined)?.title

if (previousRouteTitle) {
return { text: previousRouteTitle, language: languageCode }
Expand All @@ -227,7 +227,7 @@ const Header = ({
}
}

return { text: previousRoute.name, language: undefined } // system language
return { text: t(previousRoute.name), language: undefined } // system language
}

return (
Expand Down
8 changes: 8 additions & 0 deletions release-notes/unreleased/2468-reorder-the-icons-in-header.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
issue_key: 2468
show_in_stores: true
platforms:
- web
- android
- ios
en: Reordered icons in the header
de: Geänderte Reihenfolge der Icons im Header
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"versionName":"2024.11.2","versionCode":100042406}
{"versionName":"2024.12.0","versionCode":100042407}
24 changes: 12 additions & 12 deletions web/src/components/CityContentHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,18 @@ const CityContentHeader = ({
/>,
]

if (isPoisVisible) {
items.push(
<HeaderNavigationItem
key='locations'
to={poisPath}
active={route === POIS_ROUTE}
text={t('locations')}
icon={POIsIcon}
/>,
)
}

if (isNewsVisible) {
items.push(
<HeaderNavigationItem
Expand All @@ -124,18 +136,6 @@ const CityContentHeader = ({
)
}

if (isPoisVisible) {
items.push(
<HeaderNavigationItem
key='locations'
to={poisPath}
active={route === POIS_ROUTE}
text={t('locations')}
icon={POIsIcon}
/>,
)
}

return items
}

Expand Down
4 changes: 1 addition & 3 deletions web/src/components/CityContentToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ const CityContentToolbar = (props: CityContentToolbarProps) => {
id='copy-icon'
/>
</Tooltip>
{hasFeedbackOption && (
<FeedbackToolbarItem route={route} slug={feedbackTarget} isInBottomActionSheet={isInBottomActionSheet} />
)}
{hasFeedbackOption && <FeedbackToolbarItem route={route} slug={feedbackTarget} />}
</Toolbar>
)
}
Expand Down
4 changes: 2 additions & 2 deletions web/src/components/Feedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type FeedbackProps = {
contactMail: string
onCommentChanged: (comment: string) => void
onContactMailChanged: (contactMail: string) => void
onFeedbackChanged: (isPositiveFeedback: boolean | null) => void
onFeedbackChanged?: (isPositiveFeedback: boolean | null) => void
onSubmit: () => void
sendingStatus: SendingStatusType
noResults: boolean | undefined
Expand Down Expand Up @@ -94,7 +94,7 @@ const Feedback = ({
</InputSection>
</>
) : (
<FeedbackButtons isPositive={isPositiveFeedback} onRatingChange={onFeedbackChanged} />
onFeedbackChanged && <FeedbackButtons isPositive={isPositiveFeedback} onRatingChange={onFeedbackChanged} />
)}

<InputSection
Expand Down
5 changes: 4 additions & 1 deletion web/src/components/FeedbackContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ type FeedbackContainerProps = {
noResults?: boolean
slug?: string
onSubmit?: () => void
isPositiveRating: boolean | null
setIsPositiveRating?: (isPositiveFeedback: boolean | null) => void
}

export type SendingStatusType = 'idle' | 'sending' | 'failed' | 'successful'
Expand All @@ -28,8 +30,9 @@ export const FeedbackContainer = ({
slug,
onClose,
onSubmit,
isPositiveRating,
setIsPositiveRating,
}: FeedbackContainerProps): ReactElement => {
const [isPositiveRating, setIsPositiveRating] = useState<boolean | null>(null)
const [comment, setComment] = useState<string>('')
const [contactMail, setContactMail] = useState<string>('')
const [sendingStatus, setSendingStatus] = useState<SendingStatusType>('idle')
Expand Down
Loading

0 comments on commit 5b6bf61

Please sign in to comment.