Skip to content

Commit

Permalink
Merge pull request #1174 from City-of-Helsinki/UHF-11396
Browse files Browse the repository at this point in the history
UHF-11396: Set error label level to 3 by default
  • Loading branch information
teroelonen authored Feb 5, 2025
2 parents 3128c16 + f80d6cb commit d5be6d7
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 12 deletions.
4 changes: 2 additions & 2 deletions dist/css/styles.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/district-and-project-search.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/health-station-search.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/job-search.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/linkedevents.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/maternity-and-child-health-clinic-search.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/news-archive.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/ploughing-schedule.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/school-search.min.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/js/react/common/ResultsError.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import { ForwardedRef, forwardRef } from 'react';
type ResultsErrorProps = {
error: string|Error;
className?: string;
headingLevel?: number;
}

const ResultsError = forwardRef(({ error, className }: ResultsErrorProps, ref: ForwardedRef<HTMLDivElement>) => {
const ResultsError = forwardRef(({ error, className, headingLevel = 3 }: ResultsErrorProps, ref: ForwardedRef<HTMLDivElement>) => {
console.warn(`Error loading data from Elastic: ${error}`);

if (drupalSettings?.helfi_react_search?.sentry_dsn_react) {
Expand All @@ -19,6 +20,7 @@ const ResultsError = forwardRef(({ error, className }: ResultsErrorProps, ref: F
<Notification
label={Drupal.t('An error occured while loading the content', {}, { context: 'React search' })}
type='error'
headingLevel={headingLevel}
>
{Drupal.t('Please reload the page or try again later.', {}, {context: 'React search'})}
</Notification>
Expand Down
12 changes: 11 additions & 1 deletion src/scss/06_components/pages/_cookie-compliance.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
.helfi-charts-cookie-compliance {
align-content: center;
align-items: center;
background-color: $color-black-10;;
display: flex;
justify-content: center;

Expand Down Expand Up @@ -142,6 +141,17 @@
}
}

// Cookie compliance elements that are on a gray background need to have
// darker shade of gray.
.embedded-content-cookie-compliance {
background-color: $color-black-10;
}

.react-and-share-cookie-compliance,
.helfi-charts-cookie-compliance {
background-color: $color-black-5;
}

.layout-main-wrapper > .block--react-and-share:last-child .message {
margin-bottom: 80px;
}
Expand Down

0 comments on commit d5be6d7

Please sign in to comment.