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

Update the UI of login page #97

Merged
merged 0 commits into from
Aug 19, 2020
Merged

Conversation

caris-mu
Copy link
Contributor

@caris-mu caris-mu commented Aug 15, 2020

This PR fixes #98.

Description of changes

Updating the UI of the login page by importing Material-UI components:

  1. Adding logo
  2. Centering all text fields
  3. Updating the input box and button UI

Possible influences of this PR

No negative influence expected

Demonstration of results

Before:
Screen Shot 2020-08-18 at 9 49 01 PM
After:
Screen Shot 2020-08-18 at 9 58 36 PM

Copy link
Member

@hunterhector hunterhector left a comment

Choose a reason for hiding this comment

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

Welcome to the Stave community and good work on the first PR.

As an open-source project, there are a few guidelines that we are trying to follow, which can greatly help the communication and collaboration of the community. Here are a few things that are related to this PR:

  1. Please fill in the PR template and provide relevant information. For a UI change, uploading an image is very helpful. You can directly paste the image in the editor box.
  2. When you fill in the template, you will see the issue link. We require each PR to be related to an issue. So if you implement a new feature, you should open an issue. I opened the issue here for you: Extra corner annotation container #79 this time.
  3. Understanding the build status. You can see a red cross attached to your PR. This indicates the build status. The build need to be passed (green tick), in order for the PR to be accepted. A failed build means there are problems in the code (warnings or errors),
    image
    To see the details of the build, click the "Details" link as in the above screenshot.
  4. Currently, you need to resolve the following build warnings:
    ./src/app/App.tsx
    Line 7:3: 'Link' is defined but never used @typescript-eslint/no-unused-vars
    Line 93:10: 'Logout' is defined but never used @typescript-eslint/no-unused-vars
    ./src/app/pages/Login.tsx
    Line 7:8: 'Typography' is defined but never used @typescript-eslint/no-unused-vars
    Line 56:11: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text

These can be easily solved, most can be solved by removing the references that are not used. And provide alt text to img elements (The purpose of alt text is to allow the screen reader to read the images, which can help people who cannot see or read the screen).

Again, thanks for the first PR to Stave.

@hunterhector
Copy link
Member

You also needed to resolve the conflicts here:

image

@caris-mu caris-mu requested a review from hunterhector August 19, 2020 00:27
@hunterhector
Copy link
Member

I saw the "remember me" option at the login page. It seem it didn't work at the moment. What's the plan for this? One option is we comment out this for now until we implemented it.

Besides that, I have to search for the word "Bienvenue" myself. Any particular reasons for having that word in the signup page?

Copy link
Member

@hunterhector hunterhector left a comment

Choose a reason for hiding this comment

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

I think we can comment out the component that does not function for now.

After that, if you update the PR message, I think this is ready to merge.

@hunterhector
Copy link
Member

And we store the logos in the following path, so don't need to upload the logo again to the src root. In addition, it is advised to keep the src directory more organized and place resources into appropriate folders.

https://github.com/asyml/stave/tree/master/public

@caris-mu caris-mu changed the title Add login page Update login page Aug 19, 2020
@caris-mu caris-mu changed the title Update login page Update the UI of login page Aug 19, 2020
Copy link
Member

@hunterhector hunterhector left a comment

Choose a reason for hiding this comment

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

I think the only thing lefts are:

  1. Comment out the "Remember me" for now since it does not function.
  2. Remove the newly uploaded image and replace it with the one here "https://github.com/asyml/stave/tree/master/public"

@caris-mu
Copy link
Contributor Author

I think the only thing lefts are:

  1. Comment out the "Remember me" for now since it does not function.
  2. Remove the newly uploaded image and replace it with the one here "https://github.com/asyml/stave/tree/master/public"

All fixed.

</div>
<Container component="main" maxWidth="xs">
<div className={classes.paper}>
<img alt='stave logo' src='https://github.com/asyml/stave/blob/master/public/[email protected]?raw=true'/>
Copy link
Member

Choose a reason for hiding this comment

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

The correct way to access the file to use the public URL like this:

https://create-react-app.dev/docs/using-the-public-folder/

The difference is, the project wouldn't rely on the service status of "Github". Instead, the logo file will be deployed to the user's server.

Copy link
Member

Choose a reason for hiding this comment

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

Or you can follow the following:

https://create-react-app.dev/docs/adding-images-fonts-and-files/

But using the github link is not recommended.

Copy link
Member

@hunterhector hunterhector left a comment

Choose a reason for hiding this comment

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

  1. Use alternative methods instead of the GitHub link to reference the logo file.
  2. Remove the logo file that you committed.

@hunterhector hunterhector merged commit 4aed2eb into asyml:master Aug 19, 2020
hunterhector pushed a commit that referenced this pull request Nov 8, 2020
* Add login page

* Update Login.tsx

* Update Login.tsx

* Update App.tsx

* Update App.tsx

* Fix "ReferenceError: Link is not defined"

* Roll back changes on App.tsx

* Remove the "Remember me" part and update the logo url

* logo update

1. used public url
2. removed the uploaded image

Former-commit-id: 03dadb5b13e1fda3b9ed9697d3518833102e3e07
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.

Should have a reasonable login page.
2 participants