Skip to content

Conversation

@innovark37
Copy link
Contributor

SUMMARY

This PR addresses two main issues with the Table chart controls:

  1. Layout Improvement: Enhances the visual layout of the "Entries per page", "Search by", and "Search" controls by moving labels above inputs and adjusting font sizes for better consistency with the table content.

  2. Logic Fix: Corrects the display logic for the "Search by" control, which was previously shown incorrectly.
    Now shows the control only when both "Server pagination" AND "Search box" options are enabled. Previously it appeared with only "Server Pagination" enabled, which was functionally incorrect.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE
{6CD86EDE-DEB5-43A6-A6E9-8DCAE646EF91}

{732BE048-39F7-4C1A-BE23-32BB03912220}

Before fix

AFTER
{CB6E1527-7AF3-4531-BA99-74EB3E399D37}

{777EACB7-9D6E-451C-A6BF-39E3E980C67D}

After fix

TESTING INSTRUCTIONS

  1. Create or open existing Table Chart
  2. Enable only "Server pagination" option -> "Search by" should NOT appear
  3. Enable only "Search box" - "Search by" should NOT appear
  4. Enable both "Server pagination" AND "Search box" - "Search by" SHOULD appear
  5. Add the chart to a dashboard
  6. Verify that all control labels appear above their inputs
  7. Confirm font sizes match the table content

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Nov 11, 2025

Code Review Agent Run #1c82ec

Actionable Suggestions - 0
Review Details
  • Files reviewed - 5 · Commit Range: 434fff7..2a4edff
    • superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx
    • superset-frontend/plugins/plugin-chart-table/src/DataTable/components/GlobalFilter.tsx
    • superset-frontend/plugins/plugin-chart-table/src/DataTable/components/SearchSelectDropdown.tsx
    • superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx
    • superset/translations/ru/LC_MESSAGES/messages.po
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@github-actions github-actions bot added i18n Namespace | Anything related to localization i18n:russian Translation related to Russian language plugins labels Nov 11, 2025
@dosubot dosubot bot added change:frontend Requires changing the frontend viz:charts:table Related to the Table chart labels Nov 11, 2025
Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

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

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Status
Functionality Missing right margin in CSS refactor ▹ view
Files scanned
File Path Reviewed
superset-frontend/plugins/plugin-chart-table/src/DataTable/components/SearchSelectDropdown.tsx
superset-frontend/plugins/plugin-chart-table/src/DataTable/components/GlobalFilter.tsx
superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx
superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

@codecov
Copy link

codecov bot commented Nov 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.14%. Comparing base (08c1d03) to head (6cd3003).

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #36073       +/-   ##
===========================================
+ Coverage        0   68.14%   +68.14%     
===========================================
  Files           0      632      +632     
  Lines           0    46450    +46450     
  Branches        0     5035     +5035     
===========================================
+ Hits            0    31652    +31652     
- Misses          0    13536    +13536     
- Partials        0     1262     +1262     
Flag Coverage Δ
hive 43.79% <ø> (?)
mysql 67.25% <ø> (?)
postgres 67.30% <ø> (?)
presto 47.39% <ø> (?)
python 68.10% <ø> (?)
sqlite 66.93% <ø> (?)
unit 100.00% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the "Search by" control visibility logic in the Table chart and improves the layout of table controls. The key change corrects when the "Search by" dropdown appears - it now only shows when both "Server pagination" AND "Search box" options are enabled, rather than appearing with just "Server pagination" alone. Additionally, the PR enhances the visual consistency by moving control labels above their inputs and standardizing font sizes.

  • Corrects "Search by" control visibility to require both server pagination and search box to be enabled
  • Refactors control layouts to use vertical spacing with labels positioned above inputs
  • Standardizes control sizing and font sizes for better visual consistency with table content

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
superset/translations/ru/LC_MESSAGES/messages.po Updates Russian translations: removes plural forms for "%s record", adds translations for "Entries per page" and "Search by"
superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx Removes tn import, updates SearchInput and SelectPageSize to use vertical layout, changes label text and removes placeholder
superset-frontend/plugins/plugin-chart-table/src/DataTable/components/SearchSelectDropdown.tsx Replaces styled component with inline CSS using theme tokens, adds size prop for consistency
superset-frontend/plugins/plugin-chart-table/src/DataTable/components/GlobalFilter.tsx Adds translation function import and wraps "Search" text with t() for internationalization
superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx Implements fixed visibility logic for "Search by" control (requires both serverPagination and searchInput), adds vertical layout with label, and applies font size styling
Comments suppressed due to low confidence (1)

superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx:228

  • The placeholder attribute was removed from the Input component when the tn function call was removed. This means users will see an empty input field with no hint about what to search for. Consider adding a placeholder using the t() function, for example: placeholder={t('Search...')} or similar text to provide a better user experience.
      <Input
        aria-label={t('Search %s records', count)}
        value={value}
        size="small"
        onChange={onChange}
        onBlur={onBlur}
        ref={inputRef}
      />

Copy link
Contributor

@SBIN2010 SBIN2010 left a comment

Choose a reason for hiding this comment

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

I left a couple of comments. But overall, it looks pretty good.

{t('Search')}
<Input
aria-label={t('Search %s records', count)}
placeholder={tn('%s record', '%s records...', count, count)}
Copy link
Contributor

Choose a reason for hiding this comment

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

The placeholder attribute has been removed from the Input component. This means users will see an empty input field with no indication of how many records are in the table. For a better user experience, I recommend leaving the placeholder.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see your concern but I'm not sure how showing the total record count in the search field improves the user experience.

That number doesn't help a user with their search. Whether there are 2 records or 2 million, they can still type a query and get zero results. The placeholder should help users search, and the total count doesn't do that.

@rusackas
Copy link
Member

Looks like a couple failing tests, a conflict resolution needed, and a couple open comments on the thread, if you don't mind helping to get this through @innovark37. Thanks in advance!

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

Labels

change:frontend Requires changing the frontend i18n:russian Translation related to Russian language i18n Namespace | Anything related to localization plugins size/L viz:charts:table Related to the Table chart

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants