Skip to content

Commit 1d99c59

Browse files
committed
fix(labels): correct false "omitted rows" message in result labels
Fixes #281
1 parent cccfa1d commit 1d99c59

File tree

4 files changed

+30
-4
lines changed

4 files changed

+30
-4
lines changed

datalab/adapters_metadata/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def resultadapter_to_html(
365365
num_cols = max_display_cols
366366

367367
# Calculate number of cells (rows × columns)
368-
num_rows = len(adapter.result)
368+
num_rows = len(df)
369369
num_cells = num_rows * num_cols
370370

371371
# Check if truncation is needed BEFORE calling to_html()

datalab/locale/fr/LC_MESSAGES/datalab.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: datalab\n"
88
"Report-Msgid-Bugs-To: [email protected]\n"
9-
"POT-Creation-Date: 2025-12-04 17:48+0100\n"
9+
"POT-Creation-Date: 2025-12-13 16:32+0100\n"
1010
"PO-Revision-Date: 2025-05-22 15:46+0200\n"
1111
"Last-Translator: Christophe Debonnel <[email protected]>\n"
1212
"Language: fr\n"
@@ -30,7 +30,7 @@ msgstr "%d colonnes supplémentaires"
3030

3131
#, python-format
3232
msgid "%s omitted"
33-
msgstr "%s non affichés"
33+
msgstr "%s non affichées"
3434

3535
#, python-format
3636
msgid "Only %d out of %d shapes are displayed"

doc/locale/fr/LC_MESSAGES/release_notes/release_1.00.po

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: DataLab \n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2025-12-13 14:17+0100\n"
10+
"POT-Creation-Date: 2025-12-13 16:32+0100\n"
1111
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1212
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1313
"Language: fr\n"
@@ -27,6 +27,24 @@ msgstr ""
2727
msgid "🛠️ Bug Fixes since version 1.0.2"
2828
msgstr "🛠️ Correctifs depuis la version 1.0.2"
2929

30+
msgid "**Result labels - False \"omitted\" message for single-row results:**"
31+
msgstr "**Étiquettes de résultats - Faux message \"omis\" pour les résultats à une seule ligne :**"
32+
33+
msgid "Fixed result labels (e.g., pulse features) incorrectly showing \"X more rows omitted\" message when displaying single-row results with no actual truncation"
34+
msgstr "Correction des étiquettes de résultats (par exemple, les caractéristiques des impulsions) affichant incorrectement le message \"X lignes supplémentaires omises\" lors de l'affichage de résultats à une seule ligne sans troncature réelle"
35+
36+
msgid "The bug occurred because `len(adapter.result)` was used to get the row count, but this actually returns the number of column headers, not data rows"
37+
msgstr "L'anomalie s'est produite parce que `len(adapter.result)` était utilisé pour obtenir le nombre de lignes, mais cela renvoie en fait le nombre d'en-têtes de colonnes, pas les lignes de données"
38+
39+
msgid "For pulse features with 13 columns, this caused the label to think there were 13 rows when only 1 row existed, leading to a false \"12 more rows omitted\" message"
40+
msgstr "Pour les caractéristiques des impulsions avec 13 colonnes, cela a amené l'étiquette à penser qu'il y avait 13 lignes alors qu'il n'y en avait qu'une seule, ce qui a conduit à un faux message \"12 lignes supplémentaires omises\""
41+
42+
msgid "The fix ensures accurate row counting using `len(df)` instead, preventing false truncation notices"
43+
msgstr "Le correctif garantit un comptage précis des lignes en utilisant `len(df)` à la place, évitant ainsi les fausses notifications de troncature"
44+
45+
msgid "This closes [Issue #281](https://github.com/datalab-platform/datalab/issues/281) - Result Labels False \"Omitted\" Message"
46+
msgstr "Ceci clôture [Issue #281](https://github.com/datalab-platform/datalab/issues/281) - Faux message \"omis\" des étiquettes de résultats"
47+
3048
msgid "**Signal view - XRangeSelection items persist after removing signals:**"
3149
msgstr "**Vue des signaux - Les éléments XRangeSelection persistent après la suppression des signaux :**"
3250

doc/release_notes/release_1.00.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44

55
### 🛠️ Bug Fixes since version 1.0.2 ###
66

7+
**Result labels - False "omitted" message for single-row results:**
8+
9+
* Fixed result labels (e.g., pulse features) incorrectly showing "X more rows omitted" message when displaying single-row results with no actual truncation
10+
* The bug occurred because `len(adapter.result)` was used to get the row count, but this actually returns the number of column headers, not data rows
11+
* For pulse features with 13 columns, this caused the label to think there were 13 rows when only 1 row existed, leading to a false "12 more rows omitted" message
12+
* The fix ensures accurate row counting using `len(df)` instead, preventing false truncation notices
13+
* This closes [Issue #281](https://github.com/datalab-platform/datalab/issues/281) - Result Labels False "Omitted" Message
14+
715
**Signal view - XRangeSelection items persist after removing signals:**
816

917
* Fixed XRangeSelection and DataInfoLabel items (created by PlotPy's curve statistics tools) remaining visible on the plot after removing all signals

0 commit comments

Comments
 (0)