Skip to content

Conversation

@arai-a
Copy link
Contributor

@arai-a arai-a commented Dec 18, 2025

Fixed #5723

This makes the uncommitted range in the FilterNavigatorBar an input field instead of a plain text,
so that the range can be directly modified, which allows selecting the same range between two profiles loaded in different tabs, for comparison purpose.

  • The input field accepts "s", "ms", and "us" units, with floating point number
    • If there's no unit, it's treated as "ms"
  • The modification to the input field is immediately reflected to the selection in the timeline
  • The modification to the selection in the timeline is immediately reflected to the input field
  • While the input field has focus, it shows raw input value, which can also be a temporary invalid value, or something that's different than the formatted value
  • Once the input field lost the focus, the actual formatted range is shown
    • The onSelectionMove part is added in order to blur the input field when the selection in the timeline is modified, which by default doesn't take any focus
  • Completely invalid value (which parseFloat returns NaN) is ignored and the previous value is kept
  • If the duration exceeds the current committed range, it's cropped at the end of the range
  • Hitting enter key in the input field commits the range
uncommiitted-range-input

@canova canova self-requested a review December 23, 2025 13:25
@codecov
Copy link

codecov bot commented Dec 28, 2025

Codecov Report

❌ Patch coverage is 74.28571% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.62%. Comparing base (1a808fe) to head (d444fab).
⚠️ Report is 35 commits behind head on main.

Files with missing lines Patch % Lines
src/components/shared/FilterNavigatorBar.tsx 80.00% 10 Missing and 1 partial ⚠️
src/components/timeline/Selection.tsx 33.33% 4 Missing ⚠️
src/components/app/ProfileViewer.tsx 40.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5725      +/-   ##
==========================================
- Coverage   85.64%   85.62%   -0.03%     
==========================================
  Files         313      313              
  Lines       31013    31076      +63     
  Branches     8535     8551      +16     
==========================================
+ Hits        26562    26608      +46     
- Misses       4021     4037      +16     
- Partials      430      431       +1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Make the selection duration directly editable as a text

1 participant