sfirke opened a new issue, #45494:
URL: https://github.com/apache/superset/issues/45494

   ### Bug description
   
   This is me Sam, a human, noting that Claude wrote most of the below but I 
read it and am hand-posting it in agreement.
   
   In 6.1.0, when a Table chart has "Search box" enabled, the search input's 
placeholder shows how many records are being searched, e.g. `141 records...`. 
In 7.0.0rc2 the placeholder is the fixed text `Search records`, so there's no 
longer any record count anywhere near the search box.
   
   The count is useful at a glance: it tells a dashboard viewer how many rows 
the table holds without paging through it or adding a separate Big Number 
chart. It's also the number you compare against after typing a search.
   
   **Where it changed:** #36073 ("fix(table-chart): fix 'Search by' control 
visibility and improve table controls layout") changed `SearchInput` in 
`superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx`:
   
   ```diff
   -        aria-label={t('Search %s records', count)}
   -        placeholder={tn('%s record', '%s records...', count, count)}
   +        aria-label={t('Search records')}
   +        placeholder={t('Search records')}
   ```
   
   The PR's main goals were the "Search by" visibility fix and moving the 
control labels above their inputs. Neither depends on removing the count. In 
review, @SBIN2010 asked to keep the count placeholder, and the PR author 
preferred placeholder text that describes the action instead. That's a fair 
point, but now that #36073 puts a "Search" label above the input, the 
placeholder doesn't need to describe the action.
   
   **This has happened once before.** The count was lost by accident in 6.0.0 
(#34299), reported in #35026, and restored in #35064 for 6.1.0. So users have 
already noticed and asked for it once.
   
   **It's also inconsistent now.** `count` is still passed to `SearchInput` 
through `SearchInputProps`, just no longer read. `DefaultSearchInput` in 
`DataTable/components/GlobalFilter.tsx` still renders `tn('%s record...', '%s 
records...', count, count)`. So the fallback input shows the count and the 
table chart's own input doesn't.
   
   **How to reproduce**
   
   1. Create a Table chart (any dataset; e.g. 141 rows).
   2. Under Customize, enable "Search box".
   3. Look at the search input above the table.
   
   **Expected behavior**
   
   The placeholder shows the record count, as in 6.1.0 (`141 records...`), and 
the aria-label reads `Search 141 records`.
   
   **Proposed fix**
   
   Restore the 6.1.0 strings in `SearchInput` in `TableChart.tsx` and re-import 
`tn`, while keeping the rest of #36073's layout changes:
   
   ```tsx
   aria-label={t('Search %s records', count)}
   placeholder={tn('%s record...', '%s records...', count, count)}
   ```
   
   (Using `%s record...` for the singular also makes it match 
`DefaultSearchInput`; 6.1.0 left out the ellipsis.) The Russian entry #36073 
added for `Search records` in 
`superset/translations/ru/LC_MESSAGES/messages.po` would need to be updated to 
match.
   
   ### Screenshots/recordings
   
   7.0.0:
   
   <img width="302" height="86" alt="Image" 
src="https://github.com/user-attachments/assets/7a4d3d4b-6e47-4714-abfb-62a537753df9";
 />
   
   
   Same chart in 6.1.0:
   
   <img width="362" height="102" alt="Image" 
src="https://github.com/user-attachments/assets/f89c6a7f-2907-4bda-848c-48519eb6c788";
 />
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   Not applicable
   
   ### Node version
   
   Not applicable
   
   ### Browser
   
   Not applicable
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [ ] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [x] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to