Skip to content

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

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

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

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
Copy link

changeset-bot bot commented May 2, 2025

⚠️ No Changeset found

Latest commit: 9828308

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 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 ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 2, 2025 2:22am

Copy link

@Copilot 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
Preview

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
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.

1 participant