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

Workflows 2 #866

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open

Workflows 2 #866

wants to merge 29 commits into from

Conversation

michelson
Copy link
Member

No description provided.

@@ -0,0 +1,123 @@
import React from 'react';
export default function Sidebar() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Sidebar has 56 lines of code (exceeds 50 allowed). Consider refactoring.

let id = 0;
const getId = () => `dndnode_${id++}`;

function Workflows() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Workflows has 156 lines of code (exceeds 50 allowed). Consider refactoring.

import React, { memo } from 'react';
import { Handle, Position } from 'react-flow-renderer';
import BaseElement from './base';
export default memo(({ data }: { data: any; children: React.ReactChild }) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 5 locations. Consider refactoring.

import { Handle, Position } from 'react-flow-renderer';
import BaseElement from './base';

export default memo(({ data }: { data: any; children: React.ReactChild }) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 5 locations. Consider refactoring.

import { Handle, Position } from 'react-flow-renderer';
import BaseElement from './base';

export default memo(({ data }: { data: any; children: React.ReactChild }) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 5 locations. Consider refactoring.

import { Handle, Position } from 'react-flow-renderer';
import BaseElement from './base';

export default memo(({ data }: { data: any; children: React.ReactChild }) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 5 locations. Consider refactoring.

import { Handle, Position } from 'react-flow-renderer';
import BaseElement from './base';

export default memo(({ data }: { data: any; children: React.ReactChild }) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 5 locations. Consider refactoring.

children?: React.ReactChild;
}) {
return (
<li className={'col-span-1 flex shadow-sm rounded-md'}>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

></Handle>
)}

<li className={'col-span-1 flex shadow-sm rounded-md'}>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

<h2 className="text-lg leading-7 font-medium text-gray-900">
{title}
</h2>
<div className="h-7 flex items-center">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

@@ -0,0 +1,125 @@
import React from 'react';
export default function Sidebar() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Sidebar has 58 lines of code (exceeds 50 allowed). Consider refactoring.


return (
<ReactFlowProvider>
<Slide title={'s'} open={open} onClose={onClose}>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

height: 120,
};

const OverviewFlow = () => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function OverviewFlow has 124 lines of code (exceeds 50 allowed). Consider refactoring.

setNodes(updatedProjects);
}

const onElementClick = (event, element) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identical blocks of code found in 2 locations. Consider refactoring.


return (
<div>
<BotPathEditor
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

import CampaignEditor from '../../../pages/campaigns/editor';
import { connect } from 'react-redux';

function PostEditor({ data, update, app }) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

import CampaignEditor from '../../../pages/campaigns/editor';
import { connect } from 'react-redux';

function EmailEditor({ data, update, app }) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

setOpen(false);
}

function updateElements(element) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

'lang',
]}
// selection [],
tableColumnExtensions={[
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

@@ -438,6 +438,22 @@ export function LoadBalancerIcon(props) {
);
}

export function LabIcon(props) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

@codeclimate
Copy link

codeclimate bot commented Apr 12, 2023

Code Climate has analyzed commit c1796aa and detected 37 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 4
Duplication 33

View more on Code Climate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant