Skip to content

fix(table-chart): fix "Search by" control visibility and improve table controls layout#36073

Merged
rusackas merged 9 commits into
apache:masterfrom
innovark37:innovark/fix/fix-table-search
Jul 2, 2026
Merged

fix(table-chart): fix "Search by" control visibility and improve table controls layout#36073
rusackas merged 9 commits into
apache:masterfrom
innovark37:innovark/fix/fix-table-search

Conversation

@innovark37

@innovark37 innovark37 commented Nov 11, 2025

Copy link
Copy Markdown
Contributor

User description

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

CodeAnt-AI Description

Fix table search controls visibility and standardize table controls layout

What Changed

  • The "Search by" dropdown now appears only when server-side pagination is enabled and the search box is shown; it no longer appears when only server pagination is enabled.
  • Labels for controls (Search, Search by, Entries per page) are moved above their inputs and rendered consistently; inputs and dropdowns use a compact visual size.
  • Page-size and search dropdowns were widened for readability and given consistent small sizing; the global search input is also compact and labeled for screen readers.
  • UI text strings used in controls were wrapped for localization and Russian translation entries were updated.

Impact

✅ Clearer search controls
✅ Fewer misleading options shown
✅ Consistent table control spacing and sizing

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@bito-code-review

bito-code-review Bot commented Nov 11, 2025

Copy link
Copy Markdown
Contributor

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 evan@preset.io.

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

@korbit-ai korbit-ai 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.

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

codecov Bot commented Nov 11, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.51%. Comparing base (6c57919) to head (df0e1f3).

Files with missing lines Patch % Lines
...ins/plugin-chart-table/src/DataTable/DataTable.tsx 62.50% 3 Missing ⚠️
.../src/DataTable/components/SearchSelectDropdown.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #36073      +/-   ##
==========================================
- Coverage   64.51%   64.51%   -0.01%     
==========================================
  Files        2673     2673              
  Lines      147639   147640       +1     
  Branches    34093    34093              
==========================================
- Hits        95252    95251       -1     
- Misses      50655    50657       +2     
  Partials     1732     1732              
Flag Coverage Δ
hive 39.06% <ø> (ø)
javascript 69.27% <50.00%> (-0.01%) ⬇️
mysql 57.68% <ø> (ø)
postgres 57.74% <ø> (ø)
presto 40.61% <ø> (ø)
python 59.15% <ø> (ø)
sqlite 57.33% <ø> (ø)
unit 100.00% <ø> (ø)

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

☔ View full report in Codecov by Harness.
📢 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.

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.

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}
      />

@SBIN2010 SBIN2010 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.

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

Comment thread superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx
@rusackas

Copy link
Copy Markdown
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!

@codeant-ai-for-open-source

Copy link
Copy Markdown
Contributor

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai-for-open-source codeant-ai-for-open-source Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Dec 23, 2025
@codeant-ai-for-open-source

Copy link
Copy Markdown
Contributor

Nitpicks 🔍

🔒 No security issues identified
⚡ Recommended areas for review

  • Accessibility
    The new visible "Search" label is rendered as plain text and is not programmatically associated with the input. Screen readers and assistive tech won't associate the label with the input control. Also the component doesn't forward the id prop into the input, so there is no straightforward way to associate a label with the input from parent code.

  • Accessibility Concern
    The visible "Search" label in SearchInput is not programmatically associated with the input element. Although the input has an aria-label, linking a label with htmlFor to the input id improves accessibility for screen readers and keyboard users. Consider ensuring visible labels are semantically associated with inputs or use aria-labelledby.

  • Accessibility
    The added "Search by" control (label + SearchSelectDropdown) is not associated with a form label via htmlFor/id or ARIA attributes. That can harm keyboard navigation and screen reader usability. Verify SearchSelectDropdown accepts an id/aria-label and that a proper label element or aria attributes are added.

  • i18n completeness
    The PR adds translation for the static "Search" label but the input placeholder ("${count} records...") remains untranslated. That placeholder includes user-visible text and a numeric count and should be localized (and ideally handle pluralization) for full i18n coverage.

  • Default-selection behavior
    The component forces a fallback empty-string value when no value and no searchOptions exist. Passing '' as the Select value can produce an unexpected blank selection or prevent placeholder rendering. Prefer using undefined (or explicitly computed selectedValue) so the Select can render placeholder or remain uncontrolled when there are no options.

Comment thread superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx Outdated
Comment thread superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx
@codeant-ai-for-open-source

Copy link
Copy Markdown
Contributor

CodeAnt AI finished reviewing your PR.

@bito-code-review

bito-code-review Bot commented Dec 23, 2025

Copy link
Copy Markdown
Contributor

Code Review Agent Run #e3dd6f

Actionable Suggestions - 0
Review Details
  • Files reviewed - 5 · Commit Range: 2a4edff..54398a6
    • 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 Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@rusackas

Copy link
Copy Markdown
Member

Looks like a merge conflict and some bot suggestions need addressing, if you don't mind :)

@innovark37
innovark37 requested a review from SBIN2010 February 27, 2026 12:52

@bito-code-review bito-code-review 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 Agent Run #986dc8

Actionable Suggestions - 1
  • superset-frontend/plugins/plugin-chart-table/src/DataTable/components/SearchSelectDropdown.tsx - 1
Review Details
  • Files reviewed - 2 · Commit Range: 54398a6..e89f2d3
    • superset-frontend/plugins/plugin-chart-table/src/DataTable/components/SearchSelectDropdown.tsx
    • superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx
  • 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 Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@rusackas

Copy link
Copy Markdown
Member

@innovark37 the logic fix here looks good, and just needs a rebase (it's conflicting) and the open thread comments from @SBIN2010 addressed. Ping us when it's sorted, or say the word if you want help with the rebase.

@rusackas
rusackas force-pushed the innovark/fix/fix-table-search branch from 78ac913 to 0d51149 Compare June 22, 2026 18:14
@rusackas
rusackas requested review from rusackas and sfirke as code owners June 22, 2026 18:14
@pull-request-size pull-request-size Bot added size/M and removed size/L labels Jun 22, 2026

@sfirke sfirke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving the translations piece

Comment thread superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx Outdated
@bito-code-review

bito-code-review Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #b6ae32

Actionable Suggestions - 0
Additional Suggestions - 1
  • superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx - 1
    • Inconsistent import path · Line 19-19
      Line 19 imports `SupersetTheme` from `@apache-superset/core` while line 20 imports `css` from `@apache-superset/core/ui`. The same file SearchSelectDropdown.tsx in the same plugin correctly imports both from `@apache-superset/core/ui`. This inconsistency creates maintenance confusion.
      Code suggestion
      --- a/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx
      +++ b/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx
       @@ -17,8 +17,7 @@
         * under the License.
         */
      -import { SupersetTheme } from '@apache-superset/core';
      -import { css } from '@apache-superset/core/ui';
      +import { css, SupersetTheme } from '@apache-superset/core/ui';
         /* eslint-disable import/no-extraneous-dependencies */
         import {
           useCallback,
Filtered by Review Rules

Bito filtered these suggestions based on rules created automatically for your feedback. Manage rules.

  • superset-frontend/plugins/plugin-chart-table/src/DataTable/components/SearchSelectDropdown.tsx - 1
  • superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx - 1
Review Details
  • Files reviewed - 4 · Commit Range: 13a48d3..0d51149
    • superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.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 Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@rusackas

Copy link
Copy Markdown
Member

Thanks @innovark37, the visibility logic itself looks right. But the css/SupersetTheme imports in DataTable.tsx and SearchSelectDropdown.tsx point at @apache-superset/core/ui, and that package only exports a ./theme subpath, not ./ui, so the build can't resolve it (that's what's reddening lint/validate/storybook here). The original styled import was from @apache-superset/core/theme. Mind switching back to that entrypoint?

Also looks like @SBIN2010's note about dropping the record-count placeholder is still open... worth settling that before we re-review. Thanks!

@innovark37

Copy link
Copy Markdown
Contributor Author

This PR is ready for review.

The remaining test failures in SavedQueryList.test.tsx and TablePreview.test.tsx appear unrelated: this PR only touches table chart/DataTable files and Russian translations, while those tests fail due to existing accessibility query mismatches.

@bito-code-review

bito-code-review Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #db0051

Actionable Suggestions - 0
Review Details
  • Files reviewed - 5 · Commit Range: 0d51149..48cf610
    • superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.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
    • superset-frontend/plugins/plugin-chart-table/test/TableChart.test.tsx
  • 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 Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@SBIN2010 SBIN2010 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.

LGTM! Thank you for your contribution.

@rusackas
rusackas merged commit b3197c9 into apache:master Jul 2, 2026
66 checks passed
@innovark37
innovark37 deleted the innovark/fix/fix-table-search branch July 2, 2026 05:55
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 size:M This PR changes 30-99 lines, ignoring generated files viz:charts:table Related to the Table chart

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants