Wiredcraft / test-fullstack

6 stars 43 forks source link

PR from Nancy #14

Closed AlingChen closed 6 years ago

AlingChen commented 6 years ago

Sorry for the late, I spent a lot of time on the backend. But unfortunately, it didn't work until now because I am not very familiar with backend /(ㄒoㄒ)/~~.

I finished the front end quickly, and it can work well, but there‘s much that needs to be improved. If have what shortage of place please remind much and much. Thanks a lot!

Environment setup

makara commented 6 years ago

Thanks. We'll review and get back to you soon.

woodpig07 commented 6 years ago

Hi Nancy @AlingChen, I'm Kate from Wiredcraft dev team, assigned to review your work. Just wondering did you forget to include some assets in this PR, as when I was trying to run npm start, it gave me

Failed to compile
./src/assets/css/font-awesome.min.css
Module not found: Can't resolve '../fonts/fontawesome-webfont.eot' in '/Users/kwu/Work/temp-repo/AlingChen-test/src/assets/css'
This error occurred during the build time and cannot be dismissed.
flyingant commented 6 years ago

This is Mayi. And I got the same error.

AlingChen commented 6 years ago

Hi guys, so sorry for that. I just fixed it. plz try it again.

AlingChen commented 6 years ago

By the way, Do you guys have installed redux-dev-tools? if not, please install it. Thank you so mush.

flyingant commented 6 years ago

@AlingChen Just take a glimpse for your code. As you said, Yes, it's quckly but ugly. lol!

You know for the test, quickly is not always be the mainly factor we consider about. You could try to make us impressive with no matter what the libraries chose or technology as you like.

Will leave some opinions here later..

AlingChen commented 6 years ago

@flyingant Thanks for your 'glimpse' lol! I know this is really hardly presentable. But I still expect more feedback from you.:-)

AlingChen commented 6 years ago

@woodpig07 Hi Kate, Yes, I implemented these api methods, and the GET request works well. But when I send a PUT or POST request with the body, I can't get any data from the body on the server side. I spent too much time but still could not find the reasons.(awkward (ㄒoㄒ) so I decided to use redux to store data instead of these APIs.

woodpig07 commented 6 years ago

@AlingChen you are using port 3001 for backend server, I guess the port is already used by frontend as you run it by react-scripts. You can change the server port to something like 4000, though you will have to configure CORS for backend in this way. Or you can use node server to host the compiled frontend files, then both backend and frontend will use same port. Just suggestions :-)

AlingChen commented 6 years ago

@woodpig07 Thank you Kate, The front end is using port 3000, So I thought there's no conflict. But you are right, perhaps it is because of the issue of cross-domain. I will take some time to try it again. Thanks again:-)

flyingant commented 6 years ago

Hi @AlingChen This is MaYi again, the leader of the front end team from Wiredcraft. You did OK on front end part. And I would ilke to challenge you more in order to know more about your ability.

(It's pure front end!!) I noticed that you already had the editable form to create a new light talk. And I hope you could fullfill the functionality with the requirements below:

  1. Please add the following fields with rules

    1. Title (Input filed) [cannot be blank][the lenght of charactors should be less than 60][Cannot be the same to exsit one][shoud avoid XSS attack]
    2. Publish Date (Date Picker)[Cannot be blank]
    3. Description (Textarea)[Cannot be blank][the lenght of charactors should be less than 600][shoud avoid XSS attack]
    4. Author (Input field)[Cannot be blank][the lenght of charactors should be less than 20][shoud avoid XSS attack]
    5. Public (Select field)[Default value should be blank]
  2. Validate the form field before submit

  3. Display the error message below the field if validation is failed

  4. (Advanced) Automaticly validation

  5. (Advanced) Integrate the validation feature to redux

Let me know if you got any problem.

AlingChen commented 6 years ago

Hi @flyingant, I've just finished all of the functionality you listed above,Please review and let me know if there's any problem. Looking forward to your feedback. Thank you

makara commented 6 years ago

Thanks @AlingChen, that should be enough for us to take a decision. We'll come to you soon.