Skip to content

Conversation

@DaryaVorontsova
Copy link
Contributor

@DaryaVorontsova DaryaVorontsova commented Oct 31, 2025

#1611

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
378 375 0 1 2
Test Changes Summary ⏭️2

⏭️ Skipped Tests (2)

  1. Scroll to row, get shareable link, navigate to URL and verify row is scrolled into view (tenant/diagnostics/tabs/queries.test.ts)
  2. Copy result button copies to clipboard (tenant/queryEditor/queryEditor.test.ts)

Bundle Size: ✅

Current: 47.08 MB | Main: 47.08 MB
Diff: +0.48 KB (0.00%)

✅ Bundle size unchanged.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Oct 31, 2025

Skipped: This PR does not contain any of your configured keywords: (greptile-review)

disabled={popoverDisabled}
>
{renderButton()}
<span>{renderButton()}</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need this span?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need the because the button can be disabled, and a disabled native does not receive pointer/hover/focus events in the browser. The popover wont'be shown on disabled buttons, but we need it (tooltip for followers for example). So if we wrap the button in a non-disabled element (the ), we can attach the popover to the wrapper and keep the button disabled.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice work! Let's add a comment so nobody remove this wrapper "to simplify the code".


function TabletActions(tablet: TTabletStateInfo) {
const isDisabledRestart = tablet.State === ETabletState.Stopped;
const isFollower = tablet.Leader === false;
Copy link
Contributor

Choose a reason for hiding this comment

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

This logic is used twice in this file. Lets make a helper not to duplicate code.

isUserAllowedToMakeChanges
? i18n('dialog.kill-header')
: i18n('controls.kill-not-allowed')
isFollower
Copy link
Contributor

Choose a reason for hiding this comment

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

let's now use multi-level ternaries, it's hard to read

@DaryaVorontsova DaryaVorontsova linked an issue Oct 31, 2025 that may be closed by this pull request
@DaryaVorontsova DaryaVorontsova added this pull request to the merge queue Oct 31, 2025
Merged via the queue into main with commit 9ca4400 Oct 31, 2025
7 checks passed
@DaryaVorontsova DaryaVorontsova deleted the fix/restart-btn-tooltip branch October 31, 2025 14:48
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.

Disable 'Restart tablet' button on followers

3 participants