Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update calendar entries with "Event Name" #3818

Closed
1 task
Tracked by #138
djgarr opened this issue Jun 4, 2020 · 11 comments
Closed
1 task
Tracked by #138

Update calendar entries with "Event Name" #3818

djgarr opened this issue Jun 4, 2020 · 11 comments
Assignees
Milestone

Comments

@djgarr
Copy link
Contributor

djgarr commented Jun 4, 2020

Summary

When entering information into the Disclosure database, we add a field for "Event Name". When we transitioned to the new website, that information dropped off the entry. Trying to see if it can be added back.

When we enter data into the Disclosure database, we enter information for:
-Event Name
-Category
-Date
-Location
-URL
-Description

Right now, the information for the category, date, location, url, and description show up:

image

image

Related issues

Completion Criteria

  • Add event name to calendar entry
@lbeaufort
Copy link
Member

lbeaufort commented Sep 15, 2020

In the API, Event Name is labelled summary. Example: https://api.open.fec.gov/v1/calendar-dates/?api_key=DEMO_KEY&per_page=500&event_id=6045

2 things need to be updated:

  • The calendar "grid" view needs to show the "Event Name" aka summary in the API instead of the existing description:
    image

In the front-end, I think we need to change this title: event.description || 'Event title', to title: event.summary || 'Event title',

var processed = {
category: event.category,
location: event.location,
title: event.description || 'Event title',
summary: event.description || 'Event summary',
state: event.state ? event.state.join(', ') : null,
start: event.start_date ? moment(event.start_date) : null,
hasStartTime: calendarHelpers.checkStartTime(event),
end: event.end_date ? moment(event.end_date) : null,
className: calendarHelpers.className(event),
tooltipContent: calendarHelpers.mapCategoryDescription(event.category),
allDay: event.all_day,
detailUrl: event.url

  • The calendar "list" view needs to add "Event Name" aka summary in the API:

image

We think this is because this template isn't properly displaying title possible due to not getting the right variables.

{{#if title}}
<h3 class="cal-list__title">{{title}}</h3>
{{/if}}

@JonellaCulmer
Copy link
Contributor

JonellaCulmer commented Oct 1, 2020

@johnnyporkchops @djgarr @lbeaufort @patphongs

Below are mockups of what the tooltip will look like on the calendar view. I plan to provide additional mockups for the view on mobile/list view as well. This is what I have so far. To achieve this look we will need to address the issue in this ticket as well. It's possible that both can be achieved with a single PR.

calendar_mockup

Screen Shot 2020-10-01 at 5 07 36 PM

@djgarr
Copy link
Contributor Author

djgarr commented Oct 1, 2020

These look good to me. Thanks!

@JonellaCulmer
Copy link
Contributor

@johnnyporkchops @djgarr @patphongs @lbeaufort @dorothyyeager
Here's the improved list view that includes the event title (aka summary). One thing of concern as we move forward is the language we use in the titles (and everywhere). Because, based on the API we're abbreviating presidential as "prez" and congressional as "cong". The GPO style guide appears to use con and cong as abbreviations.

Some things to note in both of these views is the addition of "Location:" language. Currently states are abbreviated, but that's not in the API, so not sure how that's happening.

Also, I modified the date area to show the day of the week. Ex. "Wednesday, December 3, 2020"

Calendar_listview

@patphongs
Copy link
Member

Thanks @JonellaCulmer, mock ups look good. I think the data in the calendar endpoint is ported directly from the internal calendar tool database without much change. So it's possible the internal tool does not abbreviate states, and hence it gets imported into the calendar endpoint not abbreviated.

@JonellaCulmer
Copy link
Contributor

@patphongs Thanks for that info. It appears that sometimes we abbreviate and sometimes we don't. @djgarr Do you think we abbreviate when it's more than one place? Or is there another reason? I think we need to be consistent in all places.

Examples:
Screen Shot 2020-10-06 at 9 10 35 AM

@djgarr
Copy link
Contributor Author

djgarr commented Oct 6, 2020

@JonellaCulmer You are correct. When it's only one state, I've been spelling it out when entering the information into Disclosure. When it's more, I've been going with the abbreviations

@JonellaCulmer
Copy link
Contributor

@djgarr Can the lists be long? The second example I showed with two locations is short, but are there really longs lists too? Like 10-15 locations?

@djgarr
Copy link
Contributor Author

djgarr commented Oct 6, 2020

@JonellaCulmer Yes
image

@JonellaCulmer
Copy link
Contributor

@djgarr I think we're good to leave it as is for now then! Thanks! I'm going to open up a followup implementation ticket for this.

@JonellaCulmer
Copy link
Contributor

Closing in favor of #4111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants