mirror of
https://github.com/enso-org/enso.git
synced 2024-12-20 11:01:35 +03:00
Context menu improvements (#11755)
Context menu improvements: - Activate component context menu only for clicks on component widget area (fixes #11745). - In a table-editor widget, if AG Grid opens a context menu, don't open the component menu. - Enable the AG Grid context menu on OS X.
This commit is contained in:
parent
bd34bf537c
commit
88fdfb452a
@ -45,6 +45,8 @@
|
|||||||
- [Pasting tabular data now creates Table.input expressions][11695].
|
- [Pasting tabular data now creates Table.input expressions][11695].
|
||||||
- [No halo is displayed around components when hovering][11715].
|
- [No halo is displayed around components when hovering][11715].
|
||||||
- [The hover area of the component output port extended twice its size][11715].
|
- [The hover area of the component output port extended twice its size][11715].
|
||||||
|
- [In the table visualization and table widget, the table context menu can now
|
||||||
|
be opened on OS X][11755].
|
||||||
- [Fix some UI elements drawing on top of visualization toolbar dropdown
|
- [Fix some UI elements drawing on top of visualization toolbar dropdown
|
||||||
menus][11768].
|
menus][11768].
|
||||||
|
|
||||||
|
@ -499,7 +499,6 @@ const showMenuAt = ref<{ x: number; y: number }>()
|
|||||||
@pointerenter="(nodeHovered = true), updateNodeHover($event)"
|
@pointerenter="(nodeHovered = true), updateNodeHover($event)"
|
||||||
@pointerleave="(nodeHovered = false), updateNodeHover(undefined)"
|
@pointerleave="(nodeHovered = false), updateNodeHover(undefined)"
|
||||||
@pointermove="updateNodeHover"
|
@pointermove="updateNodeHover"
|
||||||
@contextmenu.stop.prevent="ensureSelected(), (showMenuAt = $event)"
|
|
||||||
>
|
>
|
||||||
<div class="binding" v-text="node.pattern?.code()" />
|
<div class="binding" v-text="node.pattern?.code()" />
|
||||||
<button
|
<button
|
||||||
@ -552,6 +551,7 @@ const showMenuAt = ref<{ x: number; y: number }>()
|
|||||||
:style="contentNodeStyle"
|
:style="contentNodeStyle"
|
||||||
v-on="dragPointer.events"
|
v-on="dragPointer.events"
|
||||||
@click="handleNodeClick"
|
@click="handleNodeClick"
|
||||||
|
@contextmenu.stop.prevent="ensureSelected(), (showMenuAt = $event)"
|
||||||
>
|
>
|
||||||
<NodeWidgetTree
|
<NodeWidgetTree
|
||||||
:ast="props.node.innerExpr"
|
:ast="props.node.innerExpr"
|
||||||
|
@ -296,6 +296,11 @@ if (typeof import.meta.env.ENSO_IDE_AG_GRID_LICENSE_KEY !== 'string') {
|
|||||||
LicenseManager.setLicenseKey(agGridLicenseKey)
|
LicenseManager.setLicenseKey(agGridLicenseKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function stopIfPrevented(event: Event) {
|
||||||
|
// When AG Grid handles the context menu event it prevents-default, but it doesn't stop propagation.
|
||||||
|
if (event.defaultPrevented) event.stopPropagation()
|
||||||
|
}
|
||||||
|
|
||||||
const { AgGridVue } = await import('ag-grid-vue3')
|
const { AgGridVue } = await import('ag-grid-vue3')
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -322,6 +327,7 @@ const { AgGridVue } = await import('ag-grid-vue3')
|
|||||||
:suppressDragLeaveHidesColumns="suppressDragLeaveHidesColumns"
|
:suppressDragLeaveHidesColumns="suppressDragLeaveHidesColumns"
|
||||||
:suppressMoveWhenColumnDragging="suppressMoveWhenColumnDragging"
|
:suppressMoveWhenColumnDragging="suppressMoveWhenColumnDragging"
|
||||||
:processDataFromClipboard="processDataFromClipboard"
|
:processDataFromClipboard="processDataFromClipboard"
|
||||||
|
:allowContextMenuWithControlKey="true"
|
||||||
@gridReady="onGridReady"
|
@gridReady="onGridReady"
|
||||||
@firstDataRendered="updateColumnWidths"
|
@firstDataRendered="updateColumnWidths"
|
||||||
@rowDataUpdated="updateColumnWidths($event), emit('rowDataUpdated', $event)"
|
@rowDataUpdated="updateColumnWidths($event), emit('rowDataUpdated', $event)"
|
||||||
@ -332,6 +338,7 @@ const { AgGridVue } = await import('ag-grid-vue3')
|
|||||||
@rowEditingStopped="emit('rowEditingStopped', $event)"
|
@rowEditingStopped="emit('rowEditingStopped', $event)"
|
||||||
@sortChanged="emit('sortOrFilterUpdated', $event)"
|
@sortChanged="emit('sortOrFilterUpdated', $event)"
|
||||||
@filterChanged="emit('sortOrFilterUpdated', $event)"
|
@filterChanged="emit('sortOrFilterUpdated', $event)"
|
||||||
|
@contextmenu="stopIfPrevented"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
Reference in New Issue
Block a user