mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Reference and ReferenceList should trigger RightMenu to show up on Column tab and display reference toolitp, if it wasn't dismissed yet
Summary: few things is going here: 1. Added comand that can be called with intent to show behavioral popup somewhere else. I've added it to trigger showing reference popup from new colum menu, despite popup existing in FieldBuilder 2. Command for showing right panel get an argument to switch for choosen tab right after showing. Test Plan: two test added - one to check if right side menu is shown after chosing ref or refList, and second to check if popup is shown. Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D4138
This commit is contained in:
@@ -891,6 +891,14 @@ GridView.prototype.insertColumn = async function(colId = null, options = {}) {
|
||||
const newColInfo = await this.viewSection.insertColumn(colId, {colInfo, index});
|
||||
this.selectColumn(index);
|
||||
if (!skipPopup) { this.currentEditingColumnIndex(index); }
|
||||
// we want to show creator panel in some cases, but only when "rename panel" is dismissed
|
||||
const sub = this.currentEditingColumnIndex.subscribe(state=>{
|
||||
// if no column is edited we can assume that rename panel is closed
|
||||
if(state<0){
|
||||
options.onPopupClose?.();
|
||||
sub.dispose();
|
||||
}
|
||||
});
|
||||
return newColInfo;
|
||||
};
|
||||
|
||||
|
||||
@@ -100,6 +100,7 @@ export type CommandName =
|
||||
| 'duplicateRows'
|
||||
| 'sortAsc'
|
||||
| 'sortDesc'
|
||||
| 'showPopup'
|
||||
| 'addSortAsc'
|
||||
| 'addSortDesc'
|
||||
| 'filterByThisCellValue'
|
||||
@@ -119,7 +120,6 @@ export type CommandName =
|
||||
| 'insertField'
|
||||
;
|
||||
|
||||
|
||||
export interface CommandDef {
|
||||
name: CommandName;
|
||||
keys: string[];
|
||||
@@ -283,6 +283,11 @@ export const groups: CommendGroupDef[] = [{
|
||||
keys: ['Space'],
|
||||
desc: 'Show the record card widget of the selected record',
|
||||
},
|
||||
{
|
||||
name: 'showPopup',
|
||||
keys:[],
|
||||
desc: 'showing a behavioral popup'
|
||||
},
|
||||
{
|
||||
name: 'createForm',
|
||||
keys: [],
|
||||
@@ -292,7 +297,7 @@ export const groups: CommendGroupDef[] = [{
|
||||
name: 'insertField',
|
||||
keys: [],
|
||||
desc: 'Insert new column in default location',
|
||||
},
|
||||
}
|
||||
]
|
||||
}, {
|
||||
group: 'Navigation',
|
||||
|
||||
Reference in New Issue
Block a user