X Tutup
Skip to content

Better sorting and freshness display for issue status#237

Merged
vilmibm merged 4 commits intomasterfrom
issue-sort
Jan 21, 2020
Merged

Better sorting and freshness display for issue status#237
vilmibm merged 4 commits intomasterfrom
issue-sort

Conversation

@vilmibm
Copy link
Copy Markdown
Contributor

@vilmibm vilmibm commented Jan 17, 2020

Closes #73

This PR:

  • changes the sections in issue status to sort by updatedAt instead of createdAt
  • adds a "fuzzy" timestamp to the end of issues e.g. about 1 hour ago

image

NB: updatedAt covers

  • issue created
  • new comment on an issue
  • issue body edited

the GraphQL docs are fully opaque on that and I had to test it out myself to figure that out.

I didn't update the tests for issue status but I did add unit tests for the fuzzy logic.

@vilmibm vilmibm requested review from ampinsk and mislav January 17, 2020 22:05
Copy link
Copy Markdown

@ampinsk ampinsk left a comment

Choose a reason for hiding this comment

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

Looks great from a design perspective!

Copy link
Copy Markdown
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

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

Looks great, especially the test! 🚀

utils/utils.go Outdated
return fmt.Sprintf("about %s ago", Pluralize(int(ago.Hours()), "hour"))
}

return fmt.Sprintf("about %s ago", Pluralize(int(ago.Hours()/24), "day"))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The fallback is to use "about N days" ago, but when this turns into months or years (some issues can be open for a really long time), it could display large numbers like “234 days ago", which could be difficult to interpret for a human.

If it's less than a year, but more than 30 days, can we show "months" and otherwise "years"?

@vilmibm vilmibm merged commit 91582c5 into master Jan 21, 2020
@mislav mislav deleted the issue-sort branch January 22, 2020 10:56
mislav pushed a commit that referenced this pull request Jan 23, 2020
Better sorting and freshness display for issue status
Stonre pushed a commit to Stonre/strands-fork that referenced this pull request Jul 21, 2025
* Use deployment environment gating for integration tests.

* Only run on PRs that target main.

* Use correct head name.
cchristous pushed a commit to cchristous/cli that referenced this pull request Feb 28, 2026
* feat: list all projects using pagination in v1alpha/projects

* feat(projects): use retry with exponential backoff

* ci: gen test results report

* fix(projects): use only get projects, drop page_size query param.

* chore: pin gotestsum to the latest working version v1.12.2

* fix: simplify the code
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.

issue status: sort by recency and display timestamp

3 participants

X Tutup