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

[WEB-574] chore: added new events #3949

Draft
wants to merge 65 commits into
base: preview
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
ef05746
chore: title, description removed from change_details
1akhanBaheti Feb 20, 2024
8cd651f
Merge branch 'develop' of https://github.com/makeplane/plane into cho…
1akhanBaheti Feb 20, 2024
64fe785
chore: user properties update
1akhanBaheti Feb 21, 2024
c237eff
chore: added project-views related events
1akhanBaheti Feb 21, 2024
dd54f6b
chore: added getter for track-element
1akhanBaheti Feb 21, 2024
fc5901d
chore: updated project-pages related events
1akhanBaheti Feb 22, 2024
8886afa
chore: issue-open from sidebar events added
1akhanBaheti Feb 22, 2024
238d437
chore: issues-list open event refactored
1akhanBaheti Feb 22, 2024
b354eb8
Merge branch 'develop' of https://github.com/makeplane/plane into cho…
1akhanBaheti Feb 23, 2024
7143c98
chore: added issues filters & layout related events
1akhanBaheti Feb 23, 2024
41c11f7
fix: build warnings
1akhanBaheti Feb 23, 2024
b7aeb0f
Merge branch 'develop' of https://github.com/makeplane/plane into cho…
1akhanBaheti Feb 29, 2024
d263335
chore: added issue open related events
1akhanBaheti Feb 29, 2024
6108f98
chore: updated project member invite events
1akhanBaheti Mar 4, 2024
c94375e
chore: project state events updated
1akhanBaheti Mar 4, 2024
38fbf1f
chore: label events added
1akhanBaheti Mar 4, 2024
604b9c7
chore: added project automation events
1akhanBaheti Mar 5, 2024
6c78b98
added comment events
1akhanBaheti Mar 5, 2024
6cea3f5
estimates events added
1akhanBaheti Mar 6, 2024
cd8de9b
Merge branch 'develop' of https://github.com/makeplane/plane into cho…
1akhanBaheti Mar 6, 2024
b9b7bf1
Merge branch 'develop' of https://github.com/makeplane/plane into cho…
1akhanBaheti Mar 8, 2024
b98e0fe
Merge branch 'develop' of https://github.com/makeplane/plane into cho…
1akhanBaheti Mar 8, 2024
f90e317
chore: refactoring
1akhanBaheti Mar 8, 2024
35a9527
chore: telemetry setup for cloud & selfhosted
1akhanBaheti Mar 11, 2024
2b8569a
chore: added workspace settings events
1akhanBaheti Mar 11, 2024
f6fd579
Merge branch 'develop' of https://github.com/makeplane/plane into cho…
1akhanBaheti Mar 11, 2024
84a6289
Merge branch 'develop' of github.com:makeplane/plane into chore/event…
pablohashescobar Mar 11, 2024
787af3d
dev: add anonymous telemetry field in instance
pablohashescobar Mar 11, 2024
967f9c9
fix: filter event logic
1akhanBaheti Mar 12, 2024
2c4b92d
Merge branch 'develop' of https://github.com/makeplane/plane into cho…
1akhanBaheti Mar 12, 2024
2a51e17
Merge branch 'chore/event-improvements' of https://github.com/makepla…
1akhanBaheti Mar 12, 2024
5b2e271
chore: added telemetry key refrences
1akhanBaheti Mar 12, 2024
e551dac
chore: telemetry update & refactoring
1akhanBaheti Mar 12, 2024
670ba09
Merge branch 'develop' of https://github.com/makeplane/plane into cho…
1akhanBaheti Mar 12, 2024
05c08ef
fix: build warnings
1akhanBaheti Mar 13, 2024
75d8560
chore: added page viewed event
1akhanBaheti Mar 14, 2024
0970d71
chore: All event elements defined in constants.
1akhanBaheti Mar 15, 2024
f289947
fix: build error
1akhanBaheti Mar 15, 2024
72d1b5d
Merge branch 'develop' of https://github.com/makeplane/plane into cho…
1akhanBaheti Mar 18, 2024
68c9107
fix: lints
1akhanBaheti Mar 18, 2024
b7fd570
Merge branch 'develop' of https://github.com/makeplane/plane into cho…
1akhanBaheti Apr 26, 2024
e178bba
feat: session authentication and god-mode implementation (#4302)
sriramveeraghanta Apr 29, 2024
bd75bf7
chore: updated file structure for admin
gurusainath Apr 29, 2024
7061ef4
fix: merge conflicts resolved
sriramveeraghanta Apr 29, 2024
9b3f1a1
fix: build errors
1akhanBaheti Apr 29, 2024
e476f70
Merge branch 'develop' of https://github.com/makeplane/plane into cho…
1akhanBaheti Apr 29, 2024
7ceec94
fix: whitespace
1akhanBaheti Apr 29, 2024
56e9993
chore: updated admin-sidebar
gurusainath Apr 29, 2024
0d7f476
Merge branch 'develop' of https://github.com/makeplane/plane into cho…
1akhanBaheti Apr 29, 2024
a28cca2
chore: telemetery fields in new instance type defination
1akhanBaheti Apr 29, 2024
c389c6b
fix: merge conflicts resolved
sriramveeraghanta Apr 29, 2024
aab34ff
chore: inbox events
1akhanBaheti Apr 30, 2024
bcd3835
project favorite event
1akhanBaheti Apr 30, 2024
b009d8d
fix: lints
1akhanBaheti Apr 30, 2024
d8e54cd
Merge branch 'develop' of https://github.com/makeplane/plane into cho…
1akhanBaheti Apr 30, 2024
16da29b
fix: merge conflicts resolved
sriramveeraghanta Apr 30, 2024
12b4f74
feat(dashboard): improve label readability (#4321)
redrum15 Apr 30, 2024
bce768d
chore: module events updated
1akhanBaheti May 1, 2024
801f135
chore: cycle events updated
1akhanBaheti May 2, 2024
2669e8e
Merge branch 'develop' of https://github.com/makeplane/plane into cho…
1akhanBaheti May 2, 2024
63b6bfd
fix: lints
1akhanBaheti May 2, 2024
87f56f8
fix: module conflicts
1akhanBaheti May 2, 2024
9f9b312
chore: pages events updated
1akhanBaheti May 2, 2024
2f67ca7
chore: views events updated
1akhanBaheti May 2, 2024
697165e
Merge branch 'preview' of https://github.com/makeplane/plane into cho…
1akhanBaheti May 22, 2024
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 .github/workflows/feature-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ on:
description: "Build Admin"
type: boolean
default: false
admin-build:
required: false
description: 'Build Admin'
type: boolean
default: false

env:
BUILD_WEB: ${{ github.event.inputs.web-build }}
Expand Down
128 changes: 128 additions & 0 deletions admin/app/ai/components/ai-config-form.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
import { FC } from "react";
import { useForm } from "react-hook-form";
import { Lightbulb } from "lucide-react";
import { Button, TOAST_TYPE, setToast } from "@plane/ui";
import { IFormattedInstanceConfiguration, TInstanceAIConfigurationKeys } from "@plane/types";
// components
import { ControllerInput, TControllerInputFormField } from "components/common";
// hooks
import { useInstance } from "@/hooks";

type IInstanceAIForm = {
config: IFormattedInstanceConfiguration;
};

type AIFormValues = Record<TInstanceAIConfigurationKeys, string>;

export const InstanceAIForm: FC<IInstanceAIForm> = (props) => {
const { config } = props;
// store
const { updateInstanceConfigurations } = useInstance();
// form data
const {
handleSubmit,
control,
formState: { errors, isSubmitting },
} = useForm<AIFormValues>({
defaultValues: {
OPENAI_API_KEY: config["OPENAI_API_KEY"],
GPT_ENGINE: config["GPT_ENGINE"],
},
});

const aiFormFields: TControllerInputFormField[] = [
{
key: "GPT_ENGINE",
type: "text",
label: "GPT_ENGINE",
description: (
<>
Choose an OpenAI engine.{" "}
<a
href="https://platform.openai.com/docs/models/overview"
target="_blank"
className="text-custom-primary-100 hover:underline"
rel="noreferrer"
>
Learn more
</a>
</>
),
placeholder: "gpt-3.5-turbo",
error: Boolean(errors.GPT_ENGINE),
required: false,
},
{
key: "OPENAI_API_KEY",
type: "password",
label: "API key",
description: (
<>
You will find your API key{" "}
<a
href="https://platform.openai.com/api-keys"
target="_blank"
className="text-custom-primary-100 hover:underline"
rel="noreferrer"
>
here.
</a>
</>
),
placeholder: "sk-asddassdfasdefqsdfasd23das3dasdcasd",
error: Boolean(errors.OPENAI_API_KEY),
required: false,
},
];

const onSubmit = async (formData: AIFormValues) => {
const payload: Partial<AIFormValues> = { ...formData };

await updateInstanceConfigurations(payload)
.then(() =>
setToast({
type: TOAST_TYPE.SUCCESS,
title: "Success",
message: "AI Settings updated successfully",
})
)
.catch((err) => console.error(err));
};

return (
<div className="space-y-8">
<div className="space-y-3">
<div>
<div className="pb-1 text-xl font-medium text-custom-text-100">OpenAI</div>
<div className="text-sm font-normal text-custom-text-300">If you use ChatGPT, this is for you.</div>
</div>
<div className="grid-col grid w-full grid-cols-1 items-center justify-between gap-x-16 gap-y-8 lg:grid-cols-3">
{aiFormFields.map((field) => (
<ControllerInput
key={field.key}
control={control}
type={field.type}
name={field.key}
label={field.label}
description={field.description}
placeholder={field.placeholder}
error={field.error}
required={field.required}
/>
))}
</div>
</div>

<div className="space-y-4">
<Button variant="primary" onClick={handleSubmit(onSubmit)} loading={isSubmitting}>
{isSubmitting ? "Saving..." : "Save changes"}
</Button>

<div className="relative inline-flex items-center gap-2 rounded border border-custom-primary-100/20 bg-custom-primary-100/10 px-4 py-2 text-xs text-custom-primary-200">
<Lightbulb height="14" width="14" />
<div>If you have a preferred AI models vendor, please get in touch with us.</div>
</div>
</div>
</div>
);
};
1 change: 1 addition & 0 deletions admin/app/ai/components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./ai-config-form";
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
"use client";

import { FC } from "react";
// helpers
import { cn } from "helpers/common.helper";

type Props = {
name: string;
description: string;
icon: JSX.Element;
config: JSX.Element;
disabled?: boolean;
withBorder?: boolean;
};

export const AuthenticationMethodCard: FC<Props> = (props) => {
const { name, description, icon, config, disabled = false, withBorder = true } = props;

return (
<div
className={cn("w-full flex items-center gap-14 rounded", {
"px-4 py-3 border border-custom-border-200": withBorder,
})}
>
<div className="flex grow items-center gap-4">
<div className="shrink-0">
<div className="flex h-10 w-10 items-center justify-center rounded-full bg-custom-background-80">{icon}</div>
</div>
<div className="grow">
<div
className={cn("font-medium leading-5 text-custom-text-100", {
"text-sm": withBorder,
"text-xl": !withBorder,
})}
>
{name}
</div>
<div
className={cn("font-normal leading-5 text-custom-text-300", {
"text-xs": withBorder,
"text-sm": !withBorder,
})}
>
{description}
</div>
</div>
</div>
<div className={`shrink-0 ${disabled && "opacity-70"}`}>{config}</div>
</div>
);
};
1 change: 1 addition & 0 deletions admin/app/authentication/components/common/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./authentication-method-card";
Loading
Loading