GithubHelp home page GithubHelp logo

data-for-change / anyway-newsflash-infographics Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 23.0 13.85 MB

Development branch deployed automatically to website:

Home Page: https://anyway-infographics-staging.web.app/

License: MIT License

HTML 0.86% CSS 0.28% TypeScript 98.78% Dockerfile 0.09%

anyway-newsflash-infographics's People

Contributors

9syncopation avatar adele-angel avatar almogbhl avatar atalyaalon avatar byakter avatar carmelp16 avatar chenmu10 avatar citizen-dror avatar daniel-ilan avatar danielsh28 avatar eidan66 avatar eyalilan avatar harduf-l avatar ialish avatar isaacm890 avatar mashapav avatar meital-lazarovich avatar mimafogeus2 avatar moranzi avatar noa-ui avatar reuvenz1993 avatar ronfybish avatar segevda avatar sejob avatar shaked-hayek avatar yaeluria avatar yaronavraham93 avatar yoavpo avatar yoglib avatar yuvalbl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

anyway-newsflash-infographics's Issues

[Feat] Create a Link Atom component

Create a Link Atom component

Guidlines

  • All links should use this Atom
  • Should be using react-router Link internally
  • Style: color according to attached image
  • Style: hover - change color to slightly brighter. No underline should appear
  • Colors should be defined in styles/_globals.ts

image.png

[Feat] URL per newsflash

Is your feature request related to a problem? Please describe.
Each newsflash should have its own URL that could be linked to, sent, bookmarked...

Describe the solution you'd like
Our main page should have a path with a variable (/:id) that represents the newsflash.
When the page loads or the path changes, the page will launch a request to fetch the relevant newsflash's data, then display it.
This will replace the current behavior of loading the data in an onClick callback.

Additional context
This should work with the implementation for issue #71.

[Feat] Accidents Severity :: Color markers according to severity.

Accidents severity widget markers should be colored according to severity.

Currently most_severe_accidents is not displayed.
This widget should show:

  1. a map with locations (see LocationMap component)
  2. each location should displayed as a marker with appropriate color:
    קשה - אדום
    בינוני - צהוב
    קלה - כחול

Add non technical documentation about project's vision

  1. At the root directory, Add file named Vision.MD
  2. Write an overview about the project's vision using markdown. Include links and resources which explain the anyway and vision zero.

Keep in mind: The Goal here is to help new contributors to understand the project and it needs. It should provide a good replacement to AnyWay introduction talk in case a project leader is not around to give one.

[Refactor] Move mergeOptions to init.service

See notes from #92

// TODO: Move to init.service once it's merged.
L.Icon.Default.mergeOptions({
    iconRetinaUrl: require('leaflet/dist/images/marker-icon-2x.png'),
    iconUrl: require('leaflet/dist/images/marker-icon.png'),
    shadowUrl: require('leaflet/dist/images/marker-shadow.png')
})

Feature: add main content filters

image
Filter should behave as a dropdown list with the following values:

  • 1 year
  • 3 years
  • 5 years
  • 8 years

At this stage not action required on selection

[Feat] add theme support

We would like to support different themes in the future.
For that, we will support basic theme as following

  • add theme observable to RootStore. it should be of enum type with the following values: DEFAULT, YNET
  • when theme value is DEFAULT - app will have the current appearance.
  • when theme value is YNET - The application bar will have red background.
  • Use MaterialUI theme to set the background color
  • there is no need to allow the user to change theme at the moment - it will be done programmatically.

Refactor: add atoms index file

  1. Add atoms index file.

Example:

// atoms/index.ts
export {default as Button}  from './AnyWayCard';
export {default as Text}  from './Text';
export {default as AnyWayCard}  from './AnyWayCard';
export {default as AnyWayGrid}  from './AnyWayGrid';
  1. Refactor all other component to use the index.

Example:

// HomePage.ts - before:
import AnyWayCard  from '../components/atoms/AnyWayCard';
import AnyWayGrid from '../components/atoms/AnyWayGrid'

// HomePage.ts - after:
import {AnyWayCard, AnyWayGrid} from '../components/atoms'

Feature: Add news component

image

  • Create News component - contain multiple components
  • Create (nested) NewsFlash component (contain date, source and)
  • Create (mock only) filter buttons (all / ynet/ walla etc.) - simple buttons in a row, no style / action required

Add Most Severe Accidents widget (map)

Add a widget that receives an array of data in the format:

{
  "longitude": 34.9780568296871,
  "latitude": 32.4543458814189,
  "accident_severity": "קשה",
  "accident_timestamp": "2016-05-15 21:00:00"
}

And shows it on a map.

There's a location widget component that you can use for this, but it might need modification to work with multiple locations.

[Feat] Create "Thank Yous" page.

Describe the solution you'd like
We should have a Thanks page that displays some content.
Ask @atalyaalon about it. If no content is available yet. a boilerplate is a good start.

When clicking on "תודות" in the footer, the link should navigate to this page.

Add heatmap widget

  • Research heatmap functionality over leaflet.
  • Create basic heatmap widget.

[Feat] Create "About" Page

Describe the solution you'd like
We should have an about page that displays some content.
Ask @atalyaalon about it. If no content is available yet. a boilerplate is a good start.

When clicking on "אודות" in the footer, the link should navigate to this page.

Handle Newsflash Selection in Store

  • Create action that's activated when clicking on a newsflash.
  • This action should call the API and get the widgets' data for the selected newsflash.

[Feat] Replace newsflash item buttons with links

Each newsflash should have its own URL. Newsflash items on the sidebar should navigate to these URLs instead of running an onClick event.

This will work once we have a component and a path that could detect the identifier in the URL and use it.

[REFACTORE] Solve Compilation Warning in News Component

Solve Compilation Warning:

./src/components/templates/News.tsx
  Line 13:6:  React Hook useCallback has a missing dependency: 'store'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

Task: add store to useCallback as a dependency

  const onNewsClick = useCallback((id: number) => {
    store.selectNewsFlash(id)
  }, [store]);

[Bug] leaflet map render problem in side bar

in SideBar LocationMap ,
a tile don't load on first render :
image

  <Box flexBasis={300} flexShrink={0} p={1}>
      <LocationMap data={[{latitude: 32.0853, longitude: 34.7818}]} center={{lat: 32.0853, lng: 34.7818}}/>
      </Box>

1 - can fix it with change in css of container (copied form AnyWayCard)

  const cardStyles: object = {
    padding: '10px',
    margin: '10px',
    width: '300px',
    height: '350px',
    display: 'flex',
    justifyContent: 'space-evenly',
    flexDirection: 'column'
  }
...

    <Box style={cardStyles}>
      <LocationMap data={[{latitude: 32.0853, longitude: 34.7818}]} center={{lat: 32.0853, lng: 34.7818}}/>
      </Box>

image

2- need to adjust the css.

3- in case of resize - maybe need to use
mapRef.current.leafletElement.invalidateSize(false);

[Feat]Styling of Sidebar

As part of restyling the app to fit its basic design template. Make the sidebar styling identical to the template. Remove margins between the newflashes, edit colors, borders, fonts, filter buttons, add icons to side of newsflashes title. Add title ״מיקום משוער״ before map.

image

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.