Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 3.24.2 #1338

Merged
merged 13 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 3.24.2 (2025-01-06)

**🔧 Maintenance**

- Bump @react-hook/resize-observer from 1.2.6 to 2.0.2 (#1312)
- Serve Assistant font locally (#1320)
- Remove wait-on package (#1322)
- Bump compression from 1.7.4 to 1.7.5 (#1324)

**🐛 Fixes**

- Avoid trying to launch Sentry for instances without Sentry DSN key (#1319)
- Render `manifest.json` as JSON file (#1321)
- Define bounds instead of minZoom for `tileLayerOffline` (#1332 and #1333)

## 3.24.1 (2024-11-27)

**🔧 Maintenance**
Expand Down
10 changes: 5 additions & 5 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "geotrek-rando-frontend",
"version": "3.24.1",
"version": "3.24.2",
"private": true,
"scripts": {
"debug": "NODE_OPTIONS='--inspect' next ./src",
Expand Down Expand Up @@ -36,18 +36,19 @@
"dependencies": {
"@20tab/react-leaflet-resetview": "^1.1.0",
"@hcaptcha/react-hcaptcha": "^1.4.4",
"@juggle/resize-observer": "^3.4.0",
"@makina-corpus/rando3d": "^1.3.3",
"@radix-ui/react-dialog": "^1.1.1",
"@raruto/leaflet-elevation": "1.9.0",
"@react-hook/resize-observer": "^1.2.6",
"@react-hook/resize-observer": "^2.0.2",
"@sentry/nextjs": "^8.32.0",
"@tanstack/react-query": "^5.51.1",
"@tanstack/react-query-devtools": "^5.51.1",
"@zeit/next-source-maps": "^0.0.4-canary.1",
"autoprefixer": "^10.4.14",
"axios": "0.25.0",
"class-variance-authority": "^0.7.0",
"compression": "^1.7.4",
"compression": "^1.7.5",
"cypress": "^13.6.3",
"debounce": "^1.2.1",
"deepmerge": "^4.3.1",
Expand Down Expand Up @@ -88,8 +89,7 @@
"tailwind-merge": "^2.5.2",
"tailwindcss": "^3.4.15",
"tailwindcss-animate": "^1.0.7",
"ts-node": "^10.9.1",
"wait-on": "6.0.0"
"ts-node": "^10.9.1"
},
"devDependencies": {
"@accessible/accordion": "^2.0.0",
Expand Down
13 changes: 13 additions & 0 deletions frontend/src/components/pages/_app/Root.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import getNextConfig from 'next/config';
import Head from 'next/head';
import { Assistant } from 'next/font/google';
import { IntlProvider } from 'react-intl';
import { getGlobalConfig } from 'modules/utils/api.config';
import { getDefaultLanguage } from 'modules/header/utills';
Expand All @@ -16,6 +17,12 @@ const {
publicRuntimeConfig: { locales },
} = getNextConfig();

const assistant = Assistant({
weight: ['400', '600', '700'],
subsets: ['latin'],
display: 'swap',
});

export const Root: React.FC<React.PropsWithChildren> = props => {
const router = useRouter();
const language: string = router.locale ?? getDefaultLanguage() ?? 'fr';
Expand Down Expand Up @@ -54,6 +61,12 @@ export const Root: React.FC<React.PropsWithChildren> = props => {
name="viewport"
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no, user-scalable=no, viewport-fit=cover"
/>

<style>{`
:root {
--font-assistant: ${assistant.style.fontFamily};
}
`}</style>
</Head>
{props.children}
</IntlProvider>
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/hooks/useSize.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { MutableRefObject, RefObject, useState } from 'react';
import useResizeObserver from '@react-hook/resize-observer';
import { ResizeObserver as ResizeObserverPolyfill } from '@juggle/resize-observer';
import useIsomorphicLayoutEffect from './useIsomorphicLayoutEffect';

const useSize = (target: MutableRefObject<HTMLElement | null | undefined>) => {
Expand All @@ -9,7 +10,9 @@ const useSize = (target: MutableRefObject<HTMLElement | null | undefined>) => {
setSize(target.current?.getBoundingClientRect() ?? null);
}, [target]);

useResizeObserver(target as RefObject<HTMLElement>, entry => setSize(entry.contentRect ?? null));
useResizeObserver(target as RefObject<HTMLElement>, entry => setSize(entry.contentRect ?? null), {
polyfill: ResizeObserverPolyfill,
});
return size;
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import * as Sentry from '@sentry/nextjs';

export async function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') {
await import('./sentry.server.config');
Expand Down
1 change: 0 additions & 1 deletion frontend/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { HydrationBoundary, QueryClient, QueryClientProvider } from '@tanstack/r
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
import { ONE_MINUTE } from 'services/constants/staleTime';
import '../styles/global.css';
import '../public/fonts.css';
import 'slick-carousel/slick/slick.css';
import 'slick-carousel/slick/slick-theme.css';
import 'orejime/dist/orejime.css';
Expand Down
9 changes: 6 additions & 3 deletions frontend/src/pages/manifest.json.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { NextPageContext } from 'next';
import { default as getNextConfig } from 'next/config';
import getNextConfig from 'next/config';

const ManifestJson = (): null => {
return null;
};

ManifestJson.getInitialProps = (props: NextPageContext) => {
export const getServerSideProps = (props: NextPageContext) => {
const {
publicRuntimeConfig: { global, manifest = {} },
} = getNextConfig();
Expand Down Expand Up @@ -43,9 +43,12 @@ ManifestJson.getInitialProps = (props: NextPageContext) => {
...defaultManifest,
...manifest,
};
res.setHeader('Content-Type', 'text/plain');
res.setHeader('Content-Type', 'application/json');
res.write(JSON.stringify(content, null, 2));
res.end();
return {
props: {},
};
};

export default ManifestJson;
1 change: 0 additions & 1 deletion frontend/src/public/fonts.css

This file was deleted.

204 changes: 4 additions & 200 deletions frontend/src/public/icons/category-events.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading