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

USWDS-Site - Date range picker: Add date picker known issues to date range picker #2620

Merged
merged 13 commits into from
Jun 7, 2024

Conversation

amyleadem
Copy link
Contributor

@amyleadem amyleadem commented Apr 16, 2024

Summary

  • Added date picker known issues to the date range picker page
  • Created the known_issues_key front matter variable so that we can share known issues across pages if needed.
  • Cleaned up code to prevent duplication

Related issue

Closes #2580

Preview link

Date range picker page

Problem statement

The date range picker is affected by known issues listed on the date picker page. The date range picker page should pull in known issues from the date picker component.

Solution

Testing and review

  1. Confirm that the date picker known issues appear on the date range picker page
  2. Confirm that all links in the known issues section point to the expected location
  3. Confirm that the known issues alert appears at the top of the date range picker page
  4. Confirm no regressions on other pages with known issues (character count, combo box, date picker, file input, input mask, validation)
  5. Confirm this code meets standards

Copy link
Contributor Author

@amyleadem amyleadem Apr 19, 2024

Choose a reason for hiding this comment

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

Note

Edited the vars here to accomplish the following:

  1. Accommodate the new known_issues_key in one spot
  2. Have clearer names (issues -> known_issues)
  3. Standardize implementation and remove duplicate code for know-issues-alert.html and known-issues.html


{%- if issues.items -%}
Copy link
Contributor Author

@amyleadem amyleadem Apr 19, 2024

Choose a reason for hiding this comment

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

Note

I moved this check to component.html to limit code duplication

@@ -55,4 +55,5 @@ title: Date range picker
type: component
changelog:
key: component-date-range-picker
known_issues_key: date-picker
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note

Open to suggestions for naming this data key.

@@ -1,17 +1,15 @@
{% assign page_name = page.title | downcase %}
{% assign page_slug = page_name | slugify %}
{% assign github_label = page.github_label_url | default: page.title | replace: ' ', '+' %}
Copy link
Contributor Author

@amyleadem amyleadem Apr 19, 2024

Choose a reason for hiding this comment

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

Note

github_label_url is not currently used. Eventually, we might need to bring this back because the github label names do not always line up with the component names, but I would prefer updating the label name instead. We can explore this later on if needed.

@amyleadem amyleadem marked this pull request as ready for review April 19, 2024 21:37
Copy link
Contributor

@mahoneycm mahoneycm left a comment

Choose a reason for hiding this comment

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

This looks good to me! Left one comment about a potential future enhancement to allow multiple pages issues to be combined.

  • Confirm that the date picker known issues appear on the date range picker page
  • Confirm that all links in the known issues section point to the expected location
  • Confirm that the known issues alert appears at the top of the date range picker page
  • Confirm no regressions on other pages with known issues (character countcombo boxdate pickerfile inputinput maskvalidation)
  • Confirm this code meets standards

_includes/component.html Show resolved Hide resolved
@@ -2,6 +2,12 @@ title: Date range picker
type: component
changelogURL:
items:
- date: NNNN-NN-NN
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note

We need to update this changelog date before merge

Copy link
Contributor

@mejiaj mejiaj left a comment

Choose a reason for hiding this comment

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

Overall looks good. Added minor, optional, suggestions for clarity.

@@ -2,6 +2,12 @@ title: Date range picker
type: component
changelogURL:
items:
- date: NNNN-NN-NN
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- date: NNNN-NN-NN
- date: 2024-04-30

_data/issues/date-picker.yml Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

Future enhancement

Create a reusable alert component.

{% if page.alert == true %}
<div class="usa-alert margin-bottom-3 usa-alert--{{ page.alert-class }}">
<div class="usa-alert__body">
<h2 class="usa-alert__heading">{{ page.alert-heading }}</h2>
<p class="usa-alert__text">
{{ page.alert-content }}
</p>
</div>
</div>
{% endif %}

Co-authored-by: James Mejia <james.mejia@gsa.gov>
@thisisdano thisisdano merged commit b5f65dc into main Jun 7, 2024
11 checks passed
@thisisdano thisisdano deleted the al-date-range-picker-known-issues branch June 7, 2024 22:00
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.

USWDS-Site - Known issues: Add known issue alert to date range picker page
4 participants