mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Hiding creator panel when raw data page is active.
Summary: Creator panel was showing a header with tabs on Raw Data page. This was broken by forms feature lately. Test Plan: Added Reviewers: georgegevoian Reviewed By: georgegevoian Subscribers: georgegevoian Differential Revision: https://phab.getgrist.com/D4179
This commit is contained in:
parent
b1f7ca353a
commit
716144ed46
@ -123,6 +123,8 @@ export class RightPanel extends Disposable {
|
|||||||
return use(this._pageWidgetType) === 'form';
|
return use(this._pageWidgetType) === 'form';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
private _hasActiveWidget = Computed.create(this, (use) => Boolean(use(this._pageWidgetType)));
|
||||||
|
|
||||||
// Returns the active section if it's valid, null otherwise.
|
// Returns the active section if it's valid, null otherwise.
|
||||||
private _validSection = Computed.create(this, (use) => {
|
private _validSection = Computed.create(this, (use) => {
|
||||||
const sec = use(this._gristDoc.viewModel.activeSection);
|
const sec = use(this._gristDoc.viewModel.activeSection);
|
||||||
@ -253,7 +255,7 @@ export class RightPanel extends Disposable {
|
|||||||
dom.create(this._buildPageFormHeader.bind(this)),
|
dom.create(this._buildPageFormHeader.bind(this)),
|
||||||
dom.create(this._buildPageWidgetContent.bind(this)),
|
dom.create(this._buildPageWidgetContent.bind(this)),
|
||||||
];
|
];
|
||||||
} else {
|
} else if (use(this._hasActiveWidget)) {
|
||||||
return [
|
return [
|
||||||
dom.create(this._buildPageWidgetHeader.bind(this)),
|
dom.create(this._buildPageWidgetHeader.bind(this)),
|
||||||
dom.create(this._buildPageWidgetContent.bind(this)),
|
dom.create(this._buildPageWidgetContent.bind(this)),
|
||||||
|
@ -32,6 +32,12 @@ describe('RawData', function () {
|
|||||||
assert.deepEqual(uiTables, tables);
|
assert.deepEqual(uiTables, tables);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('shows blank creator panel', async function () {
|
||||||
|
await gu.toggleSidePanel('right', 'open');
|
||||||
|
assert.isEmpty(await driver.find('.test-right-panel').getText());
|
||||||
|
await gu.toggleSidePanel('right', 'close');
|
||||||
|
});
|
||||||
|
|
||||||
it('shows row counts of all tables', async function () {
|
it('shows row counts of all tables', async function () {
|
||||||
assert.deepEqual(await getRawTableRows(), [
|
assert.deepEqual(await getRawTableRows(), [
|
||||||
'4,079',
|
'4,079',
|
||||||
|
Loading…
Reference in New Issue
Block a user