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: Primer::Beta::RelativeTime does not correctly accept "month" attribute #2408

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

HDinger
Copy link
Contributor

@HDinger HDinger commented Nov 29, 2023

What are you trying to accomplish?

The component Primer::Beta::RelativeTime accepts a system_argument[:month]. This was set via fetch_or_fallback method. However, there was the wrong variable used for the first parameter (the allowed values).

Integration

List the issues that this change affects.

Closes #2407

Risk Assessment

  • Low risk the change is small, highly observable, and easily rolled back. --> I just used the correct options array instead of the default for the allowed_values
  • Medium risk changes that are isolated, reduced in scope or could impact few users. The change will not impact library availability.
  • High risk changes are those that could impact customers and SLOs, low or no test coverage, low observability, or slow to rollback.

What approach did you choose and why?

  • I decided to also change the defaults for the other options, to their according variables as it looked like copy-past mistake. Since all of them default to nil, it shouldn't make any difference in the result.

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews (Lookbook)
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@HDinger HDinger requested review from a team and keithamus November 29, 2023 10:16
Copy link

changeset-bot bot commented Nov 29, 2023

🦋 Changeset detected

Latest commit: 9c73fdb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/view-components Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@keithamus keithamus left a comment

Choose a reason for hiding this comment

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

Nice catch! LGTM

@jonrohan jonrohan merged commit 57586da into primer:main Nov 29, 2023
26 of 29 checks passed
@primer primer bot mentioned this pull request Nov 29, 2023
@lindenthal
Copy link

Thanks @HDinger and @keithamus 👍

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.

Primer::Beta::RelativeTime ignores passed month attribute
4 participants