Skip to content

feat(web): hide interactive-only index controls in timeline renders - #1243

Open
Evin009 wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
Evin009:feat/render-timelines-index-pane
Open

Evin009 wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
Evin009:feat/render-timelines-index-pane

Conversation

@Evin009

@Evin009 Evin009 commented Nov 5, 2026 •

Copy link
Copy Markdown

Part of #1193 (item 4)

Summary

The static /render/timeline page showed the collapse toggle (chevron) and context menu (more_vert) buttons in every index row. They cannot be used in a static screenshot and take up horizontal space in the index pane.

This change:

  • Adds a showControls input to TimelineIndexComponent that hides the collapse toggle and context menu buttons when false.
  • Adds a showIndexControls input to TimelineFrameComponent and passes it to both the scrolling and sticky index panes. It defaults to true, so the main inspector is unchanged.
  • Sets showIndexControls to false on /render/timeline.

Index pane auto-fit (the other half of item 4) is already covered by the timeline scene stack in #1231, so it is not included here.

Testing

  • Added a timeline-frame.component.spec.ts case checking that menu buttons are hidden when showIndexControls is false.
  • Full frontend test suite and lint pass.
  • Manually verified on /render/timeline with a synthetic audit log: 21 menu buttons and 15 collapse toggles before, 0 after.
… timeline renders

The static /render/timeline page used a fixed 300px index pane, so long
resource names were truncated with an ellipsis, and it showed the
collapse toggle and context menu buttons that cannot be used in a
screenshot.

- Size the index pane to fit the longest rendered label, estimated with
  canvas text measurement, between 300px and half of the render width.
- Add showIndexControls and indexPaneWidth inputs to the timeline frame,
  and a showControls input to the timeline index.
- Hide the collapse toggle and context menu buttons in static renders.

Refs GoogleCloudPlatform#1193 (item 4)

@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 dynamic width calculation for the timeline index pane based on the longest rendered label, and adds a showIndexControls option to hide interactive controls in static renders. The feedback suggests adding safety guards for non-browser environments (such as SSR or Node-based tests) when accessing global browser APIs like document and window.getComputedStyle to prevent potential runtime errors.

…rm#1231

Index pane auto-fit is already implemented in the timeline scene stack
(GoogleCloudPlatform#1231), so keep this change focused on hiding the interactive-only
collapse toggle and context menu buttons in static renders.
@Evin009 Evin009 changed the title feat(web): auto-fit index pane width and hide interactive controls in timeline renders Nov 5, 2026
@Evin009

Evin009 commented Nov 5, 2026

Copy link
Copy Markdown
Author

I noticed #1231 already auto-fits the index pane width, so I removed that part to avoid duplicating it. This PR now only hides the collapse toggle and context menu buttons on /render/timeline (the other half of item 4 in #1193). The new showIndexControls frame input defaults to true, so the main inspector is unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant