Skip to content

WidgetImprovements - #84

Merged
elwills merged 2 commits into
developmentfrom
WidgetImprovements
Sep 25, 2026
Merged

elwills merged 2 commits into
developmentfrom
WidgetImprovements

Conversation

@prestoncraw

@prestoncraw prestoncraw commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Improves how time units and timestamps are shown in the plot settings and tooltip widgets, and centralizes the "auto" time unit logic that was duplicated across the app.

Changes

Time unit selector

  • When the time unit is set to auto, the dropdown now shows the unit auto currently resolves to (e.g. seconds (auto)), consistent with the voltage/current unit selectors.

Tooltip and Tooltip w/ Delta

  • The time unit is shown on its own line under the truncated time value, using the same unit as the x-axis label.
  • The full timestamp (YYYY-MM-DD HH:mm:ss.SSS) is shown below it, so the exact date/time of the point is visible. It is formatted with .utc() like the other full timestamps in the app, so it shows the meter's recorded time rather than shifting to the viewer's time zone.
  • Tooltip w/ Delta shows both of these for each of its two times.

Refactor

  • The auto ms/s rule (ms while less than 100 ms is visible, otherwise s) was repeated in several places. It now lives in getAutoTimeUnit / resolveTimeUnit in Utilities.tsx and is used by the x-axis ticks, x-axis label, formatTimeDelta, and the time unit selector. Output is unchanged for every valid time unit setting.
  • Removed unused time variables from AccumulatedPoints.

- Time unit selector shows the unit auto resolves to (e.g. "seconds (auto)"), matching the axis unit selectors
- Tooltip and Tooltip w/ Delta show the time unit under the truncated value and the full timestamp below it
- Centralize the auto ms/s rule in getAutoTimeUnit/resolveTimeUnit and use it in the x-axis ticks, axis label, time deltas, and selector
- Remove unused time variables from AccumulatedPoints

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

Copilot review overview

🔵 Needs a closer look

One or more issues must be addressed before approval.

Review effort: Lite
Findings: None

What changed in this PR

Improves time-unit display and timestamp visibility across plot settings and tooltip widgets, while centralizing automatic time-unit resolution.

Changes:

  • Adds resolved auto-unit labels to selectors, axes, and tooltips.
  • Adds UTC full timestamps to tooltips.
  • Refactors shared time-unit formatting logic and removes unused code.
File Description
src/​OpenSEE/​wwwroot/​Scripts/​TSX/​Widgets/​TooltipWithDelta.tsx Updated as part of this pull request.
src/​OpenSEE/​wwwroot/​Scripts/​TSX/​Widgets/​Tooltip.tsx Updated as part of this pull request.
src/​OpenSEE/​wwwroot/​Scripts/​TSX/​Widgets/​PlotSettings/​TimeUnitSelector.tsx Updated as part of this pull request.
src/​OpenSEE/​wwwroot/​Scripts/​TSX/​Widgets/​PlotSettings/​SettingWindow.tsx Updated as part of this pull request.
src/​OpenSEE/​wwwroot/​Scripts/​TSX/​Widgets/​AccumulatedPoints.tsx Updated as part of this pull request.
src/​OpenSEE/​wwwroot/​Scripts/​TSX/​Graphs/​Utils/​Utilities.tsx Updated as part of this pull request.
src/​OpenSEE/​wwwroot/​Scripts/​TSX/​Graphs/​LineChart/​Renderers/​XAxes.ts Updated as part of this pull request.
src/​OpenSEE/​package-lock.json Updated as part of this pull request.
Files not reviewed (1)
  • src/OpenSEE/package-lock.json: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@elwills
elwills merged commit 9a388f7 into development Sep 25, 2026
3 checks passed
@elwills
elwills deleted the WidgetImprovements branch September 25, 2026 20:10
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.

3 participants