Skip to content

Commit ef7c28a

Browse files
atrakhConvex, Inc.
authored andcommitted
dashboard: add navbar to project settings page (#34414)
Adds a sticky navbar to the project settings page that has a faux-scrollbar which scrolls alongside the main content to indicate how far you are scrolled in the navbar. Also, the elements that are currently in view are highlighted. Clicking on a nav item scrolls that section into view. URL hash matching one of the section ids will scroll directly to that section, making docs links easier to use. GitOrigin-RevId: 12fea75c1d8da03c1125ccc5f74e7c0abde400be
1 parent 663640f commit ef7c28a

File tree

3 files changed

+271
-101
lines changed

3 files changed

+271
-101
lines changed

npm-packages/dashboard/src/components/projects/ProjectForm.tsx

Lines changed: 53 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -58,58 +58,61 @@ export function ProjectForm({
5858
onSubmit={formState.handleSubmit}
5959
aria-label="Edit project settings"
6060
>
61-
<div className="mb-6 flex max-w-xs flex-col gap-4">
62-
<Tooltip
63-
tip={
64-
!hasAdminPermissions
65-
? "You do not have permission to update the project name."
66-
: undefined
67-
}
68-
>
69-
<TextInput
70-
label="Project Name"
71-
outerClassname="max-w-[20rem]"
72-
placeholder="Enter a name for your project"
73-
onChange={formState.handleChange}
74-
value={formState.values.name}
75-
id="name"
76-
error={formState.errors.name}
77-
disabled={!hasAdminPermissions}
78-
/>
79-
</Tooltip>
61+
<div className="flex flex-col gap-6">
62+
<div className="flex max-w-xs flex-col gap-4">
63+
<Tooltip
64+
tip={
65+
!hasAdminPermissions
66+
? "You do not have permission to update the project name."
67+
: undefined
68+
}
69+
>
70+
<TextInput
71+
label="Project Name"
72+
outerClassname="max-w-[20rem]"
73+
placeholder="Enter a name for your project"
74+
onChange={formState.handleChange}
75+
value={formState.values.name}
76+
id="name"
77+
error={formState.errors.name}
78+
disabled={!hasAdminPermissions}
79+
/>
80+
</Tooltip>
8081

81-
<Tooltip
82-
tip={
83-
!hasAdminPermissions
84-
? "You do not have permission to update the project slug."
85-
: undefined
86-
}
87-
>
88-
<TextInput
89-
label="Project Slug"
90-
outerClassname="max-w-[20rem]"
91-
placeholder="Enter a slug for your project"
92-
onChange={formState.handleChange}
93-
value={formState.values.slug}
94-
Icon={CopyIcon}
95-
action={() => copyToClipboard(formState.values.slug)}
96-
id="slug"
97-
error={formState.errors.slug}
98-
disabled={!hasAdminPermissions}
99-
/>
100-
</Tooltip>
101-
</div>
82+
<Tooltip
83+
tip={
84+
!hasAdminPermissions
85+
? "You do not have permission to update the project slug."
86+
: undefined
87+
}
88+
>
89+
<TextInput
90+
label="Project Slug"
91+
outerClassname="max-w-[20rem]"
92+
placeholder="Enter a slug for your project"
93+
onChange={formState.handleChange}
94+
value={formState.values.slug}
95+
Icon={CopyIcon}
96+
action={() => copyToClipboard(formState.values.slug)}
97+
id="slug"
98+
error={formState.errors.slug}
99+
disabled={!hasAdminPermissions}
100+
/>
101+
</Tooltip>
102+
</div>
102103

103-
<Button
104-
className="float-right"
105-
disabled={
106-
!formState.dirty || formState.isSubmitting || !formState.isValid
107-
}
108-
type="submit"
109-
aria-label="submit"
110-
>
111-
Save
112-
</Button>
104+
<div className="flex justify-end">
105+
<Button
106+
disabled={
107+
!formState.dirty || formState.isSubmitting || !formState.isValid
108+
}
109+
type="submit"
110+
aria-label="submit"
111+
>
112+
Save
113+
</Button>
114+
</div>
115+
</div>
113116
</form>
114117
</Sheet>
115118
);

npm-packages/dashboard/src/hooks/useLaunchDarkly.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const flagDefaults = {
77
dataPageInactivityTime: -1,
88
localDeployments: false,
99
askAi: false,
10-
projectTransfer: false,
1110
};
1211

1312
function kebabCaseKeys(object: typeof flagDefaults) {

0 commit comments

Comments
 (0)