Skip to content

feat: Allow to sort logs by timestamp in ASC direction#787

Merged
kodiakhq[bot] merged 2 commits intomainfrom
ernest/hdx-1449-v1-feat-option-to-order-by-timestamp-in-the-asc-direction
May 6, 2025
Merged

feat: Allow to sort logs by timestamp in ASC direction#787
kodiakhq[bot] merged 2 commits intomainfrom
ernest/hdx-1449-v1-feat-option-to-order-by-timestamp-in-the-asc-direction

Conversation

@ernestii
Copy link
Contributor

@ernestii ernestii commented May 2, 2025

Allow to sort logs by timestamp in ASC direction.

Screen.Recording.2025-05-01.at.8.10.04.PM.mov

@ernestii ernestii requested a review from Copilot May 2, 2025 02:11
@changeset-bot
Copy link

changeset-bot bot commented May 2, 2025

⚠️ No Changeset found

Latest commit: 8ba294b

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

@vercel
Copy link

vercel bot commented May 2, 2025

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

Name Status Preview Comments Updated (UTC)
hyperdx-v2-oss-app ❌ Failed (Inspect) May 6, 2025 4:00pm

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enables sorting logs by timestamp in ascending order by introducing an order state and a toggle mechanism in the log table header.

  • Added order and setOrder props in RawLogTable and updated prop types
  • Updated the timestamp header to support toggling sort order (while ensuring live mode always remains in descending order)
  • Propagated the order property to affect caching (resultsKey) and child components
Files not reviewed (1)
  • packages/app/styles/LogTable.module.scss: Language not supported

? 'Time'
: `Timestamp${isUTC ? ' (UTC)' : ' (Local)'}`,
header: () => (
<div
Copy link

Copilot AI May 2, 2025

Choose a reason for hiding this comment

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

Consider adding role="button" and keyboard event support (e.g., onKeyDown) to the clickable header div for improved accessibility.

Suggested change
<div
<div
role="button"
tabIndex={0}

Copilot uses AI. Check for mistakes.
@ernestii ernestii force-pushed the ernest/hdx-1449-v1-feat-option-to-order-by-timestamp-in-the-asc-direction branch from 4ec13e3 to 8b030f4 Compare May 2, 2025 02:15
@ernestii ernestii force-pushed the ernest/hdx-1449-v1-feat-option-to-order-by-timestamp-in-the-asc-direction branch from 8b030f4 to 9828308 Compare May 2, 2025 02:15
Copy link
Contributor

@MikeShi42 MikeShi42 left a comment

Choose a reason for hiding this comment

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

nice!

@teeohhem
Copy link
Contributor

teeohhem commented May 6, 2025

Note: PR jobs are failing due to an outdated ubuntu runner that has been deprecated. Fix is here: #792

@kodiakhq kodiakhq bot merged commit 76a96c3 into main May 6, 2025
5 of 6 checks passed
@kodiakhq kodiakhq bot deleted the ernest/hdx-1449-v1-feat-option-to-order-by-timestamp-in-the-asc-direction branch May 6, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants