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

Deprecated Primer::LocalTime in favor of Primer::Beta::RelativeTime #1687

Merged
merged 20 commits into from
Dec 8, 2022

Conversation

mxriverlynn
Copy link
Contributor

@mxriverlynn mxriverlynn commented Dec 7, 2022

Description

deprecates Primer::LocalTime in favor of Primer::RelativeTime, and provides an upgrade guide for the changes. it also adds a note about the threshold argument being an ISO-8601 "duration" in relevant locations, for the RelativeTime component

screenshot of guides page, w/ new guide link:
image

screenshot of basic migration example, in guide:
image

screenshot of arguments in guide:
image

Integration

Does this change require any updates to code in production?

no immediate changes needed, but deprecations need to be cleaned up

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews

@changeset-bot
Copy link

changeset-bot bot commented Dec 7, 2022

🦋 Changeset detected

Latest commit: 8e5153a

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

@mxriverlynn mxriverlynn temporarily deployed to github-pages December 7, 2022 19:43 — with GitHub Actions Inactive
@mxriverlynn mxriverlynn temporarily deployed to review-pr-1687 December 7, 2022 19:47 — with GitHub Actions Inactive
@mxriverlynn mxriverlynn temporarily deployed to github-pages December 7, 2022 19:50 — with GitHub Actions Inactive
@mxriverlynn mxriverlynn temporarily deployed to review-pr-1687 December 7, 2022 19:58 — with GitHub Actions Inactive
@mxriverlynn mxriverlynn temporarily deployed to github-pages December 7, 2022 20:02 — with GitHub Actions Inactive
@mxriverlynn mxriverlynn temporarily deployed to review-pr-1687 December 7, 2022 21:54 — with GitHub Actions Inactive
@mxriverlynn mxriverlynn temporarily deployed to github-pages December 7, 2022 21:58 — with GitHub Actions Inactive
@mxriverlynn mxriverlynn temporarily deployed to review-pr-1687 December 7, 2022 22:14 — with GitHub Actions Inactive
@mxriverlynn mxriverlynn temporarily deployed to github-pages December 7, 2022 22:20 — with GitHub Actions Inactive
Comment on lines +29 to +35
* [Deprecated `Primer::LocalTime`](https://primer.style/view-components/components/localtime)
* [`Primer::Beta::RelativeTime` component](https://primer.style/view-components/components/beta/relativetime)
* [`Primer::Beta::RelativeTime` Lookbook examples](https://primer.style/view-components/lookbook/inspect/primer/beta/relativetime/default)

<p>&nbsp;</p>

[&larr; Back to migration guides](https://primer.style/view-components/migration)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

i ran into a styling issue here, with the bullet list and the following link being right up against each other. the backing css for the <ul> with the bullet list doesn't have any padding or margin at the bottom of it, and it ends up looking like this:

image

the hard coded p tag and nonbreaking space are here as a workaround until the styling can be fixed

@mxriverlynn mxriverlynn mentioned this pull request Dec 7, 2022
54 tasks
@mxriverlynn mxriverlynn marked this pull request as ready for review December 8, 2022 14:15
@mxriverlynn mxriverlynn requested review from a team, camertron and jonrohan December 8, 2022 14:15
@mxriverlynn mxriverlynn temporarily deployed to review-pr-1687 December 8, 2022 18:03 — with GitHub Actions Inactive
@mxriverlynn mxriverlynn temporarily deployed to github-pages December 8, 2022 18:07 — with GitHub Actions Inactive
@@ -101,7 +101,7 @@ class RelativeTime < Primer::Component
# @param month [Symbol] What format months should take. <%= one_of(Primer::Beta::RelativeTime::MONTH_OPTIONS) %>
# @param year [Symbol] What format years should take. <%= one_of(Primer::Beta::RelativeTime::YEAR_OPTIONS) %>
# @param time_zone_name [Symbol] What format the time zone should take. <%= one_of(Primer::Beta::RelativeTime::TIMEZONENAME_OPTIONS) %>
# @param threshold [string] The threshold at which relative time displays become absolute.
# @param threshold [string] The threshold, in ISO-8601 'durations' format, at which relative time displays become absolute.
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

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.

Some small docs changes but otherwise 👍

@mxriverlynn mxriverlynn enabled auto-merge (squash) December 8, 2022 19:26
@mxriverlynn mxriverlynn temporarily deployed to github-pages December 8, 2022 19:29 — with GitHub Actions Inactive
@mxriverlynn mxriverlynn merged commit a5b6f02 into main Dec 8, 2022
@mxriverlynn mxriverlynn deleted the mxriverlynn/deprecate-localtime branch December 8, 2022 19:30
@primer-css primer-css mentioned this pull request Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants