Skip to content

web: sortable column headers with tooltips in timing path table#10627

Open
maliberty wants to merge 4 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:web-timing-sort-tooltips
Open

web: sortable column headers with tooltips in timing path table#10627
maliberty wants to merge 4 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:web-timing-sort-tooltips

Conversation

@maliberty

Copy link
Copy Markdown
Member

Match the Qt GUI's timing viewer in the web timing widget:

  • Clicking a path table column header sorts by that column, toggling ascending/descending, with a ▲/▼ indicator. Defaults to slack ascending like the Qt GUI.
  • The Skew, Logic Delay and Logic Depth headers show the same explanatory tooltips as the Qt TimingPathsModel. Tooltips use a custom styled div (like the charts/clock-tree widgets) since native title tooltips are easy to miss; they follow the cursor, clamp to the viewport, and hide during drags and re-renders.
  • Paths are tagged with their server-side index before sorting so timing_highlight requests keep mapping to the right path after reordering (reuses the histogram filter's _originalIndex mechanism).

Also fixes two resizable-header regressions exposed by sorting re-renders:

  • Re-renders that restored saved column widths skipped makeResizableHeaders, losing the resize grips.
  • A resize drag fires a click on the common ancestor of the press/release targets (often the th); makeResizableHeaders now swallows that click so it can't trigger header click handlers such as sorting.

Match the Qt GUI's timing viewer: clicking a path table header sorts
by that column (toggling ascending/descending, slack ascending by
default) and the Skew, Logic Delay and Logic Depth headers show
explanatory tooltips. Tooltips use a custom styled div like the
charts/clock-tree widgets since native title tooltips are easy to
miss. Paths are tagged with their server-side index before sorting so
timing_highlight requests stay correct after reordering.

Also fix resizable-header regressions: re-renders now reinstall the
resize grips, and makeResizableHeaders swallows the click generated
by a resize drag so it does not trigger header click handlers.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
@maliberty maliberty self-assigned this Jun 10, 2026
@maliberty maliberty marked this pull request as ready for review June 10, 2026 02:49
@maliberty maliberty requested a review from a team as a code owner June 10, 2026 02:49
@maliberty maliberty requested a review from gadfort June 10, 2026 02:49
@maliberty

Copy link
Copy Markdown
Member Author

Addresses item 2 in #10263

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request introduces column sorting and custom header tooltips to the timing widget's path table, aligning its behavior with the Qt GUI. It also updates the resize handler to prevent column sorting from triggering at the end of a resize drag, and adds comprehensive unit tests. The reviewer suggested passing savedWidths directly to makeResizableHeaders to avoid forced reflows, and clamping the tooltip's vertical position to prevent it from overflowing the bottom of the viewport.

Comment thread src/web/src/timing-widget.js Outdated
Comment thread src/web/src/timing-widget.js

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ccbf743f98

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/web/src/timing-widget.js
In static mode the timing_report response is the shared cached JSON
object, so sorting its paths array in place reordered the cache and
broke the slack-histogram filter's _originalIndex tagging, selecting
the wrong overlay path. Sort copies instead, in both update() and
showPaths(), so the cache keeps its server-side ordering.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
…reflow

makeResizableHeaders now takes an optional widths array; when given
(e.g. widths saved from the previous render) it applies them directly
instead of resetting to auto layout and reading offsetWidth, avoiding
a forced reflow on every timing table re-render.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
The 5s CMake default can be exceeded when discovering gtest tests on
a loaded machine, causing spurious configure-time failures.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
@openroad-ci openroad-ci requested a review from a team as a code owner June 10, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant