Skip to content

Commit afd4cd3

Browse files
committed
remove settings tab
1 parent fc3b1da commit afd4cd3

File tree

10 files changed

+156
-314
lines changed

10 files changed

+156
-314
lines changed
Lines changed: 21 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,21 @@
1-
---
2-
title: "Settings Tab"
3-
summary: "The Settings tab lets you customize panel position, size, expansion level, triggers, URL flags, and route boundary gradient for React Router Devtools."
4-
description: "Detailed overview of all features on the Settings Tab."
5-
---
6-
The settings tab is where you can override the default settings for your project.
7-
8-
9-
## Position
10-
11-
This option is used to set the position of the React Router Devtools trigger (the button that opens the panel). The possible values are:
12-
- `top-left` - the trigger will be positioned at the top left corner of the screen
13-
- `top-right` - the trigger will be positioned at the top right corner of the screen
14-
- `bottom-left` - the trigger will be positioned at the bottom left corner of the screen
15-
- `bottom-right` - the trigger will be positioned at the bottom right corner of the screen
16-
- `middle-left` - the trigger will be positioned at the middle left of the screen
17-
- `middle-right` - the trigger will be positioned at the middle right of the screen
18-
19-
## Default Open
20-
21-
This option is used to set the initial state of the panel. If set to `true` the panel will be open by default, if set to `false`
22-
the panel will be closed by default.
23-
24-
## Expansion Level
25-
26-
This option is used to set the initial expansion level of the returned JSON data in the **Active Page** tab. By default it is set to
27-
0 and if you open up the **Active Page** and look at the returned loader data it will look like this:
28-
29-
```ts
30-
"data": { ... } +
31-
```
32-
33-
If you set the expansion level to 1 the returned loader data will look like this:
34-
35-
```ts
36-
"data": {
37-
"property": "value"
38-
}
39-
```
40-
41-
## Height
42-
43-
This option is used to set the initial height of the panel. The default value is 400px.
44-
45-
## Min Height
46-
47-
This option is used to set the minimum height of the panel. The default value is 200px.
48-
49-
## Max Height
50-
51-
This option is used to set the maximum height of the panel. The default value is 800px.
52-
53-
## Hide Until Hover
54-
55-
This option is used to set whether the trigger should be hidden until you hover over it. The default value is `false`.
56-
57-
## Panel Location
58-
59-
This option is used to set the location of the panel. The possible values are:
60-
- `top` - the panel will be positioned at the top of the screen
61-
- `bottom` - the panel will be positioned at the bottom of the screen
62-
63-
## Require URL Flag
64-
65-
This option is used to set whether the panel should be opened only if the URL contains a specific flag. The default value is `false`.
66-
67-
<WarningAlert title="Be careful!">
68-
If you set this option to `true` and you forget to set the URL flag, the panel will hide and you will not be able to see it
69-
until you enter the url flag.
70-
71-
The default one is `rdt=true` and if you set this option to `true` you will have to add `?rdt=true` to the URL in order to see the panel.
72-
</WarningAlert>
73-
74-
## URL Flag
75-
76-
This option is used to set the URL flag that is required to open the panel. The default value is `rdt`.
77-
78-
You can set it to whatever you wish and if you set the **Require URL Flag** option to `true` you will have to add `?yourFlag=true` to the URL in order to see the panel.
79-
80-
## Route Boundary Gradient
81-
82-
This option is used to set the color of the route boundary gradient. The possible values are:
83-
- `sea`
84-
- `hyper`
85-
- `gotham`
86-
- `gray`
87-
- `watermelon`
88-
- `ice`
89-
- `silver`
90-
91-
<InfoAlert>
92-
This changes the color of the route boundary gradient in the **Active Page** tab. When you hover over any route in the panel it will show you it's boundaries.
93-
</InfoAlert>
94-
95-
The default value is `ice`.
1+
---
2+
title: Settings Tab (Removed)
3+
summary: The Settings tab has been removed. Configuration is now done only through the Vite plugin.
4+
description: Information about the removed Settings Tab and how to configure React Router Devtools.
5+
---
6+
7+
The Settings tab has been removed from React Router Devtools. All configuration is now done exclusively through the Vite plugin configuration.
8+
9+
## How to Configure React Router Devtools
10+
11+
Configuration options are now set in your Vite configuration file. The available options are:
12+
13+
### Expansion Level
14+
15+
Controls the initial expansion level of JSON data in the Active Page tab. Default is 1.
16+
17+
### Route Boundary Gradient
18+
19+
Controls the color of the route boundary gradient shown when clicking Show Route Boundary on a route segment.
20+
21+
For more details, see the Client Configuration documentation.
Lines changed: 14 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -1,123 +1,41 @@
11
---
22
title: React Router Devtools Client Configuration
3-
summary: "The client configuration lets you customize React Router Devtools behavior, including panel position, size, URL flags, live URLs, breakpoints, and route boundary settings."
3+
summary: "The client configuration lets you customize React Router Devtools behavior through the Vite plugin, including expansion level and route boundary gradient settings."
44
description: Configuration options for the React Router Devtools client
55
---
66

7-
8-
<InfoAlert>
9-
All of the following options can be set in the dev tools panel **"Settings page"** and they override the default ones. Your preferences are
10-
stored in localStorage and if they do not exist there the default ones are used.
11-
</InfoAlert>
12-
137
Before we explain all the possible options here is the client configuration Typescript type:
148

159
```ts
1610
type RdtClientConfig = {
17-
position: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "middle-left" | "middle-right";
18-
liveUrls: { name: string, url: string }[];
19-
liveUrlsPosition: "top-left" | "top-right" | "bottom-left" | "bottom-right";
20-
defaultOpen: boolean;
2111
expansionLevel: number;
22-
height: number;
23-
minHeight: number;
24-
maxHeight: number;
25-
hideUntilHover: boolean;
26-
panelLocation: "top" | "bottom";
27-
requireUrlFlag: boolean;
28-
urlFlag: string;
29-
breakpoints: {name: string, min: number, max: number }[],
3012
routeBoundaryGradient: "sea" | "hyper" | "gotham" | "gray" | "watermelon" | "ice" | "silver";
31-
showBreakpointIndicator: boolean;
32-
showRouteBoundariesOn: "hover" | "click";
3313
}
3414
```
3515
36-
Let's go through each option and see what it does.
37-
38-
## Live URLs
39-
40-
This option is used to set the live urls that will be displayed in the bottom left corner of the screen. The default value is an empty array.
41-
It allows you to specify multiple live urls that you can use to open the current page in a new tab.
42-
43-
## Live URLs position
44-
45-
This option is used to set the position of the live urls that will be displayed in the bottom left corner of the screen. The possible values are:
46-
- `top-left` - the live urls will be positioned at the top left corner of the screen
47-
- `top-right` - the live urls will be positioned at the top right corner of the screen
48-
- `bottom-left` - the live urls will be positioned at the bottom left corner of the screen
49-
- `bottom-right` - the live urls will be positioned at the bottom right corner of the screen
50-
51-
## Position
52-
53-
This option is used to set the position of the React Router Devtools trigger (the button that opens the panel). The possible values are:
54-
- `top-left` - the trigger will be positioned at the top left corner of the screen
55-
- `top-right` - the trigger will be positioned at the top right corner of the screen
56-
- `bottom-left` - the trigger will be positioned at the bottom left corner of the screen
57-
- `bottom-right` - the trigger will be positioned at the bottom right corner of the screen
58-
- `middle-left` - the trigger will be positioned at the middle left of the screen
59-
- `middle-right` - the trigger will be positioned at the middle right of the screen
60-
61-
## Default Open
16+
<InfoAlert>
17+
Configuration can only be set through the Vite plugin. The settings are applied when the devtools are loaded.
18+
</InfoAlert>
6219
63-
This option is used to set the initial state of the panel. If set to `true` the panel will be open by default, if set to `false`
64-
the panel will be closed by default.
20+
Let's go through each option and see what it does.
6521
6622
## Expansion Level
6723
68-
This option is used to set the initial expansion level of the returned JSON data in the **Active Page** tab. By default it is set to
69-
1 and if you open up the **Active Page** and look at the returned loader data it will look like this:
70-
71-
```ts
72-
"data": { ... } +
73-
```
24+
This option is used to set the initial expansion level of the returned JSON data in the **Active Page** tab. The default value is `1`.
7425
75-
If you set the expansion level to 1 the returned loader data will look like this:
26+
If you open up the **Active Page** and look at the returned loader data with expansion level set to 1, it will look like this:
7627
7728
```ts
7829
"data": {
7930
"property": "value"
8031
}
8132
```
8233
83-
## Height
84-
85-
This option is used to set the initial height of the panel. The default value is 400px.
86-
87-
## Min Height
88-
89-
This option is used to set the minimum height of the panel. The default value is 200px.
90-
91-
## Max Height
92-
93-
This option is used to set the maximum height of the panel. The default value is 800px.
94-
95-
## Hide Until Hover
34+
If you set the expansion level to 0, the returned loader data will be collapsed:
9635
97-
This option is used to set whether the trigger should be hidden until you hover over it. The default value is `false`.
98-
99-
## Panel Location
100-
101-
This option is used to set the location of the panel. The possible values are:
102-
- `top` - the panel will be positioned at the top of the screen
103-
- `bottom` - the panel will be positioned at the bottom of the screen
104-
105-
## Require URL Flag
106-
107-
This option is used to set whether the panel should be opened only if the URL contains a specific flag. The default value is `false`.
108-
109-
<WarningAlert title="Be careful!">
110-
If you set this option to `true` and you forget to set the URL flag, the panel will hide and you will not be able to see it
111-
until you enter the url flag.
112-
113-
The default one is `rdt=true` and if you set this option to `true` you will have to add `?rdt=true` to the URL in order to see the panel.
114-
</WarningAlert>
115-
116-
## URL Flag
117-
118-
This option is used to set the URL flag that is required to open the panel. The default value is `rdt`.
119-
120-
You can set it to whatever you wish and if you set the **Require URL Flag** option to `true` you will have to add `?yourFlag=true` to the URL in order to see the panel.
36+
```ts
37+
"data": { ... } +
38+
```
12139
12240
## Route Boundary Gradient
12341
@@ -131,31 +49,10 @@ This option is used to set the color of the route boundary gradient. The possibl
13149
- `silver`
13250
13351
<InfoAlert>
134-
This changes the color of the route boundary gradient in the **Active Page** tab. When you hover over any route in the panel it will show you it's boundaries.
52+
This changes the color of the route boundary gradient in the **Active Page** tab. When you click the "Show Route Boundary" button on a route segment in the panel, it will highlight the route's boundaries with this gradient.
13553
</InfoAlert>
13654
137-
The default value is `ice`.
138-
139-
## Breakpoints
140-
141-
This option allows you to define custom breakpoints that show in the bottom left corner of the panel to help you determine the current screen breakpoint you have defined.
142-
By default the breakpoints are set to tailwind breakpoints but you can change them to whatever you want.
143-
144-
Eg:
145-
```ts
146-
breakpoints: [{name: "lg", min: 0, max: 768}, {name: "xl", min: 768, max: 1024}, {name: "2xl", min: 1024, max: Infinity}],
147-
```
148-
149-
## Show breakpoint indicator
150-
151-
This option allows you to show/hide the current breakpoint in the bottom left corner of the panel.
152-
153-
## Show route boundaries on
154-
155-
This option allows you to either show route boundaries when you hover a route segment on the pages tab or
156-
it shows a dedicated button called "Show Route Boundary" that shows the route boundary for that route on click.
157-
158-
Default value is `click`;
55+
The default value is `watermelon`.
15956
16057
## Creating a custom configuration
16158
@@ -166,19 +63,8 @@ To create a custom configuration you can use the following code snippet:
16663

16764
const customConfig = defineRdtConfig({
16865
client: {
169-
position: "top-right",
170-
defaultOpen: true,
171-
expansionLevel: 1,
172-
height: 500,
173-
minHeight: 300,
174-
maxHeight: 1000,
175-
hideUntilHover: true,
176-
panelLocation: "bottom",
177-
requireUrlFlag: true,
178-
urlFlag: "customFlag",
66+
expansionLevel: 2,
17967
routeBoundaryGradient: "gotham",
180-
breakpoints: [{name: "lg", min: 0, max: 768}, {name: "xl", min: 768, max: 1024}, {name: "2xl", min: 1024, max: Infinity}],
181-
showBreakpointIndicator: false
18268
}
18369
});
18470

@@ -195,7 +81,3 @@ export default defineConfig({
19581
plugins: [reactRouterDevTools(customConfig)],
19682
});
19783
```
198-
199-
<InfoAlert title="Try it out!">
200-
Try opening up the dev tools panel deployed on this site and playing around with the settings in the settings tab!
201-
</InfoAlert>

0 commit comments

Comments
 (0)