Skip to content

Commit 9143140

Browse files
committed
fix: Display original function name instead of module-prefixed name in table
The function table browser was displaying the generated unique name (with module prefix like 'processors_max_projection') in the Name column, which was redundant since there's already a separate Module column. Now displays just the original function name (e.g., 'max_projection') while keeping the module prefix in the generated name for internal use and searching.
1 parent abcaeae commit 9143140

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

src/pyqt_reactive/widgets/shared/function_table_browser.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,21 @@ def extract_row_data(self, item: Dict[str, Any]) -> List[str]:
4545
# Get contract name
4646
contract = item.get('contract')
4747
contract_name = contract.name if hasattr(contract, 'name') else str(contract) if contract else "unknown"
48-
48+
4949
# Format tags
5050
tags = item.get('tags', [])
5151
tags_str = ", ".join(tags) if tags else ""
52-
52+
5353
# Truncate description
5454
doc = item.get('doc', '')
5555
description = doc[:150] + "..." if len(doc) > 150 else doc
56-
56+
57+
# Display original_name (just the function name) instead of name (which includes module prefix)
58+
# The module is shown separately in the Module column
59+
display_name = item.get('original_name', '') or item.get('name', 'unknown')
60+
5761
return [
58-
item.get('name', 'unknown'),
62+
display_name,
5963
item.get('module', 'unknown'),
6064
item.get('backend', 'unknown').title(),
6165
item.get('registry', 'unknown').title(),
@@ -68,11 +72,16 @@ def get_searchable_text(self, item: Dict[str, Any]) -> str:
6872
"""Return searchable text for function metadata."""
6973
contract = item.get('contract')
7074
contract_name = contract.name if hasattr(contract, 'name') else str(contract) if contract else ""
71-
75+
7276
tags = item.get('tags', [])
73-
77+
78+
# Include both original_name and name for searching
79+
original_name = item.get('original_name', '')
80+
name = item.get('name', '')
81+
7482
return " ".join([
75-
item.get('name', ''),
83+
original_name,
84+
name,
7685
item.get('module', ''),
7786
contract_name,
7887
" ".join(tags),

0 commit comments

Comments
 (0)