Giter Club home page Giter Club logo

website-my's Introduction

website-my

A personal dashboard website where you can do profile related stuff!

Prerequisites

You will need the following things properly installed on your computer.

Installation

We are moving to yarn, to ensure that we use yarn , we are moving ahead with Volta To install Volta, please follow the process

Please refer CONTRIBUTING.md for the setup and contributing guidelines.

Running / Development

Code Generators

Make use of the many generators for code, try ember help generate for more details

Running Tests

  • yarn test
  • yarn test:ember
  • yarn test:ember:server
  • (or ember test and ember test --server)
  • You can also visit the /tests route when running dev server

Available run commands

  • npx ntl
  • (or yarn run to see the list)

Linting

  • yarn lint: To allow the linter to check for problems
  • yarn lint:fix: To allow linter to fix the auto-fixable problems

Note: For solving CORS errors while making API calls during development, please make sure to follow step 1 from this documentation . This project has taken care of step 2 in itself.

Building

  • yarn build (production)
  • (or ember build --environment production)
  • ember build (development)

Further Reading / Useful Links

website-my's People

Contributors

ajeyakrishna-k avatar ankushdharkar avatar bajajcodes avatar bhtibrewal avatar biswanathtewari avatar dependabot[bot] avatar heyrandhir avatar himanshukm2301 avatar iamitprakash avatar ishikabaid avatar ivinayakg avatar joyguptaa avatar lakshayman avatar manish591 avatar pavangbhat avatar prakashchoudhary07 avatar ritikjaiswal75 avatar rohan09-raj avatar sagarbajpai avatar sagarokcredit avatar sahsisunny avatar satyam73 avatar shreya-mishra avatar shubhamsinghbundela avatar skv93-coder avatar srejitk avatar sumitd94 avatar swapnadeepmohapatra avatar swarajpure avatar vinayak-trivedi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

website-my's Issues

Show error message if API fails

If we get some error on API (4xx or 5xx), we should be showing something on the screen, currently the screen simply goes blank and we see the API error in console

Profile page

  • Ability to update profile
  • All fields available in signup are visible (some disabled)

Create /tasks page

  • See users tasks and update progress on them
  • Track status of dependent tasks

Requirements:

The tasks on my site should have certain restrictions:

  • At most, one task can be in active state - Shows in first row
  • Blocked tasks show in second row
  • Completed tasks are hidden until the tab clicked from row three
  • Cannot add/remove tasks
  • Completion percentage can be changed
  • Can mark task as blocked

Improve repeated code

Location:

@action phoneNumberValidator(phone) {
if (typeof phone !== 'string') {
return false;
}
const pattern = /^(0|[+91]{3})?[7-9][0-9]{9}$/;
const index = this.fields.findIndex((field) => field.id === 'phone');
if (pattern.test(phone)) {
set(this.fields[index], 'showError', false);
} else {
set(this.fields[index], 'showError', true);
}
}
@action emailValidator(email) {
if (typeof email !== 'string') return false;
const pattern = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
const index = this.fields.findIndex((field) => field.type === 'email');
if (pattern.test(email)) {
set(this.fields[index], 'showError', false);
} else {
set(this.fields[index], 'showError', true);
}
return;
}

Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Fix the console errors

On the signup page after filling details and submitting the form, we are getting some console errors. For some reference please refer to screenshots.
Screenshot (58)
Screenshot (59)
Screenshot (60)

Loader on submitting the form

When the user clicks submit, if the success response is ok, we should disable the submit button and show some kind of loader so that the user knows something is going on and the user is not supposed to hit submit button again

Update my task component

Figma Link

  • Stage-1: Ticket for non-debounce slider
  • Stage-2: Ticket for debounce implementation
  • Stage-2a: On taking the slider to 100 percent, it should change into a button will marks the task as COMPLETED (check figma design which is linked above)

Setup Continuous Integration using GitHub Actions

We need to have certain checks running on every PR and commits being pushed which will make sure that linting and build are going well.

For example, there could be something which breaks some page/pages/whole site if we get it merged (may happen that some user didn't test their code before pushing). If we had some sort of checks which run as soon as there are new PRs and new commits pushed, so that potential harm could be avoided.

And what could be these checks?

  • lint: checks the linting style
  • test: runs the tests
  • build: checks if the build is passing

We have to setup CI using GitHub actions

The github id should be pre-filled and disabled

Since the user will have the cookie already in the browser which has data provided by GitHub (github_id and github_display_name), we should be taking the github_id from there and use it to pre-fill the Github ID field and disable the user from changing it.

Should show a message if there are no tasks in particular category

  • Should show some message if there are no tasks in a particular task category:

In the /tasks page, we are showing the logged in user's tasks by task status like active, pending etc. Let's say the user doesn't have any active tasks, they are shown nothing, they might keep waiting, under the impression that something is loading here. That's a bad UX (user experience). We need to show some message like "There are no tasks here. Please look into some other categories ๐Ÿ™‚"

  • Unix timestamp needs to be converted to human readable date

/profile page

Show read-only information of the user on profile page

Make `lint` script work for all the operating systems

Currently our lint script doesn't work on Windows, but works fine on Linux and MacOS.

Once the lint starts working for these operating systems, we could add linting in pre-commit hooks (not a part of this issue though). Refer issue #10

API Integration for signup form

We need to send the data from the signup form

Once the user logs in to Github for the first time from any of the RDS apps (welcome/crypto/main page), the user will be redirected to this signup form.

Then the user will have the cookie set in for all the RDS subdomains.

We will need to use PATCH /users/self API to update the user's data once the user submits the form - this is one time process.
API contract: https://github.com/Real-Dev-Squad/website-api-contracts/tree/main/users#patch-usersself

User Form with validations

Create our current user form on /signup route our 'my' app
Ensure that there are decent validations in place:

  • Name should be string
  • Username should have first name as prefix
  • Email should have an @ and a .
  • Phone number would be nice with a country code dropdown, but start with autofilling +91-, but let it be editable in case the user is not from India
  • Allow social media names to be single string. If user pastes link, guide them with a helpful message
  • Submit button should be only allowed once all validations pass
  • Error messages should show up in a red line below the input, and the border of the input should also become red

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.