Giter VIP home page Giter VIP logo

coderunner-client's Introduction

coderunner-client

ISC license GitHub latest commit GitHub forks

Client-side for group project working on an anonymous community journaling website.

Installation & Usage

  1. Clone this repo using git clone
  2. Enter the directory cd coderunner-client
  3. Install dependencies npm install
  • npm start to run the server using python http.server
  • npm test to run tests contained in test/ directory
  • npm run coverage to check test coverage
  • npm run dev to run the server with watchify and python http.server
  • npm run bundle to build a javascript bundle using browserify

Deployment

This client is currently deployed at https://coderunners.netlify.app/

Project Goal

Build a website where users can anonymously post journal entries for other people to see, comment on and react to using emojis.

Other Requirements:

  • Message character limit
  • Add gifs to messages using giphy

gif of site in action

Design & Implementation

To design the web client we first found reference material by looking for websites with a similar purpose to our project goal and then came up with layout ideas drawing from those references.

References

Technologies

Layout

Figma Design

Design made using Figma ๐Ÿ”—

Changelog

  • Remaining character count under message input fields.
  • Sort posts by newest, oldest, most reactions.
  • Searchable tags on posts containing keywords
  • Can remove selected gif after selecting.

Fixed Bugs

  • Date display on posts showing the wrong time.
  • New posts display in the wrong order.
  • Sorting by oldest and newest shows posts in reverse order.
  • Changing page doesn't scroll to top of page.
  • Selecting a gif makes it disappear.
  • Emoji reactions on single post display in reverse order.
  • Posting a comment doesn't update comment count.
  • Text area can be resized.
  • Line breaks not showing up on posts and comments.

Pitfalls & Discoveries

  • Could not get the GIF previews in the search box to stack properly. The aim was for them to be tiled in a masonry style layout but it wasn't able to work in way such that elements could simply be appended and stacked automatically.
  • You cannot pass the .appendChild method of an element directly into a function as the callback argument, it throws an illegal invocation error.
  • Learned about new methods to make manipulating the DOM easier including Element.insertAdjacentElement and Element.replaceChild.
  • An issue occurred where the JavaScript files being required were returning undefined. It turns out that the order that files are required is important for Browserify and functions cannot be required from files which require the file that it is being required from. This essentially gives the required file it's own scope in relation to the "parent".
  • Putting a newline character \n into the .textContent of an element doesn't show the newline by default. The CSS property white-space: pre; must be set for those newlines to show.

Testing

  • Since an API request involves two promises, to test an API fetch request it is neccessary to define a mocked fetch function that handles both promises being resolved.
  • In our test suite, testing that timestamps are generated correctly can fail if run in a timezone different from GMT+0.

Remaining Bugs

  • The form for submitting a post doesn't reset properly after posting a message.
  • Blank posts can be submitted but will be rejected by server.
  • Blank comments can be posted.
  • User ID number collision is still technically possible.

Improvements & Future Features

  • Expand the search feature to not only search tags but message content.
  • Have the Giphy pop-up show trending GIFs on first load.
  • Live post updates so new posts can be shown without having to refresh the page.

License

ISC License ๐Ÿ”—

coderunner-client's People

Contributors

rxdvd avatar dafe-akaka avatar gi-ba-bu avatar sukhrajsinghb avatar

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.