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

fix(openchallenges): use default text for empty start/end dates #2217

Merged
merged 6 commits into from
Oct 14, 2023

Conversation

vpchung
Copy link
Member

@vpchung vpchung commented Oct 7, 2023

Fixes #2130

Changelog

  • update logic for use_default()
    • I am using str == null (instead of str === null || str === undefined) since this expression will return false for undefined values as well
  • apply text-gray class for Start Date and End Date if date not available

Preview

Screenshot 2023-10-06 at 5 23 44 PM

Just in case, I also checked the organization profile to ensure the latest logic change doesn't affect existing default texts:
Screenshot 2023-10-06 at 5 23 32 PM

@vpchung vpchung self-assigned this Oct 8, 2023
@vpchung vpchung changed the title fix(ui): use default text for empty start/end dates fix(openchallenges): use default text for empty start/end dates Oct 12, 2023
@vpchung vpchung requested a review from tschaffter October 13, 2023 18:26
@@ -1,7 +1,7 @@
<main *ngIf="challenge">
<div id="bio">
<h3 class="top-section-title">Overview</h3>
<p>{{ useNaIfEmpty(challenge.description) }}</p>
<p>{{ useNaIfFalsey(challenge.description) }}</p>
Copy link
Member

Choose a reason for hiding this comment

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

Don't US speakers always adopt the shortest words? ;-)

A falsy (sometimes written falsey) value is a value that is considered false when encountered in a Boolean context.

Source: https://developer.mozilla.org/en-US/docs/Glossary/Falsy

@tschaffter tschaffter self-requested a review October 13, 2023 18:32
@vpchung vpchung merged commit 3a1da2c into Sage-Bionetworks:main Oct 14, 2023
6 checks passed
@vpchung vpchung deleted the bug-2130 branch October 14, 2023 03:28
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.

[Bug] 'Not available' not shown for empty date fields
2 participants