Skip to content
Open
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
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
"react-hook-form": "^7.44.3",
"react-hot-toast": "^2.4.0",
"react-icons": "^4.11.0",
"react-textarea-autosize": "^8.5.9",
"react-use-wizard": "^2.2.3",
"recharts": "^2.12.7",
"sharp": "^0.33.4",
Expand Down
5 changes: 3 additions & 2 deletions apps/web/src/components/AddFeatureFlagModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { RadioSelect } from "./RadioSelect";
import { Toggle } from "./Toggle";
import { Input } from "./ui/input";
import { Label } from "./ui/label";
import TextareaAutosize from "react-textarea-autosize";

type Props = {
onClose: () => void;
Expand Down Expand Up @@ -124,13 +125,13 @@ export function ChangeFlagForm({
/>
)}
{state.type === "STRING" && (
<Input
type="text"
<TextareaAutosize
value={state.value}
onChange={(e) => onChange({ value: e.target.value })}
placeholder={
isRemoteConfig ? "My Remote Config" : "My Feature Flag"
}
className="w-full resize-none rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring overflow-hidden"
/>
)}
{state.type === "NUMBER" && (
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const Dropdown = ({ triggerIcon: Icon, children, className }: Props) => {
type ItemProps = {
children: React.ReactNode;
shortcut?: string;
} & DropdownMenu.MenuItemProps;
} & DropdownMenu.DropdownMenuItemProps;

export const Item = ({
children,
Expand Down
12 changes: 7 additions & 5 deletions apps/web/src/components/FeatureFlag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ export const FeatureFlag = ({
}
const keys = Object.keys(parsed);
if (keys.length === 0) return "{ }";
return `{ ${keys[0]}: ..., ${keys.length > 1 ? `+${keys.length - 1} more` : ""} }`;
return `{ ${keys[0]}: ..., ${
keys.length > 1 ? `+${keys.length - 1} more` : ""
} }`;
}
return value;
} catch {
Expand Down Expand Up @@ -257,13 +259,13 @@ export const FeatureFlag = ({
className="justify-between w-full group"
onClick={() => setIsUpdateModalOpen(true)}
>
<div className="flex items-center gap-2">
<div className="flex items-center gap-2 overflow-hidden">
<span className={cn("text-sm", envStyle.text)}>
Current value:
</span>
<code
className={cn(
"px-2 py-1 rounded font-mono",
"px-2 py-1 rounded font-mono max-w-[150px] truncate",
envStyle.bg,
envStyle.text
)}
Expand All @@ -282,7 +284,7 @@ export const FeatureFlag = ({
className="justify-between w-full group"
onClick={() => setIsUpdateModalOpen(true)}
>
<div className="flex items-center gap-2">
<div className="flex items-center gap-2 overflow-hidden">
<span className={cn("text-sm", envStyle.text)}>
Current value:
</span>
Expand All @@ -307,7 +309,7 @@ export const FeatureFlag = ({
className="items-center justify-between w-full group"
onClick={() => setIsUpdateModalOpen(true)}
>
<div className="flex items-center gap-2">
<div className="flex items-center gap-2 overflow-hidden">
<span className={cn("text-sm", envStyle.text)}>
Current value:
</span>
Expand Down
4 changes: 3 additions & 1 deletion apps/web/src/components/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ export const Modal = ({
<DialogContent className={cn(size === "full" && "sm:max-w-[980px]")}>
<DialogTitle> {title} </DialogTitle>
<DialogDescription>{subtitle}</DialogDescription>
<div className="my-6 text-pink-50">{children}</div>
<div className="my-6 text-pink-50 max-h-[60vh] overflow-y-auto">
{children}
</div>

<DialogFooter>
<Button variant="secondary" onClick={onClose}>
Expand Down
Loading
Loading