Skip to content

feat: use generic default meta tags unless not overridden #4274

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

Open
wants to merge 12 commits into
base: alpha
Choose a base branch
from

Conversation

nrjdalal
Copy link
Contributor

  • packages/react-router/src/HeadContent.tsx
  • packages/react-router/tests/Scripts.test.tsx

nrjdalal added 2 commits May 30, 2025 06:33
packages/react-router/src/HeadContent.tsx
packages/react-router/tests/Scripts.test.tsx
examples/react/start-workos/src/tanstack-start.d.ts
examples/react/start-workos/src/tanstack-start.d.ts
Copy link

nx-cloud bot commented May 30, 2025

View your CI Pipeline Execution ↗ for commit 2dca19b.

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 1m 3s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 2s View ↗

☁️ Nx Cloud last updated this comment at 2025-05-30 09:16:16 UTC

Copy link

pkg-pr-new bot commented May 30, 2025

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@4274

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@4274

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@4274

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@4274

@tanstack/react-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@4274

@tanstack/react-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@4274

@tanstack/react-router-with-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-with-query@4274

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@4274

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@4274

@tanstack/react-start-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-plugin@4274

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@4274

@tanstack/router-cli

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@4274

@tanstack/router-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@4274

@tanstack/router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@4274

@tanstack/router-devtools-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@4274

@tanstack/router-generator

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@4274

@tanstack/router-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@4274

@tanstack/router-utils

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@4274

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@4274

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@4274

@tanstack/solid-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@4274

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@4274

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@4274

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@4274

@tanstack/solid-start-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-plugin@4274

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@4274

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@4274

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@4274

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@4274

@tanstack/start-server-functions-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-client@4274

@tanstack/start-server-functions-fetcher

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-fetcher@4274

@tanstack/start-server-functions-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-functions-server@4274

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@4274

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@4274

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@4274

commit: 2dca19b

@SeanCassiere SeanCassiere changed the title 🔥 feat(meta): use generic default metatags unless not overridden feat: use generic default meta tags unless not overridden May 30, 2025
Copy link
Member

@SeanCassiere SeanCassiere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please export the defaultMeta out of router-core and have them the imported into @tanstack/react-router and @tanstack/solid-router.

Perhaps even have the defaultMeta.forEach(...) bit as a function so the behaviour can be centralized.

@nrjdalal
Copy link
Contributor Author

will make the changes shortly

…s.test.tsx index.ts tanstack...

packages/router-core/src/defaultMeta.ts
packages/react-router/src/HeadContent.tsx
packages/solid-router/src/HeadContent.tsx
packages/solid-router/tests/Scripts.test.tsx
packages/router-core/src/index.ts
examples/react/start-workos/src/tanstack-start.d.ts
autofix-ci bot and others added 4 commits May 30, 2025 02:54
packages/router-core/src/defaultMeta.ts
packages/router-core/src/defaultMeta.ts
examples/react/start-workos/src/tanstack-start.d.ts
@nrjdalal nrjdalal requested a review from SeanCassiere May 30, 2025 03:27
nrjdalal and others added 2 commits May 30, 2025 09:23
packages/router-core/src/index.ts
examples/react/start-workos/src/tanstack-start.d.ts
packages/router-core/src/{defaultMeta.ts
@SeanCassiere SeanCassiere requested a review from birkskyum May 30, 2025 04:45
@SeanCassiere
Copy link
Member

@birkskyum would this be the "correct" way to do this for Solid?

Copy link
Member

@SeanCassiere SeanCassiere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks okay to me. Awaiting @birkskyum's thoughts on this.

nrjdalal and others added 3 commits May 30, 2025 14:29
@birkskyum
Copy link
Member

birkskyum commented May 30, 2025

In solid it's called e.g. charset not charSet like react, so the differences in naming have to be accounted for if in core. Changing charSet -> charset is one of the standard things to do when porting from react to solid, same as className -> class

attrs: Record<string, string>
}> = [
{
key: 'charSet',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the line specifically i'm thinking won't work with solid

@nrjdalal
Copy link
Contributor Author

nrjdalal commented May 30, 2025

In solid it's called e.g. charset not charSet like react, so the differences in naming have to be accounted for if in core. Changing charSet -> charset is one of the standard things to do when porting from react to solid, same as className -> class

it is case insensitive I guess, could always make em small, be that react/solid

could make transformer/matcher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants