Skip to content

web: add Show DBU toggle to View menu#10618

Merged
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:web-show-dbu
Jun 9, 2026
Merged

web: add Show DBU toggle to View menu#10618
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:web-show-dbu

Conversation

@maliberty

Copy link
Copy Markdown
Member

Summary

  • Add a "Show DBU" toggle to the web UI's View menu, mirroring the Qt GUI's Options > Show DBU. When enabled, coordinates and dimensions display as raw database units instead of microns.
  • Setting defaults to off (microns), persists between sessions via cookie, and affects: coordinate bar, scale bar, ruler labels/properties, inspector BBox/Point properties, and hierarchy browser area column.
  • Server-side ScopedDbuFormat RAII helper temporarily sets Descriptor::Property::convert_dbu to a micron-aware formatter for each inspect request, controlled by a use_dbu flag from the client.

@maliberty maliberty self-assigned this Jun 8, 2026
@github-actions github-actions Bot added the size/M label Jun 8, 2026

@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 support for displaying Database Units (DBU) instead of microns across the web interface, including the coordinate bar, scale bar, rulers, hierarchy browser, and inspector panel. It adds a 'Show DBU' toggle in the menu bar and implements a C++ RAII helper ScopedDbuFormat to handle DBU-to-micron formatting on the server side. Feedback on the changes highlights a potential issue where the scale bar could display '0' when zoomed in extremely close, and suggests capping the minimum DBU value to 1.

Comment thread src/web/src/main.js
@maliberty

Copy link
Copy Markdown
Member Author

@codex review

Add a "Show DBU" option in the web UI's View menu, mirroring the
Qt GUI's Options > Show DBU toggle. When enabled, coordinates and
dimensions display as raw database units instead of microns.

The setting defaults to off (microns) matching the Qt GUI and
persists between sessions via the or_show_dbu cookie.

Affected display areas:
- Coordinate bar (mouse position)
- Scale bar (zoom distance reference)
- Ruler labels and inspector properties
- Inspector BBox/Point properties for all selected objects
- Hierarchy browser area column

Server side: add ScopedDbuFormat RAII helper that temporarily sets
Descriptor::Property::convert_dbu to a micron-aware formatter
(matching the Qt GUI's convertDBUToString) for the scope of each
inspect request. The client passes use_dbu in requests so the
server formats property values accordingly.

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

@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: 3f4caa6160

ℹ️ 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/request_handler.cpp
Comment thread src/web/src/main.js Outdated
@maliberty maliberty marked this pull request as ready for review June 9, 2026 00:07
@maliberty maliberty requested a review from a team as a code owner June 9, 2026 00:07
@maliberty maliberty requested a review from gadfort June 9, 2026 00:07
@maliberty maliberty merged commit 8df74aa into The-OpenROAD-Project:master Jun 9, 2026
15 of 16 checks passed
@maliberty maliberty deleted the web-show-dbu branch June 9, 2026 14:00
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.

2 participants