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

Remove Future subheading on docs site and update CLI links #9176

Merged
merged 8 commits into from
Apr 1, 2024
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
5 changes: 5 additions & 0 deletions .changeset/update-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/dev": patch
---

Update links printed to the console by the Remix CLI/Dev Server to point to updated docs locations
6 changes: 3 additions & 3 deletions docs/discussion/server-vs-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ export const PostPreview = ({ title, description }) => {
[file_convention_client]: ../file-conventions/-client
[file_convention_server]: ../file-conventions/-server
[window_global]: https://developer.mozilla.org/en-US/docs/Web/API/Window/window
[server-bundles]: ../future/server-bundles
[server-bundles]: ../guides/server-bundles
[vite-config]: ../file-conventions/vite-configuration
[vite-env-only]: /~https://github.com/pcattori/vite-env-only
[classic-remix-compiler]: ../future/vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ../future/vite
[classic-remix-compiler]: ../guides/vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ../guides/vite
4 changes: 2 additions & 2 deletions docs/file-conventions/-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ console.log(supportsVibrationAPI);
Refer to the Route Module section in the sidebar for more information.

[use_effect]: https://react.dev/reference/react/useEffect
[classic-remix-compiler]: ../future/vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ../future/vite
[classic-remix-compiler]: ../guides/vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ../guides/vite
4 changes: 2 additions & 2 deletions docs/file-conventions/-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ Refer to the Route Module section in the sidebar for more information.

<docs-warning>When using the [Classic Remix Compiler][classic-remix-compiler], `.server` modules are replaced with empty modules and will not result in a compilation error. Note that this can result in runtime errors.</docs-warning>

[classic-remix-compiler]: ../future/vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ../future/vite
[classic-remix-compiler]: ../guides/vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ../guides/vite
19 changes: 4 additions & 15 deletions docs/file-conventions/remix-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,7 @@ relative to `remix.config.js`. Defaults to `".cache"`.

## future

The `future` config lets you opt-into future breaking changes via [Future Flags][future-flags]. The following future flags currently exist in Remix v2 and will become the default behavior in Remix v3:

- **`v3_fetcherPersist`**: Change fetcher persistence/cleanup behavior in 2 ways ([RFC][fetcherpersist-rfc]):
- Fetchers are no longer removed on unmount, and remain exposed via [`useFetchers`][use-fetchers] until they return to an `idle` state
- Fetchers that complete while still mounted no longer persist in [`useFetchers`][use-fetchers] since you can access those fetchers via [`useFetcher`][use-fetcher]
- **`v3_relativeSplatPath`**: Fixes buggy relative path resolution in splat routes. Please see the [React Router docs][relativesplatpath] for more information.
- **`v3_throwAbortReason`**: When a server-side request is aborted, Remix will throw the `request.signal.reason` instead of an error such as `new Error("query() call aborted...")`
- **`unstable_singleFetch`**: Opt into [Single Fetch][single-fetch] behavior
The `future` config lets you opt-into future breaking changes via [Future Flags][future-flags]. Please see the [Current Future Flags][current-future-flags] section for a list of all available Future Flags.

## ignoredRouteFiles

Expand Down Expand Up @@ -282,11 +275,7 @@ There are a few conventions that Remix uses you should be aware of.
[browser-node-builtins-polyfill]: #browsernodebuiltinspolyfill
[server-node-builtins-polyfill]: #servernodebuiltinspolyfill
[future-flags]: ../start/future-flags
[fetcherpersist-rfc]: /~https://github.com/remix-run/remix/discussions/7698
[use-fetchers]: ../hooks/use-fetchers
[use-fetcher]: ../hooks/use-fetcher
[relativesplatpath]: https://reactrouter.com/en/main/hooks/use-resolved-path#splat-paths
[single-fetch]: ../guides/single-fetch
[classic-remix-compiler]: ../future/vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ../future/vite
[classic-remix-compiler]: ../guides/vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ../guides/vite
[vite-config]: ./vite-configuration
[current-future-flags]: ../start/future-flags#current-future-flags
21 changes: 5 additions & 16 deletions docs/file-conventions/vite-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,7 @@ The path to the `app` directory, relative to the project root. Defaults to

#### future

The `future` config lets you opt-into future breaking changes via [Future Flags][future-flags]. The following future flags currently exist in Remix v2 and will become the default behavior in Remix v3:

- **`v3_fetcherPersist`**: Change fetcher persistence/cleanup behavior in 2 ways ([RFC][fetcherpersist-rfc]):
- Fetchers are no longer removed on unmount, and remain exposed via [`useFetchers`][use-fetchers] until they return to an `idle` state
- Fetchers that complete while still mounted no longer persist in [`useFetchers`][use-fetchers] since you can access those fetchers via [`useFetcher`][use-fetcher]
- **`v3_relativeSplatPath`**: Fixes buggy relative path resolution in splat routes. Please see the [React Router docs][relativesplatpath] for more information.
- **`v3_throwAbortReason`**: When a server-side request is aborted, Remix will throw the `request.signal.reason` instead of an error such as `new Error("query() call aborted...")`
- **`unstable_singleFetch`**: Opt into [Single Fetch][single-fetch] behavior
The `future` config lets you opt-into future breaking changes via [Future Flags][future-flags]. Please see the [Current Future Flags][current-future-flags] section for a list of all available Future Flags.

#### ignoredRouteFiles

Expand Down Expand Up @@ -140,18 +133,14 @@ A function for assigning addressable routes to [server bundles][server-bundles].

You may also want to enable the `manifest` option since, when server bundles are enabled, it contains mappings between routes and server bundles.

[classic-remix-compiler]: ../future/vite#classic-remix-compiler-vs-remix-vite
[classic-remix-compiler]: ../guides/vite#classic-remix-compiler-vs-remix-vite
[remix-config]: ./remix-config
[vite]: https://vitejs.dev
[future-flags]: ../start/future-flags
[fetcherpersist-rfc]: /~https://github.com/remix-run/remix/discussions/7698
[use-fetchers]: ../hooks/use-fetchers
[use-fetcher]: ../hooks/use-fetcher
[relativesplatpath]: https://reactrouter.com/en/main/hooks/use-resolved-path#splat-paths
[minimatch]: https://npm.im/minimatch
[presets]: ../future/presets
[server-bundles]: ../future/server-bundles
[presets]: ../guides/presets
[server-bundles]: ../guides/server-bundles
[rr-basename]: https://reactrouter.com/routers/create-browser-router#basename
[vite-public-base-path]: https://vitejs.dev/config/shared-options.html#base
[vite-base]: https://vitejs.dev/config/shared-options.html#base
[single-fetch]: ../guides/single-fetch
[current-future-flags]: ../start/future-flags#current-future-flags
3 changes: 0 additions & 3 deletions docs/future/index.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/guides/contributing.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: Contributing
description: Thank you for contributing to Remix! Here's everything you need to know before you open a pull request.
order: 6
---

# Contributing to Remix
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/gotchas.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,4 @@ Note that, even if this issue didn't exist, we'd still recommend using named re-
[fetch]: https://developer.mozilla.org/en-US/docs/Web/API/fetch
[set_cookie_header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie
[cookie_header]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cookie
[classic-remix-compiler]: ../future/vite#classic-remix-compiler-vs-remix-vite
[classic-remix-compiler]: ./vite#classic-remix-compiler-vs-remix-vite
2 changes: 1 addition & 1 deletion docs/guides/local-tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,4 @@ remix dev --tls-key=key.pem --tls-cert=cert.pem -c "node ./server.js"
Your app should now be running with local TLS!

[mkcert]: /~https://github.com/FiloSottile/mkcert#installation
[classic-remix-compiler]: ../future/vite#classic-remix-compiler-vs-remix-vite
[classic-remix-compiler]: ./vite#classic-remix-compiler-vs-remix-vite
2 changes: 1 addition & 1 deletion docs/guides/manual-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,4 +310,4 @@ There is also a handy [`remember` utility][remember] that can help out here if y
[templates]: /~https://github.com/remix-run/remix/blob/main/templates
[community_examples]: /~https://github.com/xHomu/remix-v2-server
[remember]: https://npm.im/@epic-web/remember
[classic-remix-compiler]: ../future/vite#classic-remix-compiler-vs-remix-vite
[classic-remix-compiler]: ./vite#classic-remix-compiler-vs-remix-vite
3 changes: 1 addition & 2 deletions docs/guides/mdx.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,8 @@ exports.mdx = async (filename) => {
};
```

[remix-vite]: ../future//vite
[mdx-plugin]: https://mdxjs.com/packages/rollup
[mdx]: https://mdxjs.com
[yaml]: https://yaml.org
[mdx-bundler]: /~https://github.com/kentcdodds/mdx-bundler
[classic-remix-compiler]: ../future/vite#classic-remix-compiler-vs-remix-vite
[classic-remix-compiler]: ./vite#classic-remix-compiler-vs-remix-vite
4 changes: 2 additions & 2 deletions docs/guides/migrating-react-router-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -727,5 +727,5 @@ Now then, go off and _remix your app_. We think you'll like what you build along
[css-side-effect-imports]: ./styling#css-side-effect-imports
[css-bundling]: ./styling#css-bundling
[open-graph-protocol]: https://ogp.me
[classic-remix-compiler]: ../future/vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ../future/vite
[classic-remix-compiler]: ./vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ./vite
2 changes: 1 addition & 1 deletion docs/guides/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ Here are some other technologies to help speed up your servers:
[lru-cache]: https://www.npmjs.com/package/lru-cache
[redis]: https://www.npmjs.com/package/redis
[https-esbuild-github-io-analyze]: https://esbuild.github.io/analyze
[classic-remix-compiler]: ../future/vite#classic-remix-compiler-vs-remix-vite
[classic-remix-compiler]: ./vite#classic-remix-compiler-vs-remix-vite
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/future/spa-mode.md → docs/guides/spa-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ Once you've got all your routes living in their own files, you can:
[meta]: ../components/meta
[links]: ../components/links
[migrating-rr]: https://remix.run/docs/en/main/guides/migrating-react-router-app
[remix-vite]: ../future/vite
[remix-vite]: ./vite
[migrate-rr]: #migrating-from-react-router
[react-lazy]: https://react.dev/reference/react/lazy
[client-only]: /~https://github.com/sergiodxa/remix-utils?tab=readme-ov-file#clientonly
Expand Down
1 change: 0 additions & 1 deletion docs/guides/templates.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: Templates
description: The quickest way to get rocking and rolling with Remix
order: 3
---

# Templates and Stacks
Expand Down
10 changes: 3 additions & 7 deletions docs/future/vite.md → docs/guides/vite.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,8 @@ export const onRequest = createPagesFunctionHandler({
👉 **Access Bindings and Environment Variables through `context.cloudflare.env` instead of `context.env`**

While you'll mostly use Vite during development, you can also use Wrangler to preview and deploy your app.
To learn more, see [_Cloudflare > Vite & Wrangler_][cloudflare-vite-and-wrangler].

To learn more, see the [_Cloudflare_][cloudflare-vite] section of this document.

👉 **Update your `package.json` scripts**

Expand Down Expand Up @@ -1126,14 +1127,12 @@ Finally, we were inspired by how other frameworks implemented Vite support:
[server-dependencies-to-bundle]: https://remix.run/docs/en/main/file-conventions/remix-config#serverdependenciestobundle
[blues-stack]: /~https://github.com/remix-run/blues-stack
[global-node-polyfills]: ../other-api/node#polyfills
[server-bundles]: ./server-bundles
[vite-plugin-inspect]: /~https://github.com/antfu/vite-plugin-inspect
[vite-perf]: https://vitejs.dev/guide/performance.html
[node-options]: https://nodejs.org/api/cli.html#node_optionsoptions
[rollup-plugin-visualizer]: /~https://github.com/btd/rollup-plugin-visualizer
[debugging]: #debugging
[performance]: #performance
[vite-env-only]: /~https://github.com/pcattori/vite-env-only
[explicitly-isolate-server-only-code]: #splitting-up-client-and-server-code
[route-component]: ../route/component
[error-boundary]: ../route/error-boundary
Expand All @@ -1152,12 +1151,9 @@ Finally, we were inspired by how other frameworks implemented Vite support:
[wrangler-getplatformproxy]: https://developers.cloudflare.com/workers/wrangler/api/#getplatformproxy
[wrangler-getplatformproxy-return]: https://developers.cloudflare.com/workers/wrangler/api/#return-type-1
[remix-config-server]: https://remix.run/docs/en/main/file-conventions/remix-config#server
[cloudflare-vite-and-wrangler]: #vite--wrangler
[rr-basename]: https://reactrouter.com/routers/create-browser-router#basename
[vite-public-base-path]: https://vitejs.dev/config/shared-options.html#base
[cloudflare-vite]: #cloudflare
[vite-base]: https://vitejs.dev/config/shared-options.html#base
[how-fix-cjs-esm]: https://www.youtube.com/watch?v=jmNuEEtwkD4
[presets]: ./presets
[fix-up-css-imports-referenced-in-links]: #fix-up-css-imports-referenced-in-links
[vite-plugin-react]: /~https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react
[splitting-up-client-and-server-code]: ../discussion/server-vs-client
4 changes: 2 additions & 2 deletions docs/other-api/dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,5 +369,5 @@ While the initial build slowdown is inherently a cost for HDR, we plan to optimi
[bundle_analysis]: ../guides/performance
[manual_mode]: ../guides/manual-mode
[hmr]: ../discussion/hot-module-replacement
[remix-vite]: ../future/vite
[classic-remix-compiler]: ../future/vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ../guides/vite
[classic-remix-compiler]: ../guides/vite#classic-remix-compiler-vs-remix-vite
25 changes: 21 additions & 4 deletions docs/start/future-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ In our approach to software development, we aim to achieve the following goals f

## Unstable APIs and Future Flags

We introduce new features into the current release with a future flag that looks something like `unstable_someFeature`.
We introduce new features into the current release with a future flag that looks something like `unstable_someFeature`. You can specify these flags in the Remix Vite Plugin `future` option in your [`vite.config.ts`][vite-config-future] file:

```ts filename=vite.config.ts lines=[7-9]
import { vitePlugin as remix } from "@remix-run/dev";
Expand All @@ -29,6 +29,8 @@ export default defineConfig({
});
```

<docs-info>If you are not yet using Vite, you can provide Future Flags via the [`remix.config.js` `future`][remix-config-future] option</docs-info>

- Once an unstable feature reaches a stable state, we remove the special prefix and include the feature in the next minor release. At this point, the API's structure remains consistent throughout subsequent minor releases.

- This approach allows us to refine the API collaboratively with early adopters, incorporating necessary changes in the unstable phase without affecting all users. The stable releases then benefit from these improvements without disruptions.
Expand Down Expand Up @@ -59,10 +61,25 @@ export default defineConfig({
- If all the `v3_*` future flags are enabled, transitioning to `v3` should ideally not necessitate any changes to your codebase.
- Some future flags that bring about breaking changes initially start as `unstable_*` flags. These might undergo modifications during minor releases. Once they become `v3_*` future flags, the corresponding API is set and won't change further.

## Current Future Flags

The following future flags currently exist in Remix v2 and will become the default behavior in Remix v3:

- **`v3_fetcherPersist`**: Change fetcher persistence/cleanup behavior in 2 ways ([RFC][fetcherpersist-rfc]):
- Fetchers are no longer removed on unmount, and remain exposed via [`useFetchers`][use-fetchers] until they return to an `idle` state
- Fetchers that complete while still mounted no longer persist in [`useFetchers`][use-fetchers] since you can access those fetchers via [`useFetcher`][use-fetcher]
- **`v3_relativeSplatPath`**: Fixes buggy relative path resolution in splat routes. Please see the [React Router docs][relativesplatpath] for more information.
- **`v3_throwAbortReason`**: When a server-side request is aborted, Remix will throw the `request.signal.reason` instead of an error such as `new Error("query() call aborted...")`
- **`unstable_singleFetch`**: Opt into [Single Fetch][single-fetch] behavior

## Summary

Our development strategy focuses on gradual feature adoption and seamless version upgrades for major releases. This empowers developers to selectively integrate new features, avoiding the need for extensive code adjustments during version transitions. By introducing features through `unstable_*` flags, we refine the API collaboratively with early adopters while ensuring stable releases benefit from enhancements. Through careful management of breaking changes using `v3_*` flags, we provide the flexibility to adopt changes incrementally, facilitating a smoother transition between major versions. While this increases the complexity for developing Remix the framework, this developer-centric approach greatly simplifies application development with Remix, ultimately leading to improved software quality and (hopefully!) developer satisfaction.

For a list of currently available Future Flags, please see the [`future`][remix-config-future] section in the `vite.config.ts` documentation.

[remix-config-future]: ../file-conventions/vite-config#future
[vite-config-future]: ../file-conventions/vite-config#future
[remix-config-future]: ../file-conventions/remix-config#future
[fetcherpersist-rfc]: /~https://github.com/remix-run/remix/discussions/7698
[use-fetchers]: ../hooks/use-fetchers
[use-fetcher]: ../hooks/use-fetcher
[relativesplatpath]: https://reactrouter.com/en/main/hooks/use-resolved-path#splat-paths
[single-fetch]: ../guides/single-fetch
4 changes: 2 additions & 2 deletions docs/start/v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -1110,8 +1110,8 @@ module.exports = {

Please see the [`serverModuleFormat`][server-module-format] section.

[classic-remix-compiler]: ../future/vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ../future/vite
[classic-remix-compiler]: ../guides/vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ../guides/vite
[future-flags]: ./future-flags
[remix_config]: ../file-conventions/remix-config
[pass_through_class]: https://nodejs.org/api/stream.html#class-streampassthrough
Expand Down
4 changes: 2 additions & 2 deletions docs/styling/bundling.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ Avoid using `export *` due to an [issue with `esbuild`'s CSS tree shaking][esbui
[css-modules]: ./css-modules
[vanilla-extract]: ./vanilla-extract
[regular-stylesheet-imports]: ./css
[classic-remix-compiler]: ../future/vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ../future/vite
[classic-remix-compiler]: ../guides/vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ../guides/vite
[vite-css]: https://vitejs.dev/guide/features#css
2 changes: 1 addition & 1 deletion docs/styling/css-imports.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ module.exports = {

[css-bundling]: ./bundling
[server-dependencies-to-bundle]: ../file-conventions/remix-config#serverdependenciestobundle
[remix-vite]: ../future/vite
[remix-vite]: ../guides/vite
4 changes: 2 additions & 2 deletions docs/styling/css-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ Button.displayName = "Button";

[css-bundling]: ./bundling
[css-modules]: /~https://github.com/css-modules/css-modules
[classic-remix-compiler]: ../future/vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ../future/vite
[classic-remix-compiler]: ../guides/vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ../guides/vite
[vite-css-modules]: https://vitejs.dev/guide/features#css-modules
4 changes: 2 additions & 2 deletions docs/styling/css.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,5 +332,5 @@ export const links: LinksFunction = () => {
[links]: ../route/links
[custom-properties]: https://developer.mozilla.org/en-US/docs/Web/CSS/--*
[link]: ../components/link
[classic-remix-compiler]: ../future/vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ../future/vite
[classic-remix-compiler]: ../guides/vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ../guides/vite
4 changes: 2 additions & 2 deletions docs/styling/postcss.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,6 @@ An example using SASS.
[css-bundling]: ./bundling
[postcss-preset-env]: https://preset-env.cssdb.org
[esbuild-css-tree-shaking-issue]: /~https://github.com/evanw/esbuild/issues/1370
[classic-remix-compiler]: ../future/vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ../future/vite
[classic-remix-compiler]: ../guides/vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ../guides/vite
[vite-postcss]: https://vitejs.dev/guide/features#postcss
4 changes: 2 additions & 2 deletions docs/styling/tailwind.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ Alternatively, you can use [PostCSS][built-in-post-css-support] with the [postcs
[built-in-post-css-support]: ./postcss
[tailwind-intelli-sense-extension]: https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss
[postcss-import]: /~https://github.com/postcss/postcss-import
[classic-remix-compiler]: ../future/vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ../future/vite
[classic-remix-compiler]: ../guides/vite#classic-remix-compiler-vs-remix-vite
[remix-vite]: ../guides/vite
[vite-postcss]: https://vitejs.dev/guide/features#postcss
Loading