Skip to content

Commit

Permalink
EPMRPP-80259 || code review fixes - 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadim73i committed Feb 6, 2024
1 parent b5555ca commit c58c052
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
NODE_OPTIONS: '--max_old_space_size=2048'

run: |
npm --prefix ${{ env.UI_BUILD_REACT }} ci
npm --prefix ${{ env.UI_BUILD_REACT }} ci --legacy-peer-deps
npm --prefix ${{ env.UI_BUILD_REACT }} run lint
npm --prefix ${{ env.UI_BUILD_REACT }} run test:coverage
npm --prefix ${{ env.UI_BUILD_REACT }} run build
Expand Down
2 changes: 1 addition & 1 deletion app/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ To launch the development environment, follow these steps:

1. open console from the project root
2. run the command `cd app`
3. run the command `npm install`
3. run the command `npm install --legacy-peer-deps`
4. to proxy requests to the server, create `.env` file in `app` folder

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/

/* eslint-disable react/no-unknown-property */

import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames/bind';
Expand All @@ -39,6 +37,8 @@ export const AutocompleteMenu = React.forwardRef(
{ opened: isOpen && isReadyForSearch(minLength, inputValue) },
className,
)}
// placement used by Popper
/* eslint-disable-next-line react/no-unknown-property */
placement={placement}
style={style}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/

/* eslint-disable react/no-unknown-property */

import React from 'react';
import { ScrollWrapper } from 'components/main/scrollWrapper';
import PropTypes from 'prop-types';
Expand Down Expand Up @@ -79,6 +77,8 @@ export const AutocompleteMenu = React.forwardRef(
<ul
ref={ref}
className={cx('menu', { opened: isOpen && menuContent })}
// placement used by Popper
/* eslint-disable-next-line react/no-unknown-property */
placement={placement}
style={style}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export class RolesRow extends Component {
: intl.formatMessage(messages.unAssignFromProject);
const Tooltip = () => <TextTooltip tooltipContent={tooltipMessage} />;
const disable = this.isPersonalProject();
const componentClickHandler = !this.isPersonalProject() ? clickHandler : null;
const componentClickHandler = !disable ? clickHandler : null;
const WrappedComponent = () => (
<IconComponent
different={different}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,23 @@ import styles from './filterName.scss';

const cx = classNames.bind(styles);

const NameLink = ({ link, children }) =>
link ? (
<Link className={cx('name-link')} to={link}>
{children}
</Link>
) : (
children
);
NameLink.propTypes = {
link: PropTypes.string,
children: PropTypes.node,
};
NameLink.defaultProps = {
link: '',
children: null,
};

export class FilterName extends Component {
static propTypes = {
userFilters: PropTypes.array,
Expand Down Expand Up @@ -82,16 +99,6 @@ export class FilterName extends Component {
nameLink,
} = this.props;

// eslint-disable-next-line react/prop-types
const NameLink = ({ link, children }) =>
link ? (
<Link className={cx('name-link')} to={link}>
{children}
</Link>
) : (
children
);

return (
<Fragment>
<span className={cx('name-wrapper')}>
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/reportportal/service-ui?sort=semver)](https://github.com/reportportal/service-ui/releases/latest)
[![Docker Pulls](https://img.shields.io/docker/pulls/reportportal/service-ui.svg?maxAge=159200)](https://hub.docker.com/r/reportportal/service-ui/)

1. Install nodejs (minimum required version 12, recommended - 20)
1. Install nodejs (version 20 is recommended)

2. Open console from the project root

3. Run the command `cd app`

4. Run the command `npm install` or `npm ci`
4. Run the command `npm install --legacy-peer-deps` or `npm ci --legacy-peer-deps`

5. Create file `.env` in `app` folder

Expand Down

0 comments on commit c58c052

Please sign in to comment.