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.23.2 #1302

Merged
merged 80 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
74898ec
Clear debounce during cleanup useEffect
dtrucs Oct 10, 2024
e78e805
Do not empty dom when loading and transitionning page
dtrucs Oct 9, 2024
476edab
Improve Loader component
dtrucs Oct 15, 2024
257fefd
Optimize Backpack icon
dtrucs Oct 17, 2024
7bbc789
Improve DetailsGear component
dtrucs Oct 17, 2024
c128747
Fix snapshot related to detailsGear
dtrucs Oct 17, 2024
e83a4b2
Create DetailsDates component
dtrucs Oct 18, 2024
70faeca
Adapt TouristicEvent module to display dates correctly
dtrucs Oct 18, 2024
809da28
Defining dateFormat variables for greater readability
dtrucs Oct 18, 2024
fa59e2f
Apply suggestions from code review
dtrucs Oct 18, 2024
6f84bda
Use encodeURIComponent instead of encodeURI to build URI
dtrucs Oct 24, 2024
6f7ff9d
Fix map zoomControl displayed on mobile viewport
dtrucs Oct 21, 2024
fa8b3c9
Build "Show More" menu items only if there are enough
dtrucs Oct 29, 2024
3ca386e
Fix infiniteScroll
dtrucs Oct 28, 2024
6f75bb3
Remove useless path prop
dtrucs Oct 29, 2024
69b1e02
Improve styling spacing HDviewpoint annotation
dtrucs Oct 31, 2024
82d4f16
Fix touristicContents links for activityBar
dtrucs Nov 4, 2024
ab7cd78
Bump package.json / 3.23.2
dtrucs Nov 12, 2024
20daa9b
Create mkdocs.yml
camillemonchicourt Sep 17, 2024
661d726
Create .readthedocs.yaml
camillemonchicourt Sep 17, 2024
0917bb8
Move mkdocs.yml to docs/mkdocs.yml
camillemonchicourt Sep 17, 2024
df62495
Update .readthedocs.yaml
camillemonchicourt Sep 17, 2024
2e3ca95
Update mkdocs.yml
camillemonchicourt Sep 17, 2024
4b02c45
Move docs/mkdocs.yml to mkdocs.yml
camillemonchicourt Sep 17, 2024
326515e
Move docs/.readthedocs.yaml to .readthedocs.yaml
camillemonchicourt Sep 17, 2024
62f5de6
Update mkdocs.yml
camillemonchicourt Sep 17, 2024
1e23e37
Create index.md
camillemonchicourt Sep 17, 2024
73de083
Update mkdocs.yml
camillemonchicourt Sep 17, 2024
cec6cc0
Move to readthedocs theme
camillemonchicourt Sep 17, 2024
e491575
Update mkdocs.yml
camillemonchicourt Sep 17, 2024
c51d042
Update .readthedocs.yaml
camillemonchicourt Sep 17, 2024
c3bc395
Move mkdocs.yml to docs/mkdocs.yml
camillemonchicourt Sep 17, 2024
4bbedc8
Update mkdocs.yml
camillemonchicourt Sep 17, 2024
74b1c1b
Update .readthedocs.yaml
camillemonchicourt Sep 17, 2024
7ef8107
Rename docs/mkdocs.yml to mkdocs.yml
camillemonchicourt Sep 17, 2024
d154490
Update installation.md header sizes
camillemonchicourt Sep 17, 2024
a2ee8cb
Update customization.md
camillemonchicourt Sep 17, 2024
b6f7d9c
Update customization-scripts-GDPR.md
camillemonchicourt Sep 17, 2024
bbca233
Update customization.md
camillemonchicourt Sep 17, 2024
2160789
Update customization.md
camillemonchicourt Sep 17, 2024
47519fa
Update server-side-rendering.md
camillemonchicourt Sep 17, 2024
3115d65
Update mkdocs.yml
camillemonchicourt Sep 17, 2024
57a5c3a
Update mkdocs.yml
camillemonchicourt Sep 17, 2024
8be2d43
Update mkdocs.yml
camillemonchicourt Sep 17, 2024
5216ab8
Update index.md
camillemonchicourt Sep 17, 2024
24a3a19
Update mkdocs.yml
camillemonchicourt Sep 17, 2024
01a754a
Update development.md
camillemonchicourt Sep 17, 2024
27c958e
Update development.md
camillemonchicourt Sep 17, 2024
85ba3ef
Update mkdocs.yml
camillemonchicourt Sep 17, 2024
8c41deb
Add logo, favicon and homepage in doc
bruhnild Sep 27, 2024
6c599f2
Update index homepage and summary navbar
bruhnild Sep 30, 2024
e060602
Add infos about contributing doc
bruhnild Sep 30, 2024
3db3638
Fix indent and links
bruhnild Sep 30, 2024
8a212b6
Review development.md
camillemonchicourt Sep 30, 2024
5ea348b
Remove logos from index.md
camillemonchicourt Sep 30, 2024
e543aa9
Add material for mkdocs
bruhnild Oct 2, 2024
feb21c5
fix ci error remove emoji extension
bruhnild Oct 2, 2024
92e4642
Add requirements
bruhnild Oct 2, 2024
4735ec2
Improve toc and knowledge and architecture section
bruhnild Oct 2, 2024
f9b50ed
reindent code blocs
bruhnild Oct 2, 2024
363bb2d
Add context to deployment_solution.md and main_framework.md
bruhnild Oct 2, 2024
09a657d
Fix titles
bruhnild Oct 2, 2024
ff09b9b
Include issue's comments in doc for custo and add a contributing section
bruhnild Oct 2, 2024
f121eae
Add contributing doc
bruhnild Oct 2, 2024
a05bf0d
Split customization doc
bruhnild Oct 4, 2024
6fcb7da
Remove rando v3 mention
dtrucs Oct 14, 2024
7999906
Update README
bruhnild Oct 11, 2024
c2ba068
Improve contributing page
bruhnild Oct 17, 2024
cc0c557
Improve documentation and dev setup pages
bruhnild Oct 17, 2024
fafd5e9
Add extension to manage issues links in changelog
bruhnild Oct 17, 2024
9de3974
Improve contributing documentation
dtrucs Oct 17, 2024
7551dc7
Update contributing issue report
dtrucs Oct 17, 2024
276335b
Update readme.md and contributing.md
bruhnild Oct 17, 2024
4f9b2ea
Add suggestion for improving contributing.md
bruhnild Oct 17, 2024
768f80c
Update index.md, readme.md and fix gdpr title page
bruhnild Oct 31, 2024
12b70f3
Fix links in readme.md
bruhnild Oct 31, 2024
207a484
Add portals examples in readme and fix titles in doc
bruhnild Oct 31, 2024
8265508
Fix demo link
bruhnild Oct 31, 2024
073f4a6
Update shields in readme
bruhnild Oct 31, 2024
9ac4399
Add entry to the changelog
dtrucs Nov 12, 2024
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
16 changes: 16 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## 3.23.2 (2024-11-12)

**✨ Improvements**

- Optimize backpack icon (#1287)
- Adapt touristic event module to display dates correctly (#1288)
- Improve styling spacing HDviewpoint annotation (#1298)

**🐛 Fixes**

- Fix of URI encoding for paths containing specific characters (#1205 and #1077)
- Fix map zoomControl displayed on mobile viewport (#1290)
- Clear debounces during cleanup useEffect (#1283)
- Build "Show More" menu items only if there are enough (#1296)
- Fix touristicContents links for activityBar - regression since 3.22.0 (#1299)

## 3.23.1 (2024-10-14)

**🔧 Maintenance**
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "geotrek-rando-frontend",
"version": "3.23.1",
"version": "3.23.2",
"private": true,
"scripts": {
"debug": "NODE_OPTIONS='--inspect' next ./src",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const ActivitySearchFilter: React.FC<Props> = ({
if (type === 'PRACTICE') return PRACTICE_ID;
if (type === 'OUTDOOR_PRACTICE') return OUTDOOR_ID;
if (type === 'TOURISTIC_EVENT_TYPE') return EVENT_ID;
if (type === 'CATEGORIES') return CATEGORY_ID;
if (type === 'CATEGORY') return CATEGORY_ID;

return null;
};
Expand Down
227 changes: 17 additions & 210 deletions frontend/src/components/Icons/BackPack/index.tsx

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion frontend/src/components/InlineMenu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ export const Menu: React.FC<MenuProps> = ({
}) => {
const intl = useIntl();
const items = useMemo(() => {
if (menuItems.some(({ children = [] }) => children.length)) {
if (
menuItems.length < primaryItemsNumber ||
menuItems.some(({ children = [] }) => children.length)
) {
return menuItems;
}
// If there are no children, we use "primaryItemsNumber" to split menu with "See More" button
Expand Down
13 changes: 3 additions & 10 deletions frontend/src/components/Layout/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Header } from 'components/Header';
import ConditionallyRender from 'components/ConditionallyRender';
import Loader from 'components/Loader';
import Head from 'next/head';
import { useNavigationLoader } from './useRedirection';
Expand All @@ -12,16 +11,10 @@ export const Layout: React.FC<React.PropsWithChildren> = ({ children }) => {
return (
<>
<Head>{scriptsHeader && <>{scriptsHeader}</>}</Head>
<div className="flex flex-col min-h-full">
<div className="flex flex-col min-h-dvh">
<Header />
<main className="relative grow">
<ConditionallyRender client>
<Loader loaded={!isNavigationLoading} className="z-loader absolute inset-0">
{children}
</Loader>
</ConditionallyRender>
<ConditionallyRender server>{children}</ConditionallyRender>
</main>
<main className="relative grow">{children}</main>
<Loader loaded={!isNavigationLoading} className="bg-white z-loader fixed inset-0"></Loader>
</div>
{scriptsFooter && <>{scriptsFooter}</>}
</>
Expand Down
18 changes: 10 additions & 8 deletions frontend/src/components/Loader/Loader.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { FormattedMessage } from 'react-intl';
import { cn } from 'services/utils/cn';

type LoaderProps = {
className?: string;
children?: React.ReactNode;
type LoaderProps = React.HTMLAttributes<HTMLDivElement> & {
loaded?: boolean;
};

Expand Down Expand Up @@ -47,21 +45,25 @@ const classNameAnimation = (index: number) => {
};

// Loader from https://loading.io/css/
const Loader: React.FC<LoaderProps> = ({ className = '', loaded = false, children = '' }) => {
const Loader: React.FC<LoaderProps> = ({ className, loaded = false, children = null }) => {
if (loaded === true) {
return <>{children}</>;
return children;
}
return (
<div className={`flex size-full justify-center items-center text-primary1 ${className}`}>
<p className="sr-only" aria-live="polite">
<div
className={cn('flex size-full justify-center items-center text-primary1', className)}
role="status"
aria-live="polite"
>
<p className="sr-only">
<FormattedMessage id="loading" />
</p>
<div className="relative inline-block size-15">
{Array.from({ length: 12 }, (_, index) => (
<div
key={index}
className={cn(
'animate-[pulse_1.2s_linear_infinite] origin-[30px_30px]',
'animate-[pulse_1.2s_linear_infinite] origin-[30px_30px] will-change-transform',
classNameAnimation(index),
"after:content-[''] after:block after:absolute after:top-1 after:left-7 after:w-1 after:h-3 after:rounded-lg after:bg-current",
)}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/Map/SearchMap/MoveHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const MoveHandler: React.FC<Props> = ({ onMove }) => {
map.on('moveend', handleMove);
return () => {
map.off('moveend', handleMove);
handleMove.clear();
};
}, [handleMove, map]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ const MetaData = ({ properties }: { properties: GeoJsonProperties }) => {

return (
<Tooltip>
<span className="flex flex-wrap items-center gap-1 px-1">
<span className="flex flex-wrap items-center gap-1 p-2">
{Boolean(properties.category?.label) && (
<span className="flex gap-2 font-bold">
<span className="flex gap-2 font-bold pr-6">
<Icon pictogramUri={pictogramUri} />
<span>{properties.category.label}</span>
</span>
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/components/Map/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ const SearchMapDynamicComponentWithoutMemo: React.FC<SearchMapProps> = props =>
);
};

export const SearchMapDynamicComponent = memo(SearchMapDynamicComponentWithoutMemo, () => true);
export const SearchMapDynamicComponent = memo(
SearchMapDynamicComponentWithoutMemo,
(oldProps, nextProps) => oldProps.hasZoomControl === nextProps.hasZoomControl,
);

const DetailsMapDynamicComponentWithoutMemo: React.FC<DetailsMapProps> = props => {
const DetailsMap = dynamic(() => import('./DetailsMap/DetailsMap'), {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const useDetailsCard = (hasMedia = false) => {
debouncedResize();
global.addEventListener('resize', handleResize);
return () => {
debouncedResize.clear();
global.removeEventListener('resize', handleResize);
};
}, [debouncedResize]);
Expand Down
92 changes: 92 additions & 0 deletions frontend/src/components/pages/details/components/DetailsDates.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
import { FormattedMessage, useIntl } from 'react-intl';

type DetailsDatesProps = {
dates?: {
hasEndTime: boolean;
hasBeginTime: boolean;
beginDate: string;
endDate: string;
};
};

const DetailsDates: React.FC<DetailsDatesProps> = ({ dates }) => {
const intl = useIntl();
if (!dates) {
return null;
}

const { beginDate, endDate, hasBeginTime, hasEndTime } = dates;

const dateFormatOptions = {
year: 'numeric',
month: 'long',
day: 'numeric',
} as Intl.DateTimeFormatOptions;

const timeFormatOptions = {
hour: 'numeric',
minute: 'numeric',
} as Intl.DateTimeFormatOptions;

const dateTimeFormatOptions = {
...dateFormatOptions,
...timeFormatOptions,
};

if (beginDate.split('T')[0] === endDate.split('T')[0]) {
if (!hasEndTime) {
// Output ex : "on November 13, 2024"
return (
<FormattedMessage
id={'dates.singleDate'}
values={{
date: new Intl.DateTimeFormat(
intl.locale,
hasBeginTime ? dateTimeFormatOptions : dateFormatOptions,
).format(new Date(beginDate)),
}}
/>
);
}
// Output ex : "on November 13, 2024 from 10:00 to 12:00"
return (
<>
<FormattedMessage
id={'dates.singleDate'}
values={{
date: new Intl.DateTimeFormat(intl.locale).format(new Date(beginDate)),
}}
/>{' '}
<FormattedMessage
id={'dates.rangeTime'}
values={{
beginTime: new Intl.DateTimeFormat(intl.locale, timeFormatOptions).format(
new Date(beginDate),
),
endTime: new Intl.DateTimeFormat(intl.locale, timeFormatOptions).format(
new Date(endDate),
),
}}
/>
</>
);
}
// Output ex : "from November 13, 2024 to December 25, 2024"
return (
<FormattedMessage
id={'dates.multipleDates'}
values={{
beginDate: new Intl.DateTimeFormat(
intl.locale,
hasBeginTime ? dateTimeFormatOptions : dateFormatOptions,
).format(new Date(beginDate)),
endDate: new Intl.DateTimeFormat(
intl.locale,
hasEndTime ? dateTimeFormatOptions : dateFormatOptions,
).format(new Date(endDate)),
}}
/>
);
};

export default DetailsDates;
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import parse from 'html-react-parser';
import { BackPack } from 'components/Icons/BackPack';
import { cn } from 'services/utils/cn';
import { HTMLAttributes } from 'react';

interface DetailsGearProps {
className?: string;
interface DetailsGearProps extends HTMLAttributes<HTMLDivElement> {
text: string;
}

export const DetailsGear: React.FC<DetailsGearProps> = ({ className, text }) => {
return (
<div
id="details_recommandationGear"
className={`py-4 desktop:py-5 px-3 desktop:px-4 flex
rounded-2xl border-2 border-solid border-greyDarkColored
${className ?? ''}`}
className={cn(
'py-4 desktop:py-5 px-3 desktop:px-4 gap-2 desktop:gap-4 flex justify-start items-center rounded-2xl border-2 border-solid border-greyDarkColored',
className,
)}
>
<div className="mr-2 desktop:mr-4 shrink-0 size-6 desktop:size-12 self-start">
<BackPack />
</div>
<div className="text-greyDarkColored desktop:font-bold text-Mobile-C2 desktop:text-P1 my-auto">
<BackPack className="shrink-0 size-6 desktop:size-12" aria-hidden />
<div className="text-greyDarkColored desktop:font-bold text-Mobile-C2 desktop:text-P1">
<div className="content-WYSIWYG">{parse(text)}</div>
</div>
</div>
Expand Down
Loading
Loading