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

Add primary venue title to project card footer #2136

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

anishTP
Copy link
Contributor

@anishTP anishTP commented Nov 13, 2024

Before

Screenshot 2024-11-13 at 3 39 02 PM

After

Screenshot 2024-11-13 at 3 38 48 PM

@anishTP anishTP requested a review from jace November 13, 2024 10:10
@@ -191,7 +191,7 @@
{% endif %}
<div class="flex-wrapper flex-wrapper--end flex-wrapper--space-between flex-wrapper--wrap top-padding">
{%- if include_details %}
<div class="card__body__location mui--text-light">{% if project.primary_venue %}{{ faicon(icon='map-marker-alt', icon_size='caption', baseline=false) }} {% if project.primary_venue.city %}{{ project.primary_venue.city }}{% else %}{{ project.primary_venue.title }}{% endif %}{% elif project.location %}{{ faicon(icon='map-marker-alt', icon_size='caption', baseline=false) }} {{ project.location }}{% endif %}</div>
<div class="card__body__location mui--text-light">{% if project.primary_venue %}{{ faicon(icon='map-marker-alt', icon_size='caption', baseline=false) }} {% if project.primary_venue.title and project.primary_venue.city %}{{ project.primary_venue.title }}, {{ project.primary_venue.city }}{% else %}{{ project.primary_venue.city }}{% endif %}{% elif project.location %}{{ faicon(icon='map-marker-alt', icon_size='caption', baseline=false) }} {{ project.location }}{% endif %}</div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs an if clause specifically for primary_venue.city before using it. It may be empty.

The nested if clauses will miss edge cases, so it should be flattened to a series of if/elif/else clauses without nesting.

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

Successfully merging this pull request may close these issues.

2 participants