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

Radix-related fixes, improved main menu + OSM sign-in #465

Merged
merged 28 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
001b55c
Set Biome to use Spaces
opyh Dec 10, 2024
b03dd89
Remove obsolete <FeatureClusterPanel /> component
opyh Dec 10, 2024
63a4556
Fix MapboxGL buttons in dark mode
opyh Dec 10, 2024
85e4d17
Introduce more <AppStateLink /> usages
opyh Dec 10, 2024
5778a7c
Remove obsolete code from <FeatureNameHeader />
opyh Dec 10, 2024
30e6a09
Fix screenreader hint in <SearchPanel />
opyh Dec 10, 2024
a1fe412
Smaller Biome/typing fixes in <SearchPanel />
opyh Dec 10, 2024
d82a3b8
Don't open <ThemePanel /> automatically on start
opyh Dec 11, 2024
1f57980
Make useViewportSize hook SSR compatible
opyh Dec 11, 2024
09414ed
Refactor/fix main menu
opyh Dec 11, 2024
b78cac1
Use `l` hotkey again for expert / OSM mode
opyh Dec 11, 2024
fb5ce2e
Improve `useExpertMode()` readability
opyh Dec 11, 2024
9c21b4e
Use Radix theme colors for category and filter buttons
opyh Dec 11, 2024
5dc255c
Merge remote-tracking branch 'origin/feature/a11ymap' into feature/a1…
opyh Dec 16, 2024
ae48904
Allow to show links directly in the main toolbar again
opyh Dec 16, 2024
fca8c16
Radix-ify the onboarding
opyh Dec 16, 2024
beb5703
Fix a linter error in App.ts
opyh Dec 16, 2024
2e5a225
Improve main menu styling, add responsive breakpoint
opyh Dec 16, 2024
160dc6e
Fix a React hydration error & main menu keyboard focus
opyh Dec 17, 2024
38bf04b
Add biome as default VSCode formatter
opyh Dec 17, 2024
9a12c20
Code cosmetics for main menu 💅
opyh Dec 17, 2024
5d63509
Fix 'location failed' wording
opyh Dec 17, 2024
d903fa7
Fix a smol comment
opyh Dec 17, 2024
97a28e2
Fix a wrongly import()ed type
opyh Dec 17, 2024
ebc9625
Improve docs for useIsomorphicLayoutEffect.tsx
opyh Dec 17, 2024
05ef70f
Wrap <AppStateLink /> with React.forwardRef
opyh Dec 30, 2024
d9874cc
Improve session menu element when logged in with OSM
opyh Dec 30, 2024
c6e4245
Use <a> tag in <JoinedEventLink /> correctly
opyh Dec 30, 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
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@
"prettier.enable": false,
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
}
6 changes: 4 additions & 2 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
},
"files": {
"ignoreUnknown": false,
"ignore": ["dist"]
"ignore": [
"dist"
]
},
"formatter": {
"enabled": true,
Expand All @@ -28,4 +30,4 @@
"quoteStyle": "double"
}
}
}
}
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"rimraf": "^2.6.3",
"source-map-explorer": "^2.5.3",
"ttag-cli": "^1.9.3",
"typescript": "^5.5.4",
"typescript": "^5.7.2",
"webdriverio": "^6.1.5"
},
"scripts": {
Expand Down
21 changes: 13 additions & 8 deletions src/components/App/AppStateLink.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import Link from 'next/link'
import { ComponentProps, useMemo } from 'react'
import { preserveSearchParams, useAppStateAwareRouter } from '../../lib/util/useAppStateAwareRouter'
import Link from "next/link";
import type { ComponentProps, Ref } from "react";
import { useAppStateAwareHref } from "./useAppStateAwareHref";
import React from "react";

export const AppStateLink = ({ href, ...props }: ComponentProps<typeof Link>) => {
const { searchParams, query } = useAppStateAwareRouter()
export const AppStateLink = React.forwardRef(
(
{ href, ...props }: ComponentProps<typeof Link>,
ref: Ref<HTMLAnchorElement>,
) => {
const extendedHref = useAppStateAwareHref(href);

const extendedHref = useMemo(() => preserveSearchParams(href, searchParams, query), [href, searchParams, query])
return <Link {...props} href={extendedHref} />
}
return <Link {...props} href={extendedHref} ref={ref} />;
},
);
120 changes: 0 additions & 120 deletions src/components/App/MainMenu/AppLinks.tsx

This file was deleted.

46 changes: 0 additions & 46 deletions src/components/App/MainMenu/GlobalActivityIndicator.tsx

This file was deleted.

25 changes: 25 additions & 0 deletions src/components/App/MainMenu/LogoHomeLink.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Button } from "@radix-ui/themes";
import Link from "next/link";
import { t } from "ttag";
import type { IBranding } from "../../../lib/model/ac/IBranding";
import VectorImage from "../../shared/VectorImage";

export default function LogoHomeLink({
branding,
productName,
}: { branding: IBranding | undefined; productName: string }) {
return (
<Button aria-label={t`Home`} variant="ghost" radius="none" asChild>
<Link href="/onboarding">
<VectorImage
className="logo"
svg={branding?.vectorLogoSVG}
aria-label={productName}
maxHeight="30px"
maxWidth="150px"
hasShadow={false}
/>
</Link>
</Button>
);
}
Loading