ResistanceCalendar / resistance-calendar-frontend

A central listing of upcoming progressive events
https://resistance-calendar-staging.herokuapp.com/
MIT License
7 stars 8 forks source link

Make event page buttons work #107

Closed InciteDemocracy closed 7 years ago

InciteDemocracy commented 7 years ago

Clicking the event page button on the event details page should open the event's external event page in a new tab.

ignu commented 7 years ago

i was looking at this. can reverse engineer the url from the data we currently have with

getFacebookUrl(event) {
  const {identifiers} = event;
  if (identifiers[0]) {
    const id = identifiers[0].split(':')[1]
    return `https://facebook.com/events/${id}`
  }
  return null;
}

but this should work as soon as the api returns base_url

pdw207 commented 7 years ago

@ignu We are getting the eventUrl from the api, no? If not we should because the button would break if we added events from other sources.

pdw207 commented 7 years ago

@ignu Created a issue on the backend to pass a source attribute defined in the OSDI docs

pfarnach commented 7 years ago

Just checking in -- what's the status of this ticket? I don't see the PR in the backend and it doesn't seem like the URL is coming back in the data.

pdw207 commented 7 years ago

I created an issue not a PR. Sorry.

pfarnach commented 7 years ago

Ah ok -- @aaghevli or @KamillaKhabibrakhmanova is this something one of you can knock out relatively easily? If not, we can reverse engineer the URL for facebook but would break for other sources, I think

dorono commented 7 years ago

Could also break for facebook if other sources get added and FB was no longer the first item in the array, so we'd have to do a string match or something like that :hankey:.

aaghevli commented 7 years ago

This has been implemented in the API and should be available by now (had to wait for ETL run).

pfarnach commented 7 years ago

Awesome, I see browser_url now -- I'll wrap this up today

pfarnach commented 7 years ago

@aaghevli any idea why some of them don't have a browser_url, like this one? https://resistance-calendar-staging.herokuapp.com/event/58e9a50d74ceb9d94e193e02

@InciteDemocracy if it's something we can't account for and don't have a URL, we should hide the button in the UI right?

pfarnach commented 7 years ago

Resolved with https://github.com/ResistanceCalendar/resistance-calendar-frontend/pull/136

pfarnach commented 7 years ago

The PR hasn't been merged yet so I'm re-opening