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 stats order #695

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fix stats order #695

wants to merge 1 commit into from

Conversation

luis-herasme
Copy link
Member

@luis-herasme luis-herasme commented Jan 28, 2025

Checklist

  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

Stats bar charts are displayed backwards

Related Issue

Closes #687

Copy link

changeset-bot bot commented Jan 28, 2025

⚠️ No Changeset found

Latest commit: f1e6821

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link

vercel bot commented Jan 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blobscan-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 28, 2025 1:29am
blobscan-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 28, 2025 1:29am
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
blobscan-gnosis ⬜️ Ignored (Inspect) Visit Preview Jan 28, 2025 1:29am
blobscan-holesky ⬜️ Ignored (Inspect) Visit Preview Jan 28, 2025 1:29am
blobscan-mainnet ⬜️ Ignored (Inspect) Visit Preview Jan 28, 2025 1:29am
blobscan-sepolia ⬜️ Ignored (Inspect) Visit Preview Jan 28, 2025 1:29am

Copy link

codecov bot commented Jan 28, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.50%. Comparing base (74ee125) to head (f1e6821).

Files with missing lines Patch % Lines
packages/api/src/routers/stats/getDailyStats.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #695   +/-   ##
=======================================
  Coverage   88.50%   88.50%           
=======================================
  Files         160      160           
  Lines       10919    10919           
  Branches     1199     1199           
=======================================
  Hits         9664     9664           
  Misses       1255     1255           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@PabloCastellano PabloCastellano left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Member

@PJColombo PJColombo left a comment

Choose a reason for hiding this comment

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

I think it makes sense to return the stats sorted by the most recent one.

I was thinking we could add a sort query parameter, similar to the one used in endpoints that return multiple elements.

We can use this sort schema. We can then update the stats page trpc request by adding sort: "asc" query param

While we’re at it, we could abstract this functionality into its own middleware,withSort.

@PJColombo
Copy link
Member

PJColombo commented Jan 28, 2025

Don't forget to add a changeset

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.

Stats bar charts are displayed backwards
3 participants