GithubHelp home page GithubHelp logo

oneleif / olwebsite-react Goto Github PK

View Code? Open in Web Editor NEW
12.0 6.0 5.0 7.58 MB

This project is the oneleif website React Front End, built to interact with our Vapor API: https://github.com/oneleif/VaporWebsite

Home Page: https://oneleif.com

License: MIT License

HTML 0.28% JavaScript 95.28% Shell 0.01% SCSS 4.43%
oneleif-website javascript react oneleif

olwebsite-react's People

Contributors

0xleif avatar aayushchugh avatar akaash11 avatar ambid17 avatar arkus7 avatar azoraqua avatar basilawwad avatar cosmin-mihalache avatar dependabot[bot] avatar dlinb avatar fabricevladimir avatar flakyllama avatar gautam-arora24 avatar jajiskoot avatar maxwellpark avatar nelsong-c avatar nicholas-patterson avatar nosyminotaur avatar nykka avatar roramigator avatar tnortnern avatar will-nemo avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

olwebsite-react's Issues

HTML/CSS/JS naming conventions

HTML Naming Conventions

Naming Style of ids

  • id should be in camelCase

  • Example id="fakeId

Reason: most common convention and will make the id look different from classNames

CSS Naming Conventions

Naming Style of class names

  • class name should be in kebab-case

  • Example className="fake-idd

Reason: most common convention, able to tab between each word in a CSS file, Also, using hyphens allows you to take advantage of the |= attribute selector, which selects any element containing the text, optionally followed by a dash:

span[class|="em"] { font-style: italic; }

Javascript Naming Conventions

Naming Style of class names

  • variables should be in camelCase

  • variables should be descriptive, avoid shortening names to keep names informative

  • Example let exampleName; instead of let exName;

Reason: With a large code base and hope to have a lot of devs, having descriptive names with help newer and younger devs know what's going on

Naming Style of constants

  • constants should be all caps

  • constants should have underscores to delimit spaces

  • Example const EXAMPLE_CONSTANT = "example"; instead of const exampleConstant = "example";

Reason: makes constants identifiable and readable, gives a good description of what they are or what they're used for

Coding standards: CSS

We would like some beginning coding standards to be written up in the Wiki and submitted for PR so that we have standards for new members.

Code Block Proposal

Code Blocks to be used above variables, consts, functions, and render

Example:

  /************************************
   * Constants
   ************************************/

  const EXAMPLE_CONST = "example const";

export default function ExampleComponent() {
  /************************************
   * State
   ************************************/

  const [exampleState, setExampleState = useState();

  /************************************
   * Life Cycle Hooks
   ************************************/

   useEffect(() => {

   }, []);

  /************************************
   * Functions
   ************************************/
  
   function exampleFunction() {

   }

Reason: This would help encapsulate the functionality/purpose of the code underneath these blocks

File Naming Convention Proposal

React Component File naming:

  • Should be contained in Folders that are in PascalCase

  • Should have .jsx extenstion on files that contain React/JSX

  • Should be written in PascalCase

Example:
(contained in src/components/MyComponent/MyComponent.jsx)
MyComponent.jsx

Reason: These are the most common naming conventions when it comes to react

Javascript File naming:

  • Should be contained in Folders that are in kebab-case

  • Should have .js extenstion on files that contain strictly Javascript

  • Should be written in kebab-case

Example:
(contained in src/components/compent-utils/component-utils.js)
component-utils.js

Reason: These are the most common naming conventions when it comes to javascript that I've worked with

Create Image Carousel for Landing View

Currently using a react carousel but it seems to be deprecated. I think it would be better if we created our own carousel. Would allow us to have more control, be able to customize it more

View Body not fitting full page

Currently on views with no or small amount of content, the page body is not fitting the full screen. It shows a ton of white space

Handle User Authentication on Login/ Logout

Currently on a successful user login the user is redirected to the landing view. Before this occurs we will need to take the user credentials off the response header and store them in the window. These values will be the user email, the session token and the expiration date the session tokens

When the user logs out, we also need to make sure that all previously saved authentication information is removed.

Spike: Markdown Interpretors

Look into potential markdown interpreters to use for blog posts, I'd say mess around and see what's out there. It would be interesting if we wrote our own interpreter, feel free to get crazy with it.

Filter box

Waiting on Search API and styling.

Useful to show the most common tags (for posts) or languages (for active projects)

Create the profile page

Until designs are made, just use the API to get the requests working and don't worry about the look of the page, that will be a different ticket

The profile page should list fields for all of the information in the User interface, see the API here: https://github.com/oneleif/olWebsite/wiki/API-Interface-Documentation

There should be a button to toggle the page into an editable form which saves the profile updates in the form upon submission.

Add active hover css to the links on the top nav view

With the "best practices css" the links were changed from a full div to just text. These links need to change color on hover (probably become more opaque) to show they are clickable. Use the activeClassName field on the Nav Link to apply this css.

Git Standards

Working on any oneleif repository or active project should be standardized. The following are guidelines to make a project easy to work on.

ONLY the initial ticket should be made on the Master branch.

All tickets should be merged into Develop branch

All tickets should be done on their own Feature/feature-name branch

Pull requests should pull from the Feature branch into the Develop branch.

Pull requests should require reviewers (2+) and are enforced even for admins

All Git repositories should have a detailed README and Wiki with info on contributions, or point to the oneleif Open Source contribution standards.

All oneleif Active Projects should contain the oneleif footer in their readme and/or wiki.

Pull Requests should be make directly in the repository for oneleif members RATHER than a forked repo for ease of testing by reviewers.

Refactor Hamburger Toolbar/Toolbar

Currently they are two separate components, which seems a bit unnecessary. Would be nice to refactor it one component that changes CSS based on size of screen

Customize ES-lint

The linter should prevent most trivial compilation and styling mistakes. This is the first pass at setting up a customized linter.

Password validation Client side for registration

Currently we only check if a password input is empty or that the password matches the reentered password. Will also need to check that the password meets our set validation:

  • length of 8 or greater
  • contains a lowercase letter
  • contains uppercase letter
  • contains digit
  • contains special character

JS Docs Proposal

Function Documentation

Above each function

/**
* Description of function goes here
*
* @param {<Type of Param>} <Name of Param> - <Description of Param>
* @returns {<Type of Returns>} <Name of Returns> - <Description of Returns>
*/

Reason: Classic JS docs, i think it's self explanatory

State Documentation

Above each state

/**
* Description of state goes here
*
* @type <Type of state>
* @default <default value if there is one>
*/

Reason: i think it's self explanatory

Fetch Wrapper

Implement a fetch wrapper that passes in the needed params to perform a fetch to the backend. This is to make the code base prettier

Coding standards: testing

Jest and React Testing Library

We would like some beginning coding standards to be written up in the Wiki and submitted for PR so that we have standards for new members.

Coding standards: Components

Functional components seem to be agreed upon as the first standard.

We would like some beginning coding standards to be written up in the Wiki and submitted for PR so that we have standards for new members.

Add Register page

Until designs are made, just use the API to get the requests working and don't worry about the look of the page, that will be a different ticket

React Function Styling Proposal

Declaring Functions with keyword 'function'

The Debate:
When writing with React I've seen two different approaches to writing functions

const update = () => {

}

&&

function update() {

}

Proposal:
To use the latter function that uses the keyword function

Reason: Easier to scan component for functions, especially with a large file. These functional components all start to look the same and this will help functions stand out

Search Box Validation

Will need to show some sort of message when an empty string has been entered into the search box that will prompt the user to enter a value

React File Format Proposal

  • The use of functional components instead of class components

  • using the keyword function and default export on same line

  • imports at top of page (whitespace between different types of imports)

  • constants above component

  • useState at top of component

  • useEffects under useState

  • functions under useEffects

  • render at the bottom of the page

Example:

import React, { useState, useEffect } from "react";

import Example from "example";

  /************************************
   * Constants
   ************************************/

  const EXAMPLE_CONST = "example const";

export default function ExampleComponent() {
  /************************************
   * State
   ************************************/

  const [exampleState, setExampleState = useState();

  /************************************
   * Life Cycle Hooks
   ************************************/

   useEffect(() => {

   }, []);

  /************************************
   * Functions
   ************************************/
  
   function exampleFunction() {

   }

  /************************************
   * Render
   ************************************/

  return (
    <div>
    </div>
  );
};

Reason: Using the function instead of the es6 method allows everything (parameters and export) to be on one line and helps the functional component stand out more. Life cycle at the top allows to see the actions performed on useEffect quickly and easily. Render at the bottom keeps a uniform file and no other reason lol

IF statement Styling Convention Proposal

When writing if/else if/else statements

  • statements are on their own line

  • spacing between if and bracket

if (/*logic*/) {
   //perform action
}
else if (/*logic*/) {
   //perform action
}
else {
   //perform action
}
  • nested if statements are tabbed over as such
if (/*logic*/) {
    if (/*logic*/) {
       //perform action
    }
}

Reason: Allows for code readability and looks very clean; which is very important when trying to have a large group of people working on the same code base

Create OlWebsite Error Well

Will need to implement a generic error well that will take in a message and boolean if there was an error or not (Display Error Icon if So). Currently need an error well implemented for the "Page Not Found View"

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.