GithubHelp home page GithubHelp logo

hackru / frontend Goto Github PK

View Code? Open in Web Editor NEW
13.0 10.0 19.0 171.05 MB

HackRU's frontend website

Home Page: http://www.hackru.org

License: MIT License

JavaScript 80.71% HTML 2.57% CSS 8.57% Shell 0.18% TypeScript 7.97%
npm css reactjs javascript hackru

frontend's Introduction

HackRU Frontend

The frontend is the main place for people to interact with HackRU on the web. It has our splash page, our sponsor package pages, the hacker dashboard, the admin dashboard (planned) and the sponsor dashboard (planned).

This readme is largely aimed at new developers on the frontend team. If that's you, welcome! Always remember that a README and even the extended wiki aren't fully comprehensive, so don't be afraid to ask questions in the HackRU internal chats.

Brief Outline

At a glance, don't be worried if you don't know something! We have a collection of some resources to learn everything mentioned here.

  • The site is a single-page application (SPA) which means that the browser doesn't have to reload the whole page when users navigate around the site.
  • We use React as our web framework, with Bootstrap as a base for our styling
  • Our workflows are all based around npm and git: those are pretty much the only tools you need to know

TODO: create wiki pages with resources for learning web development in general, React, npm, and git

Getting Started

To get started with installing the repo, you should install a recent verison of npm and node.js. NPM is what we use to install and manage the dependencies for the frontend repository. Make sure it's installed correctly with npm -v.

Next clone the frontend git repository somewhere on your computer, and navigate to it with a terminal session. Use the command npm install to pull down the resources needed to build and run the project. Once this completes, you're off to the races: use npm run start and npm run tailwind-watch to launch the development web server. It should give you a link to open in your browser, where you should see your development copy of the HackRU website!

If any of the steps above have an error, please ask for help! We're always ready to help out, and an error probably means the next step is going to wrong in a bizarre fashion.

You might want to install the React Developer Tools as a browser extension. It's not mandatory but pretty helpful, for Chrome and Firefox. It augments your existing browser dev-tools (bound to F12) with React awareness, so you can see a tree of the React components on the page.

Once you have the page running in your browser, you're all set up! Ping someone for a starter task, and embark on your HackRU adventure.

Making a Change

Once you've gotten the repository up and running, it's time to do some development. You can use any text editor with the frontend, and don't worry about code style. We have automated tools to take care of that!

The first step in your change is to create a git branch on your local repository with some relevant name. Let's say you're fixing the styling on the dashboard buttons; a good branch name would be fix-dashboard-button-style. Feel free to make lots of small commits during your work. The commit history within a specific change doesn't really matter: each Pull Request gets squashed down to a single commit before being merged into master.

The next step is to make edits to the relevant components, until everything works the way you want it. Again, feel free to ask for help throughout here. What takes you two days to figure out might take a more experienced team member all of five minutes!

Once your changes are made, it's time for some automated checks. Our checks are npm run check, which just reports errors, and npm run fix, which fixes them for you. They both invoke prettier and eslint, which are tools we use to maintain code quality. prettier automatically formats code; eslint checks it for errors or bad practice. Between the two, we try to take as much load off your shoulders as possible. Don't dedicate any thought to code styling, because prettier will make sure your code looks standard. eslint can catch some kinds of errors, like a typo in a variable name, and warn about common mistakes. Always commit your code before running npm run fix: it changes the files on disk, and if you want to undo a change, it's better to be able to take advantage of git.

The next step is to submit your code for review and CI (automated code checking). Make a pull request on the Github page, with a description of your changes. If your changes are forward-facing, include a screenshot to show them off quickly to reviewers. Once you have an approving review and the automated code checks pass (using npm run check from above), you can merge your code into the master branch!

TODO: write a wiki that goes into more depth about each step between making the change it showing up in the site

Don't Panic!

A quote from Ez, a previous frontend team lead:

"Seriously, this project is not part of your required curricula. It's something extra, it's something for the community, and it means learning a lot of things on the fly. This can be a huge boon - you will definitely have a tremendous amount of experience, both technical-wise and organization-wise. This community is a great opportunity to expand your network.

In case something goes wrong, or in case of a fire, or in case you feel overwhelmed or daunted by what's going on, here are some rules of thumb:

  1. Take some time to calm down and chill out. Health comes first, even from a practical perspective. You can't fix anything while panicking. HALT is a real good pattern to keep in mind: Don't try to work on things when you are hungry, angry/upset, lonely/lost, or tired to the extent that you can't perform properly. It will make things worse. Heroes be damned, don't try to stay up til 5am working on something on your own. If last minute crunching is needed, we shouldn't be doing it by ourselves.
  2. Write down what exactly has gone wrong and tell someone. Contact the team lead, one of the directors, our assigned rnd mentor, the git-help channel, etc. We will all will be willing to help clean up the mess. It's not just because this project affects all of us, and it's not just because we have a responsibility - it's because we literally have set shit on fire before and caused holy hell to occur through our mistakes. We want to be do as much as we can, and yelling and accusing people is definitely counter-productive.
  3. Cooperate and work together with whoever's helping you to fix what happened as much as possible. Stay on the issue, learn from it, and don't add or subtract from directions to prevent further issues from rising.
  4. After it's passed, we'll all sit down and discuss the reason for what happened. Huge breaks and long error logs can be the result of innocent mistakes or even non-mistakes that have been handled a specific way by the library/framework/language in use. We will all benefit from learning what happened and from implementing a procedure to prevent it from happening again. A good principle is to review the documentation given and to also write some of your own.
  5. Remember that communication is key, and that we are all very appreciative of your efforts and contributions. If you need to stop working on HackRU, we will understand and adapt as necessary. We just ask that you be courteous and tell of us any and all issues/questions that you have."

The web team has cooled off a bit in the time since (less taking-down-production or critical bugs) but this is still very important. HackRU should not come before school, or work if it's applicable. It's ok for this not to be your first, second, third, whatever priority. The most important thing is communication: don't over-commit on what you can do, but also don't reach out to ask for help.

frontend's People

Contributors

adeeld avatar anitejb avatar avsomers25 avatar bryanbenzinger avatar davidchen avatar dchaudhari0811 avatar dependabot[bot] avatar dhruvilp avatar gabrielweinbrenner avatar hemangandhi avatar jscheire avatar kevinmonisit avatar mugpand avatar pinkmanusrex avatar qasimabbas avatar ryanisaacg avatar ryanmao725 avatar rzmk avatar sail338 avatar sailokesh845 avatar sejanep avatar shivanmodha avatar taahasid avatar thekabistro avatar trestres avatar utkarshdubey avatar zain08816 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

frontend's Issues

Faq header text

The header color is dark green, maybe making it white like the text would be better?

Travel Reimbursement Placeholder Text

After the placeholder text that is already there would you be able to add placeholder text of like an example text field input so people follow a convention when entering travel? It might help lcs out after if everything was the same format? Right now it's very ambiguous the way the information would be entered. Maybe separate boxes for City and State? Right now it just seems ambiguous basically on the way the information is being inputed.

Pre-day of Changes

We need the following for day-of:

  • QRs on logged in dashboard
  • Slack announcements
  • Calendar events view
  • Map of the venue (coming soon from a logistics team near you)

Other note: registration will re-open on the day of. So may be have the frontend reflect that? (This isn't critical since we don't recommend registering on the day of either...)

Functional Issues to fix from Website Walkthrough

  • Put 'save unsaved changes' button in the side bar, which should be enabled whenever changes are made.
  • Enable fill-in option on school select.
  • Pop-up an error whenever birthdate is after October 6 2000 and user is not a Rutgers student, and then clear the birthdate.
  • Switch 'Save Changes' and ' Logout'. (Enter causes a logout automatically?)
  • Keep track if someone is not fully registered upon save. (didn't fill out required forms) Display this message on the dashboard page.
  • Restrict resumes to txt, pdf, and img files.
  • Hide Announcements, Upcoming, and Livestream. (Activate closer to HackRU).
  • Add Ethnicity Question (mlh Link).
  • Login/Registration box should be above Info box.
  • We should have a sepearate instance of lcs for testing.

Make the login/sign up forms

The revamped site still needs login/sign up forms! Let's make it happen....

The splash page will redirect to /dashboard. Users should be able to login or sign up. On sign up they should have to fill out all the fields for lcs. On login, they should be prompted with their application status and given a button to edit their application.

Form: Non-options do not show up

The library used react-select to make the autocompleting form is a bit broken: if a user puts in a custom value (when allowed) and then returns to the site, the custom value disappears.

Stale Cookie

🍪

The auth data cookie is expired, awkwardly.

stale_cookie

This leads to the issue Brandon referenced on the discord. Logging out and logging back in might fix it and is worth a try.

If you need the validate endpoint for this, let me know: I'll have to fix it up.

Remove MLH Login

Remove from the view and remove from component functionality - and that includes removing the check for auth token from the url_parms in the UserForm and App.

Please work on this issue as a branch separate from master, mark it as 'view-alterations'

Blueness in Form

image

This color is rather hard to see, and on hover it becomes underlined- please have it match the behavior of Logout instead.

Travel Forms Buttons

image

  • Please ensure that the transportation options are displayed vertically.
  • Also, when traveling info is updated, we'd like to make sure the user knows that the info is saved, probably by disabling the button and setting the label to "changes saved".
  • Currently, the behavior does not trigger an update to LCS. Please change the behavior so it does, as most users won't be changing anything else once travel reimbursement is announced.
  • Probably more of a CSS issue if anything, but the text field is also appearing off-center.

Splash Page

We need to make a splash page for HackRU Spring 2019. It's on the 9th of march at the College Ave Student center.

The site should be themed as it is and instead of a "go to dashboard", make the button "get on the mailing list" and link it to https://hackru1.typeform.com/to/OEtQEO

This should be on the prod bucket, but the script may not work if you want to avoid deploying the dashboard. We will also have to invalidate the sponsorship site and I'll comment here about that.

Fix Styling on new Splash

  • The CSS with the background image on mobile needs to be addressed.
  • Some header text runs off the page
  • The footer should become a component and follow the same class rules as everything else.

Admin Dashboard: Update waves

We want to allow for directors to update the "wave" it is in registration (so the first n accepted hackers from wave k get an acceptence email welcoming them and lets them confirm attendence and those who said they were coming in wave k-1 are considered RSVPed).

I'll link the docs from the backend as I make them. This should be in the admin dashboard.

Make the React parts use cookies + Use MLH

Cookies

We need to look for a cookie called authdata in the browser. This cookie will contain JSON as a string:

{
    "token": "Their auth token",
    "valid_until": "The timestamp of the token expiry"
}

This cookie should be set on a non-MLH login. On page load, if the cookie yields a valid authentication,
the user's form should be rendered.

MLH

The login with MLH button need to exist. The following HTML should do the trick:

<button href=https://my.mlh.io/oauth/authorize?client_id=bab4ace712bb186d8866ff4776baf96b2c4e9c64d729fb7f88e87357e4badcba&redirect_uri=https://m7cwj1fy7c.execute-api.us-west-2.amazonaws.com/mlhitest/mlhcallback&response_type=code&scope=email+education+birthday">Login with MLH</button>

and then the page will eventually re-load with an authdata cookie which needs to be handled as above.

Col Ave Std Center Link Is Incorrect (It's RAC)

On the dashboard, under the 'Info' section, if you click on the College Ave Student Center link, the google maps that shows up is for the RAC (--Emily). Also, Also, open it in a new tab, not the same one. b/c we don't want a user to leave our site like that (--Dhruvil).

Fix Form

We need to fix the form to make it fit with the HackRU aesthetic. Feel free to discuss what that means.

Recreate the /live site

For the day of, this is the core of the dashboard last semester, without the login.

So it should include the same announcements, upcoming events and the common links.

It should be at hackru.org/live

Slack: The code cleaner is broken

The message cleanser, that removes emotes (:something:) and mentions (<garbage>) is broken. It just removes anything between colons and brackets, without insisting that they match.

This should be fixed... the interview submissions may help.

Misleading UI and Bad Missing Fields Error

When I click log out, with all fields filled, even the optional ones, it gives me the pop up notifying me I have missing fields.

There really should be a submit button instead of a "Save Changes", since it is very possibly the case that someone wants to save their changes but not necessarily submit the form. I think it would be a good idea to change the "Log out" to be Submit or something, as there is already a log out in the sidebar.

Form Fields should be mandatory

We had too many blank responses last HackRU... so if they're empty, force the user to fill them.

We don't force users to update fields though, preferably.

Don't show edit form by default

If the user has successfully applied, then there should be some indication their data is submitted and can be edited, but is currently received

Visual Enhancements and Tweaks

  • Move all CSS colors to use color variables and not be hard coded
  • Prevent titles from cutting off
  • For margin requests, use bootstrap classes instead of doing this by hand in custom css
  • Fix issue with font squishing
  • Fix issue with fb share metadata
  • Colliding text on mobile phones in the About Us section.
  • Fix Google Maps link pointing to RAC
  • Instead of tiling background image, make it one single pane
  • Add explicit scroll bars to things that can scroll
  • In flash "Application has been saved" over "changes have been saved"
  • "Your Info" should be "Your Application"
  • "Pending" should be "Pending Review"
  • "Save Changes to Application" and notify user of editable submission, instead of just a simple "save", per #47
  • Fix Password overlaps on iPad, per #46
  • Sponsorship Custom Package goes long off the page!
  • Inconsistencies with flash messages. If I press save changes, I get a message saying thanks for registering but when I logout it says I have not filled in the required fields.

Cosmetic changes discovered in walkthrough

  • Too much whitespace on landing: increase font / asset sizes?
  • Duplicate 2018 copy on HackRU Fall 2018 / October 6, 7th 2018
  • Pad out Saturday to make the schedules even
  • If you hover the purple links, they turn yellow, which is unreadable on white <-- fixed to dark purple
  • MLH banner should be black on the sponsorship page
  • "Go to Dashboard" should read "Go To Registration"
  • Move Login box above the other boxes
  • Get rid of announcement / upcoming until day-of
  • Get rid of "Want to Mentor" because it's not ready yet (VHX isn't ready) <-- same thing with volunteers
  • Fix the date on the info panel (April 22nd -> October 6th)
  • Hover rules on the sidebar on the left (shouldn't turn yellow)
  • "GITHUB" should read "GITHUB USERNAME"
  • Remove livestream until day-of
  • Add optional ethnicity dropdown
  • Change the wording of "waitlist" to be more clear to users <--- wait listed is pretty much the most concise form of this...I'm not sure what to do here, because putting registered, rejected, and waitlisted all under pending would kinda obfuscate things.
  • Link snapchat in socials (maybe?) <--- did they get back to us?
  • Mentor and volunteer links should not be on site when it's thin
  • On mobile site the links and the header look wrong <-- hamburger menu was suggested I think

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.