Skip to content

FIX #408 Hide location row when no location @ashishxdev#430

Open
ashishxdev wants to merge 4 commits intoNextCommunity:mainfrom
ashishxdev:fix/dont-show-location
Open

FIX #408 Hide location row when no location @ashishxdev#430
ashishxdev wants to merge 4 commits intoNextCommunity:mainfrom
ashishxdev:fix/dont-show-location

Conversation

@ashishxdev
Copy link
Copy Markdown

image image

@ashishxdev ashishxdev requested a review from jbampton as a code owner April 4, 2026 10:24
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request removes libc constraints from the package-lock.json and updates the location display logic in the Nunjucks templates. Feedback for src/_includes/bio.njk suggests simplifying the redundant conditional logic and addressing potential whitespace issues in the HTML output by using a more concise template structure and the trim filter for consistency.

Comment on lines +25 to +32
{% if location %}
<div class="flex items-center gap-3">
<span class="text-lg">📍</span>
<span class="text-[var(--text-muted)]">{{ location }}{% if country %}, {{ country }}{% endif %}</span>
<span class="text-[var(--text-muted)]">
{% if location and country %}{{ location }}, {{ country }}{% elif location %}{{ location }}{% endif %}
</span>
</div>
{% endif %}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The logic for displaying the location has been made unnecessarily complex and introduces potential UI issues due to whitespace handling.

  1. Redundancy: The nested if/elif checks for location are redundant because the entire block is already guarded by {% if location %}. The previous logic was more concise and readable.
  2. Whitespace Sensitivity: In HTML, newlines and indentation inside a <span> are rendered as spaces. The current multi-line structure will likely result in unwanted leading and trailing whitespace around the location text.
  3. Consistency: It is recommended to use | trim to ensure that strings containing only whitespace are correctly identified as empty, matching the logic applied in src/index.njk.
            {% if location and location | trim %}
            <div class="flex items-center gap-3">
              <span class="text-lg">📍</span>
              <span class="text-[var(--text-muted)]">{{ location }}{% if country %}, {{ country }}{% endif %}</span>
            </div>
            {% endif %}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Agreed, please fix it.

@jbampton jbampton requested a review from BaseMax April 4, 2026 10:27
@jbampton jbampton added this to Next Apr 4, 2026
@jbampton jbampton added this to the Hackfest milestone Apr 4, 2026
@github-project-automation github-project-automation bot moved this to In progress in Next Apr 4, 2026
@jbampton jbampton moved this from In progress to Review in progress in Next Apr 4, 2026
@jbampton jbampton self-assigned this Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Review in progress

Development

Successfully merging this pull request may close these issues.

3 participants