Skip to content

Conversation

@sergeyteleshev
Copy link
Contributor

@sergeyteleshev sergeyteleshev force-pushed the 7772-cb-remove-tooltips-from-context-menu branch from 6dd1f10 to 285b6b7 Compare January 6, 2026 12:26

const title = translate(label);
const textRef = useRef<HTMLDivElement | null>(null);
const truncatedLabel = useTruncatedTooltip(textRef, label);
Copy link
Member

Choose a reason for hiding this comment

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

I think we dont need this, tooltips are just fine

Copy link
Member

Choose a reason for hiding this comment

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

I also think so, we don't expect to have long tooltips or labels in the menu items, where we expect them, we should truncate them at the declaration point

Copy link
Member

Choose a reason for hiding this comment

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

for example like here:

if (this.clipboardService.state === 'granted') {
const filters = supportedOperations
.filter(operation => !nullOperationsFilter(operation))
.map(operation => {
const val = this.clipboardService.clipboardValue || '';
const wrappedValue = wrapOperationArgument(operation.id, val);
const clippedValue = replaceMiddle(wrappedValue, ' ... ', 8, 30);
const label = `${columnLabel} ${operation.expression} ${clippedValue}`;
return new MenuBaseItem(
{ id: operation.id, icon: 'filter-clipboard', label },
{
onSelect: async () => {
const wrappedValue = wrapOperationArgument(operation.id, val);
await this.applyFilter(
model as unknown as IDatabaseDataModel<ResultSetDataSource>,
resultIndex,
key.column,
operation.id,
wrappedValue,
);
},
},
{ isDisabled: () => model.isLoading() },
);
});
result.push(...filters);
}


const title = translate(label);
const textRef = useRef<HTMLDivElement | null>(null);
const truncatedLabel = useTruncatedTooltip(textRef, label);
Copy link
Member

Choose a reason for hiding this comment

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

I also think so, we don't expect to have long tooltips or labels in the menu items, where we expect them, we should truncate them at the declaration point


const title = translate(label);
const textRef = useRef<HTMLDivElement | null>(null);
const truncatedLabel = useTruncatedTooltip(textRef, label);
Copy link
Member

Choose a reason for hiding this comment

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

for example like here:

if (this.clipboardService.state === 'granted') {
const filters = supportedOperations
.filter(operation => !nullOperationsFilter(operation))
.map(operation => {
const val = this.clipboardService.clipboardValue || '';
const wrappedValue = wrapOperationArgument(operation.id, val);
const clippedValue = replaceMiddle(wrappedValue, ' ... ', 8, 30);
const label = `${columnLabel} ${operation.expression} ${clippedValue}`;
return new MenuBaseItem(
{ id: operation.id, icon: 'filter-clipboard', label },
{
onSelect: async () => {
const wrappedValue = wrapOperationArgument(operation.id, val);
await this.applyFilter(
model as unknown as IDatabaseDataModel<ResultSetDataSource>,
resultIndex,
key.column,
operation.id,
wrappedValue,
);
},
},
{ isDisabled: () => model.isLoading() },
);
});
result.push(...filters);
}

Wroud
Wroud previously approved these changes Jan 8, 2026
devnaumov
devnaumov previously approved these changes Jan 8, 2026
@sergeyteleshev sergeyteleshev dismissed stale reviews from devnaumov and Wroud via e0e4162 January 8, 2026 15:28
let binding: string | undefined;
if (item.action.binding !== null) {
binding = getBindingLabel(item.action.binding.binding);
binding = getBindingLabels(item.action.binding.binding);
Copy link
Member

Choose a reason for hiding this comment

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

probably we don't want to change this, shortcuts might take a lot of space we can't display all of them in the menu, so it was intentionally to display first one

Comment on lines 194 to 195
const label = localizationService.translate('data_grid_table_filter_delete_for_column', undefined, { column: resultColumn?.name ?? '' });
const { clippedLabel, tooltip } = getMenuLabelClipped(label);
Copy link
Member

Choose a reason for hiding this comment

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

please clip only resultColumn?.name ?? '' not whole label

Comment on lines 264 to 275
const clippedValue = replaceMiddle(wrappedValue, ' ... ', 8, 30);
const fullLabel = `${columnLabel} ${operation.expression} ${wrappedValue}`;
const { clippedLabel, tooltip } = getMenuLabelClipped(fullLabel);

return new MenuBaseItem(
{
id: operation.id,
label: `${columnLabel} ${operation.expression} ${clippedValue}`,
label: clippedLabel,
Copy link
Member

Choose a reason for hiding this comment

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

you can revert this changes and use fullLabel as a tooltip

Comment on lines 327 to 328
const title = `${columnLabel} ${operation.expression}`;
const { clippedLabel, tooltip } = getMenuLabelClipped(title);
Copy link
Member

@Wroud Wroud Jan 12, 2026

Choose a reason for hiding this comment

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

only columnLabel should be clipped (replaceMiddle or getMenuLabelClipped)

Comment on lines 411 to 421
const clippedValue = replaceMiddle(wrappedValue, ' ... ', 8, 30);
const label = `${columnLabel} ${operation.expression} ${clippedValue}`;
const label = `${columnLabel} ${operation.expression} ${wrappedValue}`;
const { clippedLabel, tooltip } = getMenuLabelClipped(label);
Copy link
Member

Choose a reason for hiding this comment

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

please revert

Comment on lines 55 to 59
const nodeName = node?.name || '';
const fullLabel = this.localizationService.translate('plugin_navigation_tree_filters_configuration', undefined, { name: nodeName });
const isLongNodeName = nodeName?.length > 10;
const label = `${isLongNodeName ? fullLabel.replace(nodeName, nodeName.slice(0, 3) + '...') : fullLabel}...`;
const tooltip = isLongNodeName ? fullLabel : undefined;
Copy link
Member

@Wroud Wroud Jan 12, 2026

Choose a reason for hiding this comment

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

only nodeName should be clipped (replaceMiddle or getMenuLabelClipped)

});
},
...actions.map(action => {
const { clippedLabel, tooltip } = getMenuLabelClipped(action.label);
Copy link
Member

Choose a reason for hiding this comment

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

probably we don't need to clip this values, they should not be long

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants