From e8c627bb094d2fb2231afe1eb0871cffa2688486 Mon Sep 17 00:00:00 2001
From: "Tim R. Bula"
Date: Tue, 24 Jan 2023 12:34:38 -0600
Subject: [PATCH] fix: a bunch of visual defects
---
.../CreateWorkflowContent.tsx | 11 ++-
.../CreateWorkflowContent.tsx | 11 ++-
.../ImportWorkflowContent.tsx | 6 +-
.../EditTaskTemplateForm.tsx | 16 ++---
src/Components/LabelModal/LabelModal.tsx | 4 +-
.../__snapshots__/PreviewConfig.spec.tsx.snap | 2 +-
.../ScheduleManagerForm.tsx | 10 +--
.../SchedulePanelDetail.module.scss | 1 +
.../SchedulePanelList.module.scss | 1 +
.../TemplateConfigModalContent.tsx | 22 ++----
.../TemplateConfigModalContent.tsx | 4 +-
src/Constants/index.ts | 6 +-
.../ApproveRejectActions.module.scss | 14 ++--
.../ApproveRejectActions.tsx | 28 ++++----
src/Features/App/Navbar/Navbar.tsx | 4 +-
.../ApproverGroupsTable.tsx | 6 --
.../CreateEditGroupModal.tsx | 36 ++++++----
.../CreateEditGroupModalContent.tsx | 2 +-
.../createEditGroupModalContent.module.scss | 1 +
src/Features/Editor/Configure/Configure.tsx | 60 ++++-------------
.../ConfigureStorage/ConfigureStorage.tsx | 4 +-
.../Configure/CreateToken/CreateToken.tsx | 2 +-
.../Configure/CustomLabel/CustomLabel.tsx | 4 +-
.../Editor/Configure/configure.module.scss | 10 ++-
.../PropertiesModalContent.tsx | 8 +--
.../Editor/__snapshots__/Editor.spec.jsx.snap | 1 +
.../TaskApprovalModal/TaskApprovalModal.tsx | 7 +-
.../TaskApprovalModal.spec.jsx.snap | 11 +--
.../taskApprovalModal.module.scss | 9 ---
.../TaskExecutionLog/TaskExecutionLog.tsx | 4 +-
.../CreateEditPropertiesContent.tsx | 6 +-
.../__snapshots__/Insights.spec.jsx.snap | 26 ++++---
.../ManageTeamTasks/Header/header.module.scss | 2 +-
.../ManageTeamTasks/ManageTeamTasks.tsx | 35 ++++++++--
.../AddTaskTemplate/AddTaskTemplate.tsx | 2 +-
.../AddTaskTemplateForm.tsx | 16 ++---
.../ManageTeamTasks/Sidenav/Sidenav.tsx | 67 ++++++++++++++-----
.../taskTemplateOverview.module.scss | 3 +-
.../taskTemplateYamlEditor.module.scss | 3 +-
.../ManageTeamTasks/taskTemplates.module.scss | 2 +-
.../QuotaEditModalContent.tsx | 2 +-
.../Header/__snapshots__/Header.spec.jsx.snap | 2 +-
.../TaskTemplates/Header/header.module.scss | 2 +-
.../AddTaskTemplate/AddTaskTemplate.tsx | 2 +-
.../AddTaskTemplateForm.tsx | 16 ++---
.../TaskTemplates/Sidenav/Sidenav.tsx | 1 +
.../TaskTemplateOverview.spec.jsx.snap | 16 ++---
.../taskTemplateOverview.module.scss | 3 +-
.../taskTemplateYamlEditor.module.scss | 3 +-
.../__snapshots__/TaskTemplates.spec.tsx.snap | 5 +-
.../TaskTemplates/taskTemplates.module.scss | 2 +-
.../UpdateTeamName/UpdateTeamName.tsx | 2 +-
.../CreateEditTeamPropertiesModalContent.tsx | 6 +-
.../TeamPropertiesTable.tsx | 7 +-
.../TeamPropertiesTable.spec.tsx.snap | 2 +-
.../TeamProperties.spec.jsx.snap | 2 +-
.../CreateToken/Form/index.tsx | 2 +-
.../__snapshots__/index.spec.tsx.snap | 5 ++
.../TeamTokens/TeamTokenComponent/index.tsx | 10 ++-
.../Teams/AddTeamContent/AddTeamContent.tsx | 2 +-
.../CreateToken/Form/index.tsx | 6 +-
.../DeleteToken/index.tsx | 2 +-
.../__snapshots__/index.spec.tsx.snap | 5 ++
.../Tokens/GlobalTokenComponent/index.tsx | 2 +
.../WorkflowQuotaModalContent.module.scss | 3 +-
src/Features/Workflows/Workflows.tsx | 4 +-
.../__snapshots__/Workflows.spec.jsx.snap | 4 +-
src/Types/index.tsx | 10 +--
68 files changed, 312 insertions(+), 283 deletions(-)
diff --git a/src/Components/CreateTemplateWorkflow/CreateWorkflowContent/CreateWorkflowContent.tsx b/src/Components/CreateTemplateWorkflow/CreateWorkflowContent/CreateWorkflowContent.tsx
index dc28727a2..215438883 100644
--- a/src/Components/CreateTemplateWorkflow/CreateWorkflowContent/CreateWorkflowContent.tsx
+++ b/src/Components/CreateTemplateWorkflow/CreateWorkflowContent/CreateWorkflowContent.tsx
@@ -155,9 +155,6 @@ const CreateWorkflowContent: React.FC = ({
placeholder="Select a team"
invalid={teamError && teamTouched}
invalidText="Team is required"
- shouldFilterItem={({ item, inputValue }: { item: ComboBoxItem; inputValue: string }) =>
- item && item.name.toLowerCase().includes(inputValue.toLowerCase())
- }
/>
= ({
value={values.name}
onBlur={handleBlur}
onChange={handleChange}
- invalid={errors.name && touched.name}
+ invalid={Boolean(errors.name && touched.name)}
invalidText={errors.name}
/>
@@ -177,7 +174,7 @@ const CreateWorkflowContent: React.FC = ({
value={values.name}
onBlur={handleBlur}
onChange={handleChange}
- invalid={errors.name && touched.name}
+ invalid={Boolean(errors.name && touched.name)}
invalidText={errors.name}
/>
)}
@@ -187,7 +184,7 @@ const CreateWorkflowContent: React.FC = ({
value={values.summary}
onBlur={handleBlur}
onChange={handleChange}
- invalid={errors.summary && touched.summary}
+ invalid={Boolean(errors.summary && touched.summary)}
invalidText={errors.summary}
/>
= ({
labelText="Label Key"
value={values.key}
onChange={handleChange}
- invalid={errors.key && touched.key}
+ invalid={Boolean(errors.key && touched.key)}
invalidText={errors.key}
onBlur={handleBlur}
/>
@@ -134,7 +134,7 @@ const AddLabelModalContent: React.FC = ({
labelText="Label Value"
value={values.value}
onChange={handleChange}
- invalid={errors.value && touched.value}
+ invalid={Boolean(errors.value && touched.value)}
onBlur={handleBlur}
invalidText={errors.value}
/>
diff --git a/src/Components/PreviewConfig/__snapshots__/PreviewConfig.spec.tsx.snap b/src/Components/PreviewConfig/__snapshots__/PreviewConfig.spec.tsx.snap
index 99970f13c..e2eaa4e4c 100644
--- a/src/Components/PreviewConfig/__snapshots__/PreviewConfig.spec.tsx.snap
+++ b/src/Components/PreviewConfig/__snapshots__/PreviewConfig.spec.tsx.snap
@@ -14,7 +14,7 @@ exports[`PreviewConfig --- Snapshot > Capturing Snapshot of Task Templates 1`] =
diff --git a/src/Components/ScheduleManagerForm/ScheduleManagerForm.tsx b/src/Components/ScheduleManagerForm/ScheduleManagerForm.tsx
index c44201a53..4fa7915ac 100644
--- a/src/Components/ScheduleManagerForm/ScheduleManagerForm.tsx
+++ b/src/Components/ScheduleManagerForm/ScheduleManagerForm.tsx
@@ -192,7 +192,7 @@ export default function CreateEditForm(props: CreateEditFormProps) {
helperText="Workflow for this Schedule to execute"
id="workflow"
initialSelectedItem={formikProps.values.workflow}
- items={props.workflowOptions}
+ items={props?.workflowOptions ?? []}
itemToString={(workflow: WorkflowSummary) => {
if (workflow?.scope === "team") {
const team = workflow ? teams.find((team: FlowTeam) => team.id === workflow.flowTeamId) : undefined;
@@ -244,13 +244,13 @@ export default function CreateEditForm(props: CreateEditFormProps) {
valueLabelText="Label value"
valuePlaceholder="important"
value={formikProps.values.labels}
- onChange={(labels: string) => formikProps.setFieldValue("labels", labels)}
+ onChange={(labels) => formikProps.setFieldValue("labels", labels)}
/>
Schedule
- What type of Schedule do you want to create?
+ What type of Schedule do you want to create?
{
helperText="What time zone do you want to use"
id="timezone"
initialSelectedItem={values.timezone}
- items={this.props.timezoneOptions}
+ items={this.props?.timezoneOptions ?? []}
onChange={({ selectedItem }: { selectedItem: { label: string; value: string } }) => {
const item = selectedItem ?? { label: "", value: "" };
this.props.formikProps.setFieldValue("timezone", item);
@@ -436,7 +436,7 @@ class CronJobConfig extends React.Component {
{(formikProps) => {
- const {
- values,
- touched,
- errors,
- handleBlur,
- handleChange,
- handleSubmit,
- setFieldValue,
- isValid,
- } = formikProps;
+ const { values, touched, errors, handleBlur, handleChange, handleSubmit, setFieldValue, isValid } =
+ formikProps;
return (
@@ -297,7 +289,7 @@ class TemplateConfigModalContent extends Component
-
{`${values[id]?.comments.length}/200`}
);
@@ -337,18 +338,19 @@ function SingleActionSection({ formikBag, action, isAlreadyApproved, user }: Sin
- {`Submitted ${dateHelper.humanizedSimpleTimeAgo(creationDate)}`}
+ {`Submitted ${dateHelper.humanizedSimpleTimeAgo(creationDate)}`}
{!isAlreadyApproved ? (
<>
-
Approvals
-
{`${numberOfApprovals}/${approvalsRequired} approvals`}
-
+ Approvals
+ {`${numberOfApprovals}/${approvalsRequired} approvals`}
+
Number of required approvals that have been received in order for this component to proceed.
-
+
-
{`${values[id]?.comments.length}/200`}
>
) : (
-
Your input
-
+ Your input
+
{status !== ApprovalStatus.Submitted
? `This action is already ${status}`
: "You already submitted your response for this action."}
-
+
)}
{Array.isArray(actioners) && actioners.length && (
-
Approvers who submitted
+
Approvers who submitted
diff --git a/src/Features/App/Navbar/Navbar.tsx b/src/Features/App/Navbar/Navbar.tsx
index 817e166fb..b244af141 100644
--- a/src/Features/App/Navbar/Navbar.tsx
+++ b/src/Features/App/Navbar/Navbar.tsx
@@ -24,7 +24,7 @@ function getRelativePath(navUrl: string) {
const createSidenav =
(flowNavigationData: FlowNavigationItem[]) =>
- ({ isOpen, close }) =>
+ ({ isOpen, close }: { isOpen: boolean; close: () => void }) =>
(
@@ -100,7 +100,7 @@ export default function Navbar({
platformName={platformName}
productName={appName}
skipToContentProps={skipToContentProps}
- user={userData as FlowUser}
+ user={userData}
supportMenuItems={[
,
,
diff --git a/src/Features/ApproverGroups/ApproverGroupsTable/ApproverGroupsTable.tsx b/src/Features/ApproverGroups/ApproverGroupsTable/ApproverGroupsTable.tsx
index ba76dd0ca..f2b123775 100644
--- a/src/Features/ApproverGroups/ApproverGroupsTable/ApproverGroupsTable.tsx
+++ b/src/Features/ApproverGroups/ApproverGroupsTable/ApproverGroupsTable.tsx
@@ -215,9 +215,6 @@ function ApproverGroupsTable({
selectedItem && setActiveTeam(selectedItem);
}}
placeholder="Select a team"
- shouldFilterItem={({ item, inputValue }: { item: any; inputValue: string }) =>
- item?.name?.toLowerCase()?.includes(inputValue.toLowerCase())
- }
/>
- item?.name?.toLowerCase()?.includes(inputValue.toLowerCase())
- }
/>
diff --git a/src/Features/ApproverGroups/ApproverGroupsTable/CreateEditGroupModal/CreateEditGroupModal.tsx b/src/Features/ApproverGroups/ApproverGroupsTable/CreateEditGroupModal/CreateEditGroupModal.tsx
index 378d678b4..8e9aebe5e 100644
--- a/src/Features/ApproverGroups/ApproverGroupsTable/CreateEditGroupModal/CreateEditGroupModal.tsx
+++ b/src/Features/ApproverGroups/ApproverGroupsTable/CreateEditGroupModal/CreateEditGroupModal.tsx
@@ -13,12 +13,7 @@ type CreateEditGroupModalProps = {
team?: FlowTeam | null;
};
-function CreateEditGroupModal({
- isEdit,
- approverGroup,
- approverGroups,
- team,
-}: CreateEditGroupModalProps) {
+function CreateEditGroupModal({ isEdit, approverGroup, approverGroups, team }: CreateEditGroupModalProps) {
/**
* arrays of values for making the key unique
* filter out own value if editing a approverGroup, pass through all if creating
@@ -27,24 +22,37 @@ function CreateEditGroupModal({
if (Array.isArray(approverGroups)) {
approverGroupNames = approverGroups.map((configurationObj) => configurationObj.groupName.toLowerCase());
if (isEdit && approverGroup) {
- approverGroupNames = approverGroupNames.filter((approverGroupItem) => approverGroupItem !== approverGroup.groupName.toLowerCase());
+ approverGroupNames = approverGroupNames.filter(
+ (approverGroupItem) => approverGroupItem !== approverGroup.groupName.toLowerCase()
+ );
}
}
const cancelRequestRef = React.useRef
();
return (
- !isEdit ?
- Create new group
- :
-
+ !isEdit ? (
+
+ Create new group
+
+ ) : (
+
+ )
}
modalHeaderProps={{
title: isEdit && approverGroup ? `Edit ${approverGroup.groupName}` : "Create new group",
- subtitle: "Choose a group name, then add users from a selected Team. Groups can only be formed with users from the same Team. Members will receive an email notification about their new permissions.",
+ subtitle:
+ "Choose a group name, then add users from a selected Team. Groups can only be formed with users from the same Team. Members will receive an email notification about their new permissions.",
}}
onCloseModal={() => {
if (cancelRequestRef.current) cancelRequestRef.current();
diff --git a/src/Features/ApproverGroups/ApproverGroupsTable/CreateEditGroupModal/CreateEditGroupModalContent/CreateEditGroupModalContent.tsx b/src/Features/ApproverGroups/ApproverGroupsTable/CreateEditGroupModal/CreateEditGroupModalContent/CreateEditGroupModalContent.tsx
index 1fad2bfcb..4f56ea4fb 100644
--- a/src/Features/ApproverGroups/ApproverGroupsTable/CreateEditGroupModal/CreateEditGroupModalContent/CreateEditGroupModalContent.tsx
+++ b/src/Features/ApproverGroups/ApproverGroupsTable/CreateEditGroupModal/CreateEditGroupModalContent/CreateEditGroupModalContent.tsx
@@ -313,7 +313,7 @@ function CreateEditGroupModalContent({
value={values.groupName}
onBlur={handleBlur}
onChange={handleChange}
- invalid={errors.groupName && touched.groupName}
+ invalid={Boolean(errors.groupName && touched.groupName)}
invalidText={errors.groupName}
/>
diff --git a/src/Features/ApproverGroups/ApproverGroupsTable/CreateEditGroupModal/CreateEditGroupModalContent/createEditGroupModalContent.module.scss b/src/Features/ApproverGroups/ApproverGroupsTable/CreateEditGroupModal/CreateEditGroupModalContent/createEditGroupModalContent.module.scss
index 6a37152c3..9aa7290c0 100644
--- a/src/Features/ApproverGroups/ApproverGroupsTable/CreateEditGroupModal/CreateEditGroupModalContent/createEditGroupModalContent.module.scss
+++ b/src/Features/ApproverGroups/ApproverGroupsTable/CreateEditGroupModal/CreateEditGroupModalContent/createEditGroupModalContent.module.scss
@@ -61,6 +61,7 @@
.memberInfo {
align-items: baseline;
display: flex;
+ justify-content: space-between;
width: 100%;
}
diff --git a/src/Features/Editor/Configure/Configure.tsx b/src/Features/Editor/Configure/Configure.tsx
index 25a649805..91a8bd99b 100644
--- a/src/Features/Editor/Configure/Configure.tsx
+++ b/src/Features/Editor/Configure/Configure.tsx
@@ -20,7 +20,6 @@ import * as Yup from "yup";
import BuildWebhookModalContent from "./BuildWebhookModalContent";
import ConfigureStorage from "./ConfigureStorage";
import CreateToken from "./CreateToken";
-//@ts-ignore
import CustomLabel from "./CustomLabel";
import Token from "./Token";
import { Save } from "@carbon/react/icons";
@@ -256,30 +255,11 @@ class Configure extends Component {
};
}
- // generateToken = (label: string) => {
- // axios
- // .post(serviceUrl.postCreateWorkflowToken({ workflowId: this.props.summaryData.id }), { label: label })
- // .then((response) => {
- // let newTokens = this.props.formikProps.values.tokens;
- // let tokenIndex = newTokens.findIndex((obj) => obj.label == label);
-
- // if (tokenIndex === -1) {
- // newTokens.push(response.data);
- // } else {
- // newTokens[tokenIndex].token = response.data.token;
- // }
-
- // // this.props.formikProps.setFieldValue(`triggers.${tokenType}.token`, response.data.token);
- // this.props.formikProps.setFieldValue(`tokens`, newTokens);
-
- // notify( );
- // })
- // .catch((err) => {
- // notify( );
- // });
- // };
+ handleOnChange: React.ChangeEventHandler = (e) => {
+ this.props.formikProps.handleChange(e);
+ };
- handleOnChange = (e: React.MouseEvent) => {
+ handleOnClick: React.MouseEventHandler = (e) => {
this.props.formikProps.handleChange(e);
};
@@ -316,9 +296,6 @@ class Configure extends Component {
onChange={this.handleTeamChange}
label="Team"
placeholder="Select a team"
- shouldFilterItem={({ item, inputValue }: { item: { name: string }; inputValue: string }) =>
- item?.name?.toLowerCase()?.includes(inputValue.toLowerCase())
- }
/>
)}
@@ -330,7 +307,7 @@ class Configure extends Component {
value={values.name}
onBlur={handleBlur}
onChange={this.handleOnChange}
- invalid={errors.name && touched.name}
+ invalid={Boolean(errors.name && touched.name)}
invalidText={errors.name}
/>
{
value={values.shortDescription}
onBlur={handleBlur}
onChange={this.handleOnChange}
- invalid={errors.shortDescription && touched.shortDescription}
+ invalid={Boolean(errors.shortDescription && touched.shortDescription)}
invalidText={errors.shortDescription}
/>
{`${values.description.length} / 250`}
{
id="icon"
readOnly
checked={values.icon === name}
- onClick={this.handleOnChange}
+ onClick={this.handleOnClick}
value={name}
type="radio"
/>
@@ -456,16 +433,13 @@ class Configure extends Component {
subtitle: (
<>
- Build up a webhook URL for an external service to push events that map to this workflow.
+ Build up a webhook URL for an external service to push events that execute this workflow.
- There are a variety of different webhook types that provide additional functionality, for
- example the Slack type responds to the slack verification request.
-
- Learn more here
+ There are a variety of different webhook types that provide additional functionality. For
+ example, the Slack type responds to the Slack verification request.{" "}
+
+ Learn more in the documentation.
>
@@ -639,12 +613,6 @@ class Configure extends Component {
>
),
}}
- composedModalProps={
- {
- // containerClassName: styles.buildWebhookContainer,
- // shouldCloseOnOverlayClick: true,
- }
- }
modalTrigger={({ openModal }: { openModal: () => void }) => (
Configure
diff --git a/src/Features/Editor/Configure/ConfigureStorage/ConfigureStorage.tsx b/src/Features/Editor/Configure/ConfigureStorage/ConfigureStorage.tsx
index 809f7b957..b95ff7316 100644
--- a/src/Features/Editor/Configure/ConfigureStorage/ConfigureStorage.tsx
+++ b/src/Features/Editor/Configure/ConfigureStorage/ConfigureStorage.tsx
@@ -64,7 +64,7 @@ export default function ConfigureStorage({
id="size"
data-testid="size"
helperText="Size in Gigabytes"
- invalid={errors.size && touched.size}
+ invalid={Boolean(errors.size && touched.size)}
invalidText={errors.size}
labelText={"Storage Size"}
min={0}
@@ -80,7 +80,7 @@ export default function ConfigureStorage({
id="mountPath"
data-testid="mountPath"
helperText={"The Mount path for your storage"}
- invalid={errors.mountPath && touched.mountPath}
+ invalid={Boolean(errors.mountPath && touched.mountPath)}
invalidText={errors.mountPath}
labelText={"Mount path"}
name="mountPath"
diff --git a/src/Features/Editor/Configure/CreateToken/CreateToken.tsx b/src/Features/Editor/Configure/CreateToken/CreateToken.tsx
index c4d5072a3..10bf45562 100644
--- a/src/Features/Editor/Configure/CreateToken/CreateToken.tsx
+++ b/src/Features/Editor/Configure/CreateToken/CreateToken.tsx
@@ -142,7 +142,7 @@ const CreateTokenModalContent: React.FC = ({
onChange={(value: any) => {
setFieldValue("label", value.target.value);
}}
- invalid={errors.label && !touched.label}
+ invalid={Boolean(errors.label && !touched.label)}
invalidText={errors.label}
/>
)}
diff --git a/src/Features/Editor/Configure/CustomLabel/CustomLabel.tsx b/src/Features/Editor/Configure/CustomLabel/CustomLabel.tsx
index e840dcdd3..825669bad 100644
--- a/src/Features/Editor/Configure/CustomLabel/CustomLabel.tsx
+++ b/src/Features/Editor/Configure/CustomLabel/CustomLabel.tsx
@@ -150,7 +150,7 @@ const AddLabelModalContent: React.FC = ({
labelText="Label Key"
value={values.key}
onChange={handleChange}
- invalid={errors.key && touched.key}
+ invalid={Boolean(errors.key && touched.key)}
invalidText={errors.key}
onBlur={handleBlur}
/>
@@ -159,7 +159,7 @@ const AddLabelModalContent: React.FC = ({
labelText="Label Value"
value={values.value}
onChange={handleChange}
- invalid={errors.value && touched.value}
+ invalid={Boolean(errors.value && touched.value)}
onBlur={handleBlur}
invalidText={errors.value}
/>
diff --git a/src/Features/Editor/Configure/configure.module.scss b/src/Features/Editor/Configure/configure.module.scss
index 42649eeb7..7354000f1 100644
--- a/src/Features/Editor/Configure/configure.module.scss
+++ b/src/Features/Editor/Configure/configure.module.scss
@@ -148,10 +148,14 @@
color: var(--cds-text-01);
}
}
+
+ :global .cds--bmrg-toggle__title {
+ margin-top: 0.75rem;
+ }
}
.webhookContainer {
- padding-left: 4.6rem;
+ padding-left: 3.5rem;
}
.webhookWrapper {
@@ -245,14 +249,14 @@
}
.schedulerContainer {
- padding-left: 4.6rem;
+ padding-left: 3.5rem;
p {
font-size: 0.875rem;
}
}
.subscriptionContainer {
- padding-left: 4.6rem;
+ padding-left: 3.5rem;
:global .cds--text-input__field-wrapper {
width: fit-content;
diff --git a/src/Features/Editor/Properties/PropertiesModal/PropertiesModalContent/PropertiesModalContent.tsx b/src/Features/Editor/Properties/PropertiesModal/PropertiesModalContent/PropertiesModalContent.tsx
index 8bab0e1b9..87515ec1c 100644
--- a/src/Features/Editor/Properties/PropertiesModal/PropertiesModalContent/PropertiesModalContent.tsx
+++ b/src/Features/Editor/Properties/PropertiesModal/PropertiesModalContent/PropertiesModalContent.tsx
@@ -267,7 +267,7 @@ class PropertiesModalContent extends Component {
readOnly={isEdit}
helperText="Reference value for parameter in workflow. It can't be changed after parameter creation."
id={InputProperty.Key}
- invalid={errors.key && touched.key}
+ invalid={Boolean(errors.key && touched.key)}
invalidText={errors.key}
labelText={isEdit ? "Key (read-only)" : "Key"}
onBlur={handleBlur}
@@ -291,7 +291,7 @@ class PropertiesModalContent extends Component {
/>
{
/>
{
/>
Capturing Snapshot of Editor 1`] = `
) : (
- {/*{`Submitted ${moment(creationDate).fromNow()}`} */}
-
{`${values?.comment.length}/200`}
Capturing Snapshot of TaskApprovalModa
+
+ 0/200
+
Capturing Snapshot of TaskApprovalModa
class="cds--text-area"
cols="50"
id="comment"
+ maxlength="200"
placeholder="Add some reasoning for your decision"
rows="4"
/>
-
{values.description?.length ?? 0}/200
void;
- taskTemplates: TaskModel[];
+ isLoading?: boolean;
setActiveTeam: Function;
- activeTeam: string | string[] | null;
+ taskTemplates: TaskModel[];
}
-const SideInfo: React.FC = ({ addTemplateInState, taskTemplates, setActiveTeam, activeTeam }) => {
+const SideInfo: React.FC = ({
+ activeTeam,
+ addTemplateInState,
+ isLoading,
+ setActiveTeam,
+ taskTemplates,
+}) => {
const { teams } = useAppContext();
const [searchQuery, setSearchQuery] = React.useState("");
const [activeFilters, setActiveFilters] = React.useState>([]);
@@ -106,22 +113,49 @@ const SideInfo: React.FC = ({ addTemplateInState, taskTemplates,
history.push(appLink.manageTaskTemplates({ teamId: selectedTeam?.selectedItem?.id }));
};
+ if (isLoading) {
+ return (
+
+ Task manager
+ {DESCRIPTION}
+
+ (item ? item.name : "")}
+ onChange={handleSelectTeam}
+ />
+
+
+
+
+
+
+
+
+
+ );
+ }
+
return (
Task manager
{DESCRIPTION}
- (item ? item.name : "")}
- onChange={handleSelectTeam}
- />
+ (item ? item.name : "")}
+ onChange={handleSelectTeam}
+ />
{taskTemplates && (
@@ -145,7 +179,7 @@ const SideInfo: React.FC
= ({ addTemplateInState, taskTemplates,
value={searchQuery}
/>
0 ? "#3DDBD9" : "initial",
@@ -153,6 +187,7 @@ const SideInfo: React.FC = ({ addTemplateInState, taskTemplates,
}}
flipped={true}
menuOptionsClass={styles.filters}
+ size="sm"
>
Filters
diff --git a/src/Features/ManageTeamTasks/TaskTemplateOverview/taskTemplateOverview.module.scss b/src/Features/ManageTeamTasks/TaskTemplateOverview/taskTemplateOverview.module.scss
index ccd218eaf..87b2273be 100644
--- a/src/Features/ManageTeamTasks/TaskTemplateOverview/taskTemplateOverview.module.scss
+++ b/src/Features/ManageTeamTasks/TaskTemplateOverview/taskTemplateOverview.module.scss
@@ -75,9 +75,8 @@
.editTitle {
align-items: center;
display: flex;
-
+ flex-flow: wrap;
justify-content: space-between;
-
margin-bottom: 0.75rem;
width: 100%;
:global .cds--btn__icon {
diff --git a/src/Features/ManageTeamTasks/TaskTemplateYamlEditor/taskTemplateYamlEditor.module.scss b/src/Features/ManageTeamTasks/TaskTemplateYamlEditor/taskTemplateYamlEditor.module.scss
index c509daaa8..ab4a3cb53 100644
--- a/src/Features/ManageTeamTasks/TaskTemplateYamlEditor/taskTemplateYamlEditor.module.scss
+++ b/src/Features/ManageTeamTasks/TaskTemplateYamlEditor/taskTemplateYamlEditor.module.scss
@@ -76,9 +76,8 @@
.editTitle {
align-items: center;
display: flex;
-
+ flex-flow: wrap;
justify-content: space-between;
-
margin-bottom: 0.75rem;
width: 100%;
:global .cds--btn__icon {
diff --git a/src/Features/ManageTeamTasks/taskTemplates.module.scss b/src/Features/ManageTeamTasks/taskTemplates.module.scss
index b22330ff7..45f10e41a 100644
--- a/src/Features/ManageTeamTasks/taskTemplates.module.scss
+++ b/src/Features/ManageTeamTasks/taskTemplates.module.scss
@@ -1,7 +1,7 @@
.container {
display: flex;
height: 100%;
- overflow-y: auto;
+ overflow: hidden;
width: 100%;
}
.wombat {
diff --git a/src/Features/Quotas/TeamQuotasOverview/QuotaEditModalContent/QuotaEditModalContent.tsx b/src/Features/Quotas/TeamQuotasOverview/QuotaEditModalContent/QuotaEditModalContent.tsx
index e18295faf..a038fdad5 100644
--- a/src/Features/Quotas/TeamQuotasOverview/QuotaEditModalContent/QuotaEditModalContent.tsx
+++ b/src/Features/Quotas/TeamQuotasOverview/QuotaEditModalContent/QuotaEditModalContent.tsx
@@ -116,7 +116,7 @@ const QuotaEditModalContent: React.FC = ({
//@ts-ignore
setFieldValue("quotaFormValue", value);
}}
- invalid={errors.quotaFormValue && !touched.quotaFormValue}
+ invalid={Boolean(errors.quotaFormValue && !touched.quotaFormValue)}
invalidText={errors.quotaFormValue}
/>
{inputUnits && {inputUnits} }
diff --git a/src/Features/TaskTemplates/Header/__snapshots__/Header.spec.jsx.snap b/src/Features/TaskTemplates/Header/__snapshots__/Header.spec.jsx.snap
index 63e161ece..d4e744615 100644
--- a/src/Features/TaskTemplates/Header/__snapshots__/Header.spec.jsx.snap
+++ b/src/Features/TaskTemplates/Header/__snapshots__/Header.spec.jsx.snap
@@ -110,7 +110,7 @@ exports[`Header --- Snapshot > Capturing Snapshot of Task Templates 1`] = `
class="cds--tabs__nav-item cds--tabs__nav-link"
href="/admin/task-templates/5e670a1e2d5e6a302de4f41d/1/yaml-editor"
>
- Yaml
+ YAML
diff --git a/src/Features/TaskTemplates/Header/header.module.scss b/src/Features/TaskTemplates/Header/header.module.scss
index 34b730e8c..f15ded5e0 100644
--- a/src/Features/TaskTemplates/Header/header.module.scss
+++ b/src/Features/TaskTemplates/Header/header.module.scss
@@ -3,7 +3,7 @@
.featureHeader {
align-items: center;
display: flex;
- min-height: 9.3125rem;
+ min-height: fit-content;
width: 100%;
padding: 1.5rem 1.5rem 0rem;
}
diff --git a/src/Features/TaskTemplates/Sidenav/AddTaskTemplate/AddTaskTemplate.tsx b/src/Features/TaskTemplates/Sidenav/AddTaskTemplate/AddTaskTemplate.tsx
index 3382d62ca..d503c9e73 100644
--- a/src/Features/TaskTemplates/Sidenav/AddTaskTemplate/AddTaskTemplate.tsx
+++ b/src/Features/TaskTemplates/Sidenav/AddTaskTemplate/AddTaskTemplate.tsx
@@ -63,7 +63,7 @@ function AddTaskTemplate({ addTemplateInState, taskTemplates, history, location
children: "Your request will not be saved",
}}
modalTrigger={({ openModal }) => (
-
+
Add a new task
)}
diff --git a/src/Features/TaskTemplates/Sidenav/AddTaskTemplate/AddTaskTemplateForm/AddTaskTemplateForm.tsx b/src/Features/TaskTemplates/Sidenav/AddTaskTemplate/AddTaskTemplateForm/AddTaskTemplateForm.tsx
index 55a07ec9e..839f02cdc 100644
--- a/src/Features/TaskTemplates/Sidenav/AddTaskTemplate/AddTaskTemplateForm/AddTaskTemplateForm.tsx
+++ b/src/Features/TaskTemplates/Sidenav/AddTaskTemplate/AddTaskTemplateForm/AddTaskTemplateForm.tsx
@@ -285,7 +285,7 @@ function AddTaskTemplateForm({ closeModal, taskTemplates, isLoading, handleAddTa
{values.description?.length ?? 0}/200
= ({ addTemplateInState, taskTemplates }
}}
flipped={true}
menuOptionsClass={styles.filters}
+ size="sm"
>
Filters
diff --git a/src/Features/TaskTemplates/TaskTemplateOverview/__snapshots__/TaskTemplateOverview.spec.jsx.snap b/src/Features/TaskTemplates/TaskTemplateOverview/__snapshots__/TaskTemplateOverview.spec.jsx.snap
index 459e90d98..674007da5 100644
--- a/src/Features/TaskTemplates/TaskTemplateOverview/__snapshots__/TaskTemplateOverview.spec.jsx.snap
+++ b/src/Features/TaskTemplates/TaskTemplateOverview/__snapshots__/TaskTemplateOverview.spec.jsx.snap
@@ -114,7 +114,7 @@ exports[`TaskTemplateOverview --- Snapshot > Capturing Snapshot of Task Template
class="cds--tabs__nav-item cds--tabs__nav-link"
href="/admin/task-templates/5e670a1e2d5e6a302de4f41d/1/yaml-editor"
>
- Yaml
+ YAML
@@ -587,7 +587,7 @@ lookUpUser
>
@@ -615,7 +615,7 @@ lookUpUser
@@ -646,13 +646,13 @@ lookUpUser
diff --git a/src/Features/TaskTemplates/TaskTemplateOverview/taskTemplateOverview.module.scss b/src/Features/TaskTemplates/TaskTemplateOverview/taskTemplateOverview.module.scss
index 153d8d65b..cc50b9abe 100644
--- a/src/Features/TaskTemplates/TaskTemplateOverview/taskTemplateOverview.module.scss
+++ b/src/Features/TaskTemplates/TaskTemplateOverview/taskTemplateOverview.module.scss
@@ -75,9 +75,8 @@
.editTitle {
align-items: center;
display: flex;
-
+ flex-flow: wrap;
justify-content: space-between;
-
margin-bottom: 0.75rem;
width: 100%;
:global .cds--btn__icon {
diff --git a/src/Features/TaskTemplates/TaskTemplateYamlEditor/taskTemplateYamlEditor.module.scss b/src/Features/TaskTemplates/TaskTemplateYamlEditor/taskTemplateYamlEditor.module.scss
index c509daaa8..ab4a3cb53 100644
--- a/src/Features/TaskTemplates/TaskTemplateYamlEditor/taskTemplateYamlEditor.module.scss
+++ b/src/Features/TaskTemplates/TaskTemplateYamlEditor/taskTemplateYamlEditor.module.scss
@@ -76,9 +76,8 @@
.editTitle {
align-items: center;
display: flex;
-
+ flex-flow: wrap;
justify-content: space-between;
-
margin-bottom: 0.75rem;
width: 100%;
:global .cds--btn__icon {
diff --git a/src/Features/TaskTemplates/__snapshots__/TaskTemplates.spec.tsx.snap b/src/Features/TaskTemplates/__snapshots__/TaskTemplates.spec.tsx.snap
index 3c1d62bab..48e238984 100644
--- a/src/Features/TaskTemplates/__snapshots__/TaskTemplates.spec.tsx.snap
+++ b/src/Features/TaskTemplates/__snapshots__/TaskTemplates.spec.tsx.snap
@@ -33,7 +33,7 @@ exports[`TaskTemplateManager --- Snapshot > Capturing Snapshot of Task Templates
Existing Tasks (34)
@@ -126,7 +126,8 @@ exports[`TaskTemplateManager --- Snapshot > Capturing Snapshot of Task Templates
{(activeTeam?.id || totalItems > 0) && (
diff --git a/src/Features/TeamProperties/TeamPropertiesTable/__snapshots__/TeamPropertiesTable.spec.tsx.snap b/src/Features/TeamProperties/TeamPropertiesTable/__snapshots__/TeamPropertiesTable.spec.tsx.snap
index 614d6b45f..135be3515 100644
--- a/src/Features/TeamProperties/TeamPropertiesTable/__snapshots__/TeamPropertiesTable.spec.tsx.snap
+++ b/src/Features/TeamProperties/TeamPropertiesTable/__snapshots__/TeamPropertiesTable.spec.tsx.snap
@@ -22,7 +22,7 @@ exports[`TeamPropertiesTable --- Snapshot Test > Capturing Snapshot of TeamPrope
diff --git a/src/Features/TeamProperties/__snapshots__/TeamProperties.spec.jsx.snap b/src/Features/TeamProperties/__snapshots__/TeamProperties.spec.jsx.snap
index 0431b7542..1d4f4ca22 100644
--- a/src/Features/TeamProperties/__snapshots__/TeamProperties.spec.jsx.snap
+++ b/src/Features/TeamProperties/__snapshots__/TeamProperties.spec.jsx.snap
@@ -25,7 +25,7 @@ exports[`TeamProperties --- Snapshot Test > Capturing Snapshot of TeamProperties
diff --git a/src/Features/TeamTokens/TeamTokenComponent/CreateToken/Form/index.tsx b/src/Features/TeamTokens/TeamTokenComponent/CreateToken/Form/index.tsx
index 90aac2b11..2deb84f18 100644
--- a/src/Features/TeamTokens/TeamTokenComponent/CreateToken/Form/index.tsx
+++ b/src/Features/TeamTokens/TeamTokenComponent/CreateToken/Form/index.tsx
@@ -106,7 +106,7 @@ function CreateServiceTokenForm({
data-testid="token-expiration-id"
id={InputKey.ExpiryDate}
dateFormat="MM-DD-YYYY"
- invalid={errors.date}
+ invalid={Boolean(errors.date)}
invalidText={errors.date}
labelText={
diff --git a/src/Features/TeamTokens/TeamTokenComponent/__snapshots__/index.spec.tsx.snap b/src/Features/TeamTokens/TeamTokenComponent/__snapshots__/index.spec.tsx.snap
index d333725a1..2cee41c3b 100644
--- a/src/Features/TeamTokens/TeamTokenComponent/__snapshots__/index.spec.tsx.snap
+++ b/src/Features/TeamTokens/TeamTokenComponent/__snapshots__/index.spec.tsx.snap
@@ -22,6 +22,11 @@ exports[`TokenComponent --- Snapshot > Capturing Snapshot of TokenComponent 1`]
>
Team Tokens
+
diff --git a/src/Features/TeamTokens/TeamTokenComponent/index.tsx b/src/Features/TeamTokens/TeamTokenComponent/index.tsx
index 56b428642..6a997c9b6 100644
--- a/src/Features/TeamTokens/TeamTokenComponent/index.tsx
+++ b/src/Features/TeamTokens/TeamTokenComponent/index.tsx
@@ -7,6 +7,7 @@ import {
ComboBox,
FeatureHeader as Header,
FeatureHeaderTitle as HeaderTitle,
+ FeatureHeaderSubtitle as HeaderSubtitle,
Error404,
ErrorMessage,
} from "@boomerang-io/carbon-addons-boomerang-react";
@@ -63,6 +64,9 @@ const FeatureLayout: React.FC = ({ children }) => {
header={
<>
Team Tokens
+
+ Set team-level tokens that are accessible to all workflows owned by the team.
+
>
}
/>
@@ -148,9 +152,6 @@ function TeamTokenComponent({
setActiveTeam(selectedItem);
}}
placeholder="Select a team"
- shouldFilterItem={({ item, inputValue }: { item: any; inputValue: string }) =>
- item?.name?.toLowerCase()?.includes(inputValue.toLowerCase())
- }
/>
- item?.name?.toLowerCase()?.includes(inputValue.toLowerCase())
- }
/>
{activeTeam?.id && }
diff --git a/src/Features/Teams/AddTeamContent/AddTeamContent.tsx b/src/Features/Teams/AddTeamContent/AddTeamContent.tsx
index 84ba96b02..ed6a4b807 100644
--- a/src/Features/Teams/AddTeamContent/AddTeamContent.tsx
+++ b/src/Features/Teams/AddTeamContent/AddTeamContent.tsx
@@ -95,7 +95,7 @@ export default function AddTeamContent({
onChange={(value: React.ChangeEvent) => {
setFieldValue("name", value.target.value);
}}
- invalid={errors.name && !touched.name}
+ invalid={Boolean(errors.name && !touched.name)}
invalidText={errors.name}
/>
{error && (
diff --git a/src/Features/Tokens/GlobalTokenComponent/CreateToken/Form/index.tsx b/src/Features/Tokens/GlobalTokenComponent/CreateToken/Form/index.tsx
index 4d0a8bb31..70c58a206 100644
--- a/src/Features/Tokens/GlobalTokenComponent/CreateToken/Form/index.tsx
+++ b/src/Features/Tokens/GlobalTokenComponent/CreateToken/Form/index.tsx
@@ -111,7 +111,7 @@ function CreateServiceTokenForm({
data-testid="token-expiration-id"
id={InputKey.ExpiryDate}
dateFormat="MM-DD-YYYY"
- invalid={errors.date}
+ invalid={Boolean(errors.date)}
invalidText={errors.date}
labelText={
@@ -129,12 +129,14 @@ function CreateServiceTokenForm({
/>
setFieldValue("description", value.target.value)}
+ onChange={(e) => setFieldValue("description", e.target.value)}
value={values.description}
+ maxCount={200}
/>
{postGlobalTokenError ? (
deleteToken(tokenItem.id)}
affirmativeButtonProps={{ kind: "danger" }}
- affirmativeText="Yes"
+ affirmativeText="Delete"
negativeText="No"
title={`Are you sure?`}
>
diff --git a/src/Features/Tokens/GlobalTokenComponent/__snapshots__/index.spec.tsx.snap b/src/Features/Tokens/GlobalTokenComponent/__snapshots__/index.spec.tsx.snap
index 8b46d3efb..9ac508cf5 100644
--- a/src/Features/Tokens/GlobalTokenComponent/__snapshots__/index.spec.tsx.snap
+++ b/src/Features/Tokens/GlobalTokenComponent/__snapshots__/index.spec.tsx.snap
@@ -22,6 +22,11 @@ exports[`TokenComponent --- Snapshot > Capturing Snapshot of TokenComponent 1`]
>
Global Tokens
+
diff --git a/src/Features/Tokens/GlobalTokenComponent/index.tsx b/src/Features/Tokens/GlobalTokenComponent/index.tsx
index 20d7a8118..0da083522 100644
--- a/src/Features/Tokens/GlobalTokenComponent/index.tsx
+++ b/src/Features/Tokens/GlobalTokenComponent/index.tsx
@@ -7,6 +7,7 @@ import {
Error404,
ErrorMessage,
FeatureHeader as Header,
+ FeatureHeaderSubtitle,
FeatureHeaderTitle as HeaderTitle,
} from "@boomerang-io/carbon-addons-boomerang-react";
import DeleteToken from "./DeleteToken";
@@ -60,6 +61,7 @@ const FeatureLayout = ({ children }: FeatureLayoutProps) => {
header={
<>
Global Tokens
+ Create tokens that can be used globally
>
}
/>
diff --git a/src/Features/Workflows/WorkflowQuotaModalContent/WorkflowQuotaModalContent.module.scss b/src/Features/Workflows/WorkflowQuotaModalContent/WorkflowQuotaModalContent.module.scss
index 724364068..6070a62c6 100644
--- a/src/Features/Workflows/WorkflowQuotaModalContent/WorkflowQuotaModalContent.module.scss
+++ b/src/Features/Workflows/WorkflowQuotaModalContent/WorkflowQuotaModalContent.module.scss
@@ -8,9 +8,8 @@
background-color: var(--cds-hover-selected-ui);
border: none;
height: 0.0625rem;
- width: calc(100% + 2rem);
+ width: 1005;
margin: 1.5rem 0;
- margin-left: -1rem;
&:first-of-type {
margin-top: 0;
diff --git a/src/Features/Workflows/Workflows.tsx b/src/Features/Workflows/Workflows.tsx
index 42acd9835..fc945d6bb 100644
--- a/src/Features/Workflows/Workflows.tsx
+++ b/src/Features/Workflows/Workflows.tsx
@@ -253,7 +253,7 @@ const UserWorkflows: React.FC = ({ searchQuery, user, userWor
"Quotas are set by the administrator. If you have a concern about your allotted amounts, contact an admin.",
}}
modalTrigger={({ openModal }: ModalTriggerProps) => (
-
+
View more quotas
)}
@@ -340,7 +340,7 @@ const TeamWorkflows: React.FC = ({ searchQuery, team, teams
"Quotas are set by the administrator. If you have a concern about your allotted amounts, contact an admin.",
}}
modalTrigger={({ openModal }: ModalTriggerProps) => (
-
+
View more quotas
)}
diff --git a/src/Features/Workflows/__snapshots__/Workflows.spec.jsx.snap b/src/Features/Workflows/__snapshots__/Workflows.spec.jsx.snap
index 645ffcd3d..9589f0619 100644
--- a/src/Features/Workflows/__snapshots__/Workflows.spec.jsx.snap
+++ b/src/Features/Workflows/__snapshots__/Workflows.spec.jsx.snap
@@ -359,7 +359,7 @@ exports[`WorkflowsHome --- Snapshot > Capturing Snapshot of WorkflowsHome 1`] =
@@ -823,7 +823,7 @@ exports[`WorkflowsHome --- Snapshot > Capturing Snapshot of WorkflowsHome 1`] =
diff --git a/src/Types/index.tsx b/src/Types/index.tsx
index d8bdc4a52..410927126 100644
--- a/src/Types/index.tsx
+++ b/src/Types/index.tsx
@@ -1,3 +1,5 @@
+import { User } from "@boomerang-io/carbon-addons-boomerang-react";
+
declare global {
interface Window {
_SERVER_DATA: {
@@ -82,7 +84,7 @@ export interface DataDrivenInput {
required?: boolean;
value: string;
values?: [string] | [{ key: string; value: string }];
- type?: string;
+ type: string;
min?: number;
max?: number;
}
@@ -418,7 +420,7 @@ export interface PaginatedResponse {
records: RecordType[];
}
-export interface FlowUser {
+export interface FlowUser extends User {
id: string;
email: string;
name: string;
@@ -575,8 +577,8 @@ export interface PlatformConfig {
navigation: Array<{ name: string; url: string }>;
platform: {
appName?: string;
- baseEnvUrl?: string;
- baseServicesUrl?: string;
+ baseEnvUrl: string;
+ baseServicesUrl: string;
communityUrl?: string;
displayLogo: boolean;
name: string;