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

refactor: LEAP-1290: remove feature flag FF_LOPS_E_10 and related code #7218

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
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: 0 additions & 1 deletion web/libs/datamanager/src/assets/icons/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ export { ReactComponent as CommentCheck } from "./comment_check.svg";
export { ReactComponent as CommentRed } from "./comment_red.svg";
export { ReactComponent as LsGrid } from "./grid.svg";
export { ReactComponent as LsList } from "./list.svg";
export { ReactComponent as LsRefresh2 } from "./refresh2.svg";
3 changes: 0 additions & 3 deletions web/libs/datamanager/src/assets/icons/refresh2.svg

This file was deleted.

2 changes: 0 additions & 2 deletions web/libs/datamanager/src/components/Common/Button/Button.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { cloneElement, forwardRef, useMemo } from "react";
import { Block, Elem } from "../../../utils/bem";
import { FF_LOPS_E_10, isFF } from "../../../utils/feature-flags";
import { isDefined } from "../../../utils/utils";
import "./Button.scss";

Expand All @@ -16,7 +15,6 @@ export const Button = forwardRef(
withIcon: !!icon,
withExtra: !!extra,
disabled: !!rest.disabled,
newUI: isFF(FF_LOPS_E_10),
};

const iconElem = useMemo(() => {
Expand Down
38 changes: 0 additions & 38 deletions web/libs/datamanager/src/components/Common/Button/Button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,39 +19,6 @@
font-weight: 500;
font-size: 14px;

&_newUI {
box-shadow: none;
border: 1px solid rgb(65 60 74 / 16%);
font-weight: 400;

&.button-dm {
&_withIcon {
border: 0 none;
}
}

&:not(.button-dm_withIcon) {
font-weight: 500;

&.button-dm {
&_waiting,
&_disabled,
&:disabled,
&[disabled] {
border: 1px solid rgb(65 60 74 / 16%);
background-color: #FFF;
}
}
}

&.dropdown-dm {
&__trigger {
font-weight: 400;
background-color: #FAFAFA;
}
}
}

svg {
max-height: 100%;
}
Expand Down Expand Up @@ -311,11 +278,6 @@
&:not(:first-child, :last-child) {
border-radius: 0;
}

&_newUI {
border: 1px solid rgb(65 60 74 / 16%);
box-shadow: none;
}
}
}
}
Expand Down
9 changes: 2 additions & 7 deletions web/libs/datamanager/src/components/Common/FiltersPane.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { inject, observer } from "mobx-react";
import React, { useEffect, useRef } from "react";
import { FaAngleDown, FaChevronDown } from "react-icons/fa";
import { FF_LOPS_E_10, isFF } from "../../utils/feature-flags";
import { FaAngleDown } from "react-icons/fa";
import { Filters } from "../Filters/Filters";
import { Badge } from "./Badge/Badge";
import { Button } from "./Button/Button";
Expand Down Expand Up @@ -30,11 +29,7 @@ export const FiltersButton = buttonInjector(
{activeFiltersNumber}
</Badge>
)}
{isFF(FF_LOPS_E_10) ? (
<FaChevronDown size="12" style={{ marginLeft: 8, marginRight: -7 }} color="#1F1F1F" />
) : (
<FaAngleDown size="16" style={{ marginLeft: 4 }} color="#566fcf" />
)}
<FaAngleDown size="16" style={{ marginLeft: 4 }} color="#566fcf" />
</Button>
);
}),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { cn } from "../../../../../utils/bem";
import { FF_LOPS_E_10, isFF } from "../../../../../utils/feature-flags";
import { FormField } from "../../FormField";
import { default as Label } from "../Label/Label";
import "./Input.scss";

const Input = ({ label, className, validate, required, skip, labelProps, ghost, ...props }) => {
const mods = {
ghost,
newUI: isFF(FF_LOPS_E_10),
};
const classList = [cn("form-input").mod(mods), className].join(" ").trim();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
padding: 0 16px;
transition: box-shadow 80ms ease;

&_newUI {
border-color: rgb(137 128 152 / 16%);
}

&_ghost {
border: none;
padding: 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from "react";
import { Block, Elem } from "../../../utils/bem";
import { FF_LOPS_E_10, isFF } from "../../../utils/feature-flags";
import "./RadioGroup.scss";

const RadioContext = React.createContext();
Expand All @@ -17,7 +16,7 @@ export const RadioGroup = ({ size, value, onChange, children, ...rest }) => {
onChange: onRadioChange,
}}
>
<Block name="radio-group-dm" mod={{ size, newUI: isFF(FF_LOPS_E_10) }} {...rest}>
<Block name="radio-group-dm" mod={{ size }} {...rest}>
<Elem name="buttons">{children}</Elem>
</Block>
</RadioContext.Provider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,47 +74,4 @@
--button-checked-shadow: 0px 1px 0px var(--black_10), 0px 0px 0px 1px var(--black_2), 0px 2px 4px var(--black_15);
}
}

&_newUI {
--button-checked-shadow: none;
--button-padding: 4px 8px;

box-shadow: none;
background: rgb(240 238 242 / 8%);
border: 1px solid rgb(65 60 74 / 16%);

.radio-group-dm {
&__buttons {
gap: 8px;
}

&__button {
--button-border-width: 1px;

opacity: 1;
border: var(--button-border-width) solid transparent;
height: calc(var(--height) - calc(var(--padding) * 2) - calc(var(--button-border-width) * 2));
cursor: pointer;

.radio-group-dm__input {
cursor: pointer;
}

&_checked {
color: var(--grape_500);
background: var(--grape_0);
border-color: var(--grape_500);
cursor: default;

.radio-group-dm__input {
cursor: default;
}
}

&:hover {
background: linear-gradient(0deg, rgb(9 109 217 / 5%), rgb(9 109 217 / 5%)), #FAFAFA;
}
}
}
}
}
11 changes: 2 additions & 9 deletions web/libs/datamanager/src/components/Common/Table/Table.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { observer } from "mobx-react";
import { createContext, forwardRef, useCallback, useEffect, useMemo, useRef, useState } from "react";
import { FaCode } from "react-icons/fa";
import { RiCodeLine } from "react-icons/ri";
import AutoSizer from "react-virtualized-auto-sizer";
import { VariableSizeList } from "react-window";
import InfiniteLoader from "react-window-infinite-loader";
Expand All @@ -20,7 +19,7 @@ import { prepareColumns } from "./utils";
import { cn } from "../../../utils/bem";
import { FieldsButton } from "../FieldsButton";
import { LsGear, LsGearNewUI } from "../../../assets/icons";
import { FF_DEV_3873, FF_LOPS_E_10, FF_LOPS_E_3, isFF } from "../../../utils/feature-flags";
import { FF_DEV_3873, FF_LOPS_E_3, isFF } from "../../../utils/feature-flags";

const Decorator = (decoration) => {
return {
Expand Down Expand Up @@ -146,13 +145,7 @@ export const Table = observer(
body: <TaskSourceView content={out} onTaskLoad={onTaskLoad} sdkType={type} />,
});
}}
icon={
isFF(FF_LOPS_E_10) ? (
<Icon icon={RiCodeLine} style={{ width: 24, height: 24 }} />
) : (
<Icon icon={FaCode} />
)
}
icon={<Icon icon={FaCode} />}
/>
</Tooltip>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { inject, observer } from "mobx-react";
import { useCallback, useRef, useState } from "react";
import { FaAngleDown, FaChevronDown, FaChevronRight, FaChevronUp, FaTrash } from "react-icons/fa";
import { useCallback, useRef } from "react";
import { FaAngleDown, FaChevronRight, FaTrash } from "react-icons/fa";
import { Block, Elem } from "../../../utils/bem";
import { FF_LOPS_E_10, FF_LOPS_E_3, isFF } from "../../../utils/feature-flags";
import { FF_LOPS_E_3, isFF } from "../../../utils/feature-flags";
import { Button } from "../../Common/Button/Button";
import { Dropdown } from "../../Common/Dropdown/DropdownComponent";
import Form from "../../Common/Form/Form";
Expand All @@ -11,7 +11,6 @@ import { Modal } from "../../Common/Modal/ModalPopup";
import "./ActionsButton.scss";

const isFFLOPSE3 = isFF(FF_LOPS_E_3);
const isNewUI = isFF(FF_LOPS_E_10);
const injector = inject(({ store }) => ({
store,
hasSelected: store.currentView?.selected?.hasSelected ?? false,
Expand All @@ -33,7 +32,6 @@ const buildDialogContent = (text, form, formRef) => {
export const ActionsButton = injector(
observer(({ store, size, hasSelected, ...rest }) => {
const formRef = useRef();
const [isOpen, setIsOpen] = useState(false);
const selectedCount = store.currentView.selectedCount;
const actions = store.availableActions.filter((a) => !a.hidden).sort((a, b) => a.order - b.order);

Expand Down Expand Up @@ -103,27 +101,13 @@ export const ActionsButton = injector(
toggle={false}
ref={submenuRef}
content={
<Block name="actionButton-submenu" tag="ul" mod={{ newUI: isNewUI }}>
<Block name="actionButton-submenu" tag="ul">
{action.children.map(ActionButton, parentRef)}
</Block>
}
>
{titleContainer}
</Dropdown.Trigger>
) : isNewUI ? (
<Dropdown.Trigger
key={action.id}
align="top-right-outside"
toggle={false}
ref={submenuRef}
content={
<Block name="actionButton-submenu" tag="ul" mod={{ newUI: isNewUI }}>
{(action?.children ?? []).map(ActionButton, parentRef)}
</Block>
}
>
{titleContainer}
</Dropdown.Trigger>
) : (
<Menu.Item
size={size}
Expand All @@ -146,30 +130,13 @@ export const ActionsButton = injector(

return (
<Dropdown.Trigger
content={
isNewUI ? (
<Block tag={Menu} name="actionmenu" size="compact" mod={{ newUI: isNewUI }}>
{actionButtons}
</Block>
) : (
<Menu size="compact">{actionButtons}</Menu>
)
}
content={<Menu size="compact">{actionButtons}</Menu>}
openUpwardForShortViewport={false}
disabled={!hasSelected}
onToggle={(visible) => isFFLOPSE3 && setIsOpen(visible)}
>
<Button {...(isNewUI ? { className: "actionButtonPrime" } : {})} size={size} disabled={!hasSelected} {...rest}>
<Button size={size} disabled={!hasSelected} {...rest}>
{selectedCount > 0 ? `${selectedCount} ${recordTypeLabel}${selectedCount > 1 ? "s" : ""}` : "Actions"}
{isNewUI ? (
isOpen ? (
<FaChevronUp size="12" style={{ marginLeft: 4, marginRight: -7 }} />
) : (
<FaChevronDown size="12" style={{ marginLeft: 4, marginRight: -7 }} />
)
) : (
<FaAngleDown size="16" style={{ marginLeft: 4 }} color="#566fcf" />
)}
<FaAngleDown size="16" style={{ marginLeft: 4 }} color="#566fcf" />
</Button>
</Dropdown.Trigger>
);
Expand Down
Loading
Loading