Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Che plugin viewer first working model #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sunilk747
Copy link

What does this PR do?

First commit for che plugin viewer.

@skabashnyuk
Copy link
Collaborator

@sunilk747 can you confirm that you have all copyrights for all content that you are submitting(images, resources, etc)?
@benoitf I'm not an expert in UI part can you take a look on fonts. Are they potentially compatible with Eclipse organization rules?

skabashnyuk
skabashnyuk previously approved these changes Jan 2, 2019
@skabashnyuk
Copy link
Collaborator

@sunilk747 let me know when you want to merge your work?

@skabashnyuk skabashnyuk requested a review from evidolob January 8, 2019 13:40
@skabashnyuk
Copy link
Collaborator

@evidolob can you take a look. I need some node/UI experts to take a look.

@sunilk747 sunilk747 changed the title [WIP]Che plugin viewer first working model Che plugin viewer first working model Jan 9, 2019
@sunilk747
Copy link
Author

sunilk747 commented Jan 9, 2019

@skabashnyuk Feel free to merge this PR.

@evidolob
Copy link

evidolob commented Jan 9, 2019

Hello, quick review feedback:

  1. It seems that you are missed lodash-es dependency, it is used in che-plugin-viewer/src/common, currently I cannot build project.
  2. Can you add node_modules, build folders in .gitignore ? Also after build there are a lot of git untracked images insade src/img folder, should we also add this folder in .gitignore?
  3. Can you push your yarn.lock file, just to have more reelable build environment?

@evidolob
Copy link

evidolob commented Jan 9, 2019

cc @benoitf Can you review this pull request?

Copy link

@benoitf benoitf left a comment

Choose a reason for hiding this comment

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

  • no copyright
  • no license in images
  • fonts should come through node modules
  • should use typescript as all of the other che projects
  • lot more comments inline

yum clean all && \
sed -i 's/listen[[:space:]]*80;/listen 8080;/' /etc/nginx/conf.d/default.conf

RUN chmod 777 /var/log/nginx && chmod 777 /var/cache/nginx && chmod 777 /var/run && rm -rf /var/log/nginx/* && rm -rf /var/cache/nginx/*
Copy link

Choose a reason for hiding this comment

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

this run instruction should be merged with previous one (to not duplicate size of layers)

Copy link

Choose a reason for hiding this comment

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

still pending comment

&& yarn install && yarn build

EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]
Copy link

Choose a reason for hiding this comment

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

if this dockerfile is for production, it should be a multi stage build (yarn tool should not be in production image)

Copy link

Choose a reason for hiding this comment

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

not solved yet. Should be fixed to be approved

@slemeur
Copy link

slemeur commented Jan 9, 2019

@sunilk747 in eclipse-che/che-plugin-registry#72 I thought you were working on writing it in typescript and you were expecting to get done last week.
What happened?

@sunilk747
Copy link
Author

sunilk747 commented Jan 9, 2019

@slemeur No. I guess there is a miscommunication here. Nobody told me to redo the whole thing in typescript. The work that I have been expecting to get done is some UI changes not redoing the whole project in TS.

@slemeur
Copy link

slemeur commented Jan 9, 2019

Yeah that should have been clarified. But I agree that it's sad that it's not in typescript as we are using it in the whole Che stack.
Just discussing for now - Do you have an idea of the amount of work required for that?

@sunilk747
Copy link
Author

sunilk747 commented Jan 9, 2019

@slemeur Yeah, it should have been clarified. I was told to reuse this project - https://github.com/jeff-phillips-18/catalog-test-app which is in JS that's why I didn't change anything. We can redo the whole project in typescript + react. Considering it's a small project I guess it can be one in one sprint task.

@sunilk747 sunilk747 force-pushed the che-plugin-viewer branch 2 times, most recently from dffa8b4 to 429dbb2 Compare January 24, 2019 12:41
@sunilk747 sunilk747 force-pushed the che-plugin-viewer branch 2 times, most recently from 462a389 to b7b17e3 Compare January 28, 2019 08:54
@sunilk747
Copy link
Author

@benoitf Could you please review it again.

@sunilk747
Copy link
Author

  • no copyright
    I was not sure what needs to be added that's why I left it as it is. I have added copyright headers in some files let me know if it's correct, I will add it in other files also.
  • no license in images
    Again, which license should I add?
  • fonts should come through node modules
    I am not very familiar with JS/TS development. I have no idea how to do that.
  • should use typescript as all of the other che projects
    Rebuilding the whole project using TS is completely a new task.
  • lot more comments inline
    I have handled most of the review comments. PTAL and let me know if there is anything left that I need to work upon.

@sunilk747
Copy link
Author

@benoitf PTAL.

Copy link
Collaborator

@skabashnyuk skabashnyuk left a comment

Choose a reason for hiding this comment

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

removing approval to take a look after all changes will be merged

@skabashnyuk skabashnyuk dismissed their stale review January 29, 2019 12:17

removing approval to take a look after all changes will be merged

@benoitf
Copy link

benoitf commented Jan 29, 2019

@sunilk747

these changes are blocker:

no copyright
I was not sure what needs to be added that's why I left it as it is. I have added copyright headers in some files let me know if it's correct, I will add it in other files also.

About copyright, do you own all the code that is there ? if yes, please use Eclipse Public License v2

no license in images
Again, which license should I add?

The question is not what license you should add, but from where coming these images and the license they have, to see if they're matching their use in a EPLv2 project.

fonts should come through node modules
I am not very familiar with JS/TS development. I have no idea how to do that.

I think it's the basis of JS development. Basic idea is to not add any binaries inside the repositories. Only source code. Fonts are dependencies then they should come through npm.

here is a tiny sample with font-awesome but approach is the same with other fonts
https://stackoverflow.com/questions/48103401/how-to-use-font-awesome-5-installed-via-npm

@@ -0,0 +1,252 @@
/**
Copy link

Choose a reason for hiding this comment

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

still invalid copyright headers

@@ -0,0 +1,27 @@
import React from 'react';
Copy link

Choose a reason for hiding this comment

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

missing copyright headers

Red Hat, Inc. - initial implementation
*/

import axios from 'axios';
Copy link

Choose a reason for hiding this comment

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

name should not use any camelCase
pluginsApi --> plugins-api.js

camel case is not working good across Windows/Linux/Macos usually

let data = [];
return await axios.get(process.env.REACT_APP_REGISTRY_URL).then(async response => {
for (let i = 0; i < response.data.length; i++) {
let url = 'https://che-plugin-registry.openshift.io' + response.data[i].links.self;
Copy link

Choose a reason for hiding this comment

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

registry URL should be a parameter

@@ -0,0 +1,94 @@
import * as _ from 'lodash-es';
Copy link

Choose a reason for hiding this comment

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

copyright headers

REJECTED_ACTION
};

export default helpers;
Copy link

Choose a reason for hiding this comment

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

missing EOF

@@ -0,0 +1,117 @@
/* eslint-disable react/no-did-update-set-state */
Copy link

Choose a reason for hiding this comment

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

headers...

<div className="catalog-modal__item catalog-modal__description">
<div key="desc">
<Alert type="info" onDismiss={infoDismissed}>
Go to Eclipse che dashboard then select workspace.
Copy link

Choose a reason for hiding this comment

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

Eclipse Che

@@ -0,0 +1,627 @@
/* eslint-disable react/no-did-update-set-state */
Copy link

Choose a reason for hiding this comment

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

--> catalog-view.js
missing headers

@@ -0,0 +1,80 @@
import React from 'react';
Copy link

Choose a reason for hiding this comment

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

rename file + headers

@@ -0,0 +1,113 @@
import React from 'react';
Copy link

Choose a reason for hiding this comment

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

rename file + headers

@@ -0,0 +1,168 @@
import React from 'react';
Copy link

Choose a reason for hiding this comment

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

copyright headers

@@ -0,0 +1,30 @@
import * as React from 'react';
Copy link

Choose a reason for hiding this comment

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

rename file + copyright headers

import { fetchCatalogItems } from '../../redux/actions/catalogActions';
import { helpers } from '../../common/helpers';

class CatalogC extends React.Component {
Copy link

Choose a reason for hiding this comment

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

please use a meaningful name for this class.
CatalogC is not so meaningful
also rename to not use camelCase and add copyright headers

@@ -0,0 +1,233 @@
import * as _ from 'lodash-es';
Copy link

Choose a reason for hiding this comment

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

why do we need this external lodash library ?

most of the code is available on ES6. (like forEach, map, etc)

Copy link

@benoitf benoitf left a comment

Choose a reason for hiding this comment

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

can't comment on diff as it's binaries:

  • what is the favicon.ico ? looks like react icon
  • names of scr1.png and scr2.png are not meaningful. Also I'm unsure if screenshots are required there

@sunilk747
Copy link
Author

sunilk747 commented Jan 29, 2019

@sunilk747

these changes are blocker:

no copyright
I was not sure what needs to be added that's why I left it as it is. I have added copyright headers in some files let me know if it's correct, I will add it in other files also.

About copyright, do you own all the code that is there ? if yes, please use Eclipse Public License v2

No. These codes are not mine. I used this project as base for this which is in apache 2.0.

no license in images
Again, which license should I add?

The question is not what license you should add, but from where coming these images and the license they have, to see if they're matching their use in a EPLv2 project.

fonts should come through node modules
I am not very familiar with JS/TS development. I have no idea how to do that.

I think it's the basis of JS development. Basic idea is to not add any binaries inside the repositories. Only source code. Fonts are dependencies then they should come through npm.

here is a tiny sample with font-awesome but approach is the same with other fonts
https://stackoverflow.com/questions/48103401/how-to-use-font-awesome-5-installed-via-npm

@skabashnyuk
Copy link
Collaborator

@sunilk747 is this pr ready to be reviewed again? As far as I can see not all of @benoitf 's comments answered. Can you describe your vision of this task?

@sunilk747
Copy link
Author

@skabashnyuk I was a bit busy with other tasks I have in this sprint. I will try to handle other comments as soon as possible.

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

Successfully merging this pull request may close these issues.

5 participants