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

feat(og-gen): Update implementation of useLocation | Update App template #10441

Merged
merged 36 commits into from
Apr 12, 2024

Conversation

dac09
Copy link
Contributor

@dac09 dac09 commented Apr 11, 2024

For #10440

Changes

Updated App.tsx template
We modified the App.tsx template to accept possible children, and render them if present. This lets the og:image handler inject your component into the Document tree, without including the entire Router, but still style your og:image component using whatever you used to style the rest of your app (Tailwind, perhaps?)

Updated useLocation implementation
We also modified the useLocation() hook to now return everything that the URL API returns. Previously it only returned three attributes of the url (pathname, search, hash), now it returns everything available to a call to new URL() (origin, href, searchParams, etc.).

The reason for this is now that we have SSR, we can get access to more details in the hook - in this case we needed origin

Rob moved some tests
Rob wanted to move some tests

Both changes should be non-breaking!

cannikin and others added 28 commits February 15, 2024 13:29
…support

* 'main' of github.com:redwoodjs/redwood: (30 commits)
  fix(scenario): Make sure to cleanup even if test fails (#10112)
  Update babel monorepo to v7.24.0 (#10090)
  Update storybook monorepo to v7.6.17 (#10089)
  Update dependency @apollo/client to v3.9.5 (#10087)
  fix(serve): Allow periods in most paths (#10114)
  feat(rsc-streaming): Integrating RSC builds with Streaming and Client side hydration (#10031)
  chore(style): getDefaultViteConfig source format (#10111)
  chore(refactor): vite - extract default vite config (#10110)
  chore(comment): cli index FIXME comment about ugly big red box
  RSC: rscBuildAnalyze: Start at web/src/ (#10109)
  RSC: ensureProcessDirWeb() (#10108)
  RSC: Extract webpack shims into their own file (#10107)
  RSC: Remove completed TODO comment
  RSC: Babel react plugin not needed for analyze phase (#10106)
  RSC: runFeServer: wrap RSC code with `if (rscEnabled)` (#10105)
  RSC: Update comments, naming etc based on Danny's input (#10104)
  RSC: Rename to buildRscClientAndServer (#10103)
  RSC: Rename to rscBuildForServer, and tweak some comments (#10102)
  SSR: Extract buildForStreamingServer function (#10099)
  chore(unit-tests): Silence middleware error logging (#10097)
  ...
@dac09 dac09 added the release:feature This PR introduces a new feature label Apr 11, 2024
@dac09 dac09 requested a review from cannikin April 11, 2024 09:58
@dac09 dac09 merged commit d2ae37a into main Apr 12, 2024
46 checks passed
@dac09 dac09 deleted the feat/rc-dc-uselocation-url branch April 12, 2024 03:39
dac09 added a commit that referenced this pull request Apr 12, 2024
…g-gen-mw-p2

* 'main' of github.com:redwoodjs/redwood:
  feat(og-gen): Update implementation of useLocation | Update App template (#10441)
dac09 added a commit that referenced this pull request Apr 16, 2024
…-dbauth-middleware

* 'main' of github.com:redwoodjs/redwood:
  chore(location): Accept URL-like object (#10467)
  fix(router): Remove barrel exports from router.tsx (#10464)
  chore(dbauth-mw): Refactor web side dbAuth creation (#10460)
  chore(router): Prevent circular dependency for namedRoutes (#10463)
  chore(router): route-validators: Better types and clean up comments (#10462)
  feat(server-auth): dbAuth 3/3 -  handle login, logout, signup, etc. requests if forwarded from middleware (#10457)
  docs(router): Document new NavLink className replacement behavior (#10401)
  chore(refactor): Split the router out into smaller logical units (#10434)
  feat(server-auth): Part 1/3: dbAuth middleware support (web side changes) (#10444)
  chore(auth): Build: Put ESM at the root, and CJS in /cjs (#10458)
  fix(ssr): Successfully serve static assets like `favicon.png` (#10455)
  chore(deps): update chore (#10367)
  (docs) Fix useCache headers and links (#10451)
  chore: remove aws-lambda (#10450)
  chore(deps): update dependency typescript to v5.4.5 (#10452)
  feat(og-gen): Update implementation of useLocation | Update App template (#10441)
  feat(og-gen): Adds package and vite plugin for dynamic og generation (#10439)
@Josh-Walker-GM Josh-Walker-GM modified the milestones: SSR, v8.0.0 Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:feature This PR introduces a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants