Code Monkey home page Code Monkey logo

coderscamp2020.project.javascript.newsservice's People

Contributors

adam-kostuch avatar jkopyto avatar kacperzolkiewski avatar karolinaszarek avatar kubaszajna avatar mateuszcabala95 avatar r4fau avatar

Watchers

 avatar

coderscamp2020.project.javascript.newsservice's Issues

[Feature] [Subpage] Weather

Weather

Poprawki dla podstrony:

  • Dodaj style globalne z projektu dla buttona i inputa
  • Proponuje wrzucić te poszczególne bloki do pojedynczych div'ów z border-radius 12px i białym tłem
  • Możliwość wyszukiwania za pomocą enteru (aktualnie jest tylko button click)
  • Dodanie bardziej czytelnego komunikatu po wpisaniu błędnej nazwy miasta
  • Responsywność
    image

[Feature] New css global styles

Acceptance criteria

New css global project styles (main menu, button, input)

  • Update App.css
  • Create classes for frequently used items
  • Style homepage calendar

[Feature] [Subpage] Food

Food

Poprawki dla podstrony:

  • Dodaj style globalne z projektu dla buttonów, checkbox'ów i inputa
  • Proponuje wrzucić ten główny blok z wyszukiwaniem do jednego div'a z border-radius 12px i białym tłem, naotmiast te wyszukane do kolejnego z tożsamymi stylami
  • Możliwość wyszukiwania za pomocą enteru (aktualnie jest tylko button click)
  • Dodanie komunikatu po wpisaniu błędnej nazwy składnika, jakaś walidacja
  • Responsywność
    image

[Feature] Working with CSS

Acceptance criteria

CSS files have to be dynamically added and deleted when we change subpages

  • npm i -D parcel-bundler parcel-plugin-css-to-string
  • Add these settings to package.json
"parcel-plugin-css-to-string": {
    "assetType": [
      "css"
    ],
    "minify": true,
    "enableCSS": true
  },
  • Remove type="module" from "index.html"
  • Create file Subpage.js in src/subpages
class Subpage {
    stylesheet
    constructor(stylesheet){
        this.stylesheet = stylesheet
    }

    initStylesheet = () => {
        const css = document.createElement("style")
        css.innerText = this.stylesheet
        document.getElementsByTagName("head")[0].appendChild(css)
    }

    removeStylesheet = () => {
        this.stylesheet && this.stylesheet.remove()
    }
}

export default Subpage
  • Now every subpage class file needs to extend this Subpage class, like class WeatherSubpage extends Subpage
  • In your subpage classes please ensure that method which fires the script is named render()
  • In your subpage classes you need to import your css file like `import css from "./weather-subpage.css"
  • Pass it to super in constructor: `super(css)
  • Rebuild Router.js
export class Router {
  SubpageClass = null

  constructor() {
    window.addEventListener("hashchange", (event) => this.onRouteChange(event))
    this.slot = document.querySelector("#slot")
  }

  onRouteChange() {
    const hashLocation = window.location.hash.substring(1)
    this.loadContent(hashLocation)
  }

  loadContent = async (uri) => {
    let content
    this.SubpageClass && this.SubpageClass.removeStylesheet()

    switch (uri) {
      case "sport":
        content = sportSubpage
        break
      case "food":
        content = foodSubpage
        break
      case "weather":
        content = weatherSubpage
        this.SubpageClass = new WeatherSubpage()
        break
      case "news":
        content = newsSubpage
        break
      case "cryptocurrency":
        content = cryptocurrencySubpage
        break
      default:
        content = homepage
        this.SubpageClass = new Homepage()
        break
    }
    this.updateSlot(content)
  }

  initScript = () => {
    if(this.SubpageClass) {
      this.SubpageClass.initStylesheet()
    }
  }

  updateSlot = (content) => {
    this.SubpageClass && this.SubpageClass.initStylesheet()
    this.slot.innerHTML = content
    this.SubpageClass.render()
  }
}

export default Router

Additional info

If you find some troubles and strange errors try to delete node_modules .cache and package-lock and then npm install && npm run start:dev

If you still dont have your own CSS file, you can pass an empty string to super: super("")

Feel free to contact me

[Management] README

Create the content of README.

  • Description of the project
  • Installation of the project (if needed)
  • Contributors

[Feature] SportDataAPI service

Acceptance criteria

Functioning service that implements methods from SportDataAPI

  • Create new service in service folder
  • Implement proper methods based on proposed functionalities Wiki
  • Test them by console.logging them (see how responses exactly looks like)
  • Remove console log and write tests

[Feature] [Subpage] Homepage

Homepage

Poprawki dla podstrony:

  • Dodaj style globalne z projektu dla buttonów
  • Proponuje wrzucić te poszczególne bloki slidera do pojedynczych div'ów z border-radius 12px
  • Ustawić wysokość dla slidera, ponieważ przy tej animacji zmienia się jej wartość i skacze footer
  • Title + favicon
  • Responsywność
  • Warto wykorzystać style, które są na mojej podstronie do kalendarza
    image

[Feature] [Subpage] Cryptocurrency

Cryptocurrency

Poprawki dla podstrony:

  • Ujednolicenie przycisków oraz wyświetlanie mniejszej ilości walut na podstronie (przykładowo 80 na podstronie)
    image
    na przykład coś takiego
    image
    wykorzystywane do tego klasy w projekcie dla buttona class="button offer-button"

  • Modal najlepiej jakby był wyświetlany w postaci box'a a nie przykrywał całą stronę włącznie z menu, również dostosowanie przycisku i inputa do globalnych styli (pojawia się też dla niego niepotrzebny scroll na osi x)
    image

[Feature] Main page / TopBar

Acceptance criteria

As a user I want to be able to see topbar with tabs that redirect me to the proper subpage

  • Create a TopBar with tabs
  • Add onClick callbacks that redirect user to the proper subpage
  • If user open a subpage, a proper tab in a topbar should be distinguished

Additional info

Feel free to discuss

[Feature] [Subpage] News

News

Poprawki dla podstrony:

  • Postaraj się w taki sposób dorzucić klucz api albo ewentualnie więcej niż jeden w sytuacji gdy zwraca status code 429, bo będzie problem z zaprezentowaniem podstrony, gdy nie będzie dostępu do api w trakcie prezentacji
    image
  • Proponuje wrzucić te poszczególne newsy pojedynczych div'ów z border-radius 12px
  • Jest dziwne zachowanie po zmianie tych newsów, pierwsze wyświetlone mają spoko hover efekt natomiast kolejne już nie, dodatkowo dodaj margines bo aktualnie rozciągany jest ten tak i kliknięcie pomiedzy newsami powoduje otworzenie jednego z nich
  • Wydaje mi się że mogą być one nieco niższe
  • Responsywność najlepiej chyba będzie na flexbox'ie

[Feature] Create resource service provider

Acceptance criteria

A new service provider named ResourceProvider will be created and registered to the provider

  • Create ResourceProvider with proper methods
  • Register it to the provider

[Other] Naming convention

Naming convention

JS Classes: UpperCase
other js files: camelCase
CSS files: snake-case

Please ensure that your files are named like above

[Feature] Routing

Acceptance criteria

As a user I want to be able, to click on tabs and move to new pages

Additional info

Hashchange event is one of the possibilities of making a routing throught the page. If you decide to make it in a different way - just do it

[Feature] MainPage / Carousel

Acceptance criteria

As a user I want to see a carousel with images that refer to the subpages. After clicking on a image I want to be redirected to the proper subpage

  • Implement Carousel (here is the sample: https://glidejs.com/)
  • Prepare some pictures that refer to our subpages
  • Implement onClick methods that redirect users to the proper subpage

Additional info

Feel free to discuss

[Feature] Cleanup

Acceptance criteria

*Project will be free of unnecessary files and description from Readme

  • Clean these things

Additional info

[Feature] WeatherAPI service

Acceptance criteria

Functioning service that implements methods from WeatherAPI

  • Create new service in service folder
  • Implement proper methods based on proposed functionalities Wiki
  • Test them by console.logging them (see how responses exactly looks like)
  • Remove console log and write tests

[Bug] TestDemoBug

Bug description
Test bug

Environment
production

Steps to reproduction

  1. Open application

[Feature] FoodAPI service

Acceptance criteria

Functioning service that implements methods from FoodAPI

  • Create new service in service folder
  • Implement proper methods based on proposed functionalities Wiki
  • Test them by console.logging them (see how responses exactly looks like)
  • Remove console log and write tests

[Bug][Subpage]CryptoCurrency

  1. Bardzo wolne wyszukiwanie monet/tokenów
  • pierwsze wyszkukanie od 3 znaków
  1. Na pierwszej stronie wciąż można kliknąć Previous Page a na ostatnie Next Page
  • Zablokować przyciski

[Feature] CryptoCurrencyAPI

Acceptance criteria

Functioning service that implements methods from CryptoCurrencyAPI

  • Create new service in service folder
  • Implement proper methods based on proposed functionalities Wiki
  • Test them by console.logging them (see how responses exactly looks like)
  • Remove console log and write tests

[Feature] NewsAPI service

Acceptance criteria

Functioning service that implements methods from NewsAPI

  • Create new service in service folder
  • Implement proper methods based on proposed functionalities Wiki
  • Test them by console.logging them (see how responses exactly looks like)
  • Remove console log and write tests

[Bug] Refreshing in subpage

Bug description
If we refresh the application when a subpage is open we are not able to see this subpage again

Steps to reproduction

  1. Open app
  2. Go to subpage (ex. #weather)
  3. Press F5

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.