Skip to content

Commit

Permalink
Test ability to disable global views (#745)
Browse files Browse the repository at this point in the history
* Add ability to disable global views

* Cleanup leftover hbox
  • Loading branch information
ghsolomon authored Dec 19, 2024
1 parent 52a1644 commit c114c48
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export class ViewManagerTestModel extends HoistModel {
'localStorageKey',
'sessionStorageKey',
'manageGlobal',
'enableGlobal',
'enableSharing',
'enableAutoSave',
'enableDefault',
Expand All @@ -100,6 +101,7 @@ export class ViewManagerTestModel extends HoistModel {
{name: 'localStorageKey', initialValue: 'viewManagerTest'},
{name: 'sessionStorageKey', initialValue: 'viewManagerTest'},
{name: 'manageGlobal', initialValue: true},
{name: 'enableGlobal', initialValue: true},
{name: 'enableSharing', initialValue: true},
{name: 'enableAutoSave', initialValue: true},
{name: 'enableDefault', initialValue: true},
Expand Down Expand Up @@ -132,6 +134,7 @@ export class ViewManagerTestModel extends HoistModel {
localStorageKey,
sessionStorageKey,
manageGlobal,
enableGlobal,
enableSharing,
enableDefault,
enableAutoSave,
Expand All @@ -151,6 +154,7 @@ export class ViewManagerTestModel extends HoistModel {
typeDisplayName,
globalDisplayName,
manageGlobal,
enableGlobal,
enableSharing,
enableDefault,
enableAutoSave,
Expand Down
46 changes: 27 additions & 19 deletions client-app/src/admin/tests/viewmanager/ViewManagerTestPanel.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {badge} from '@xh/hoist/cmp/badge';
import {form} from '@xh/hoist/cmp/form';
import {div, filler, hbox, hframe, hspacer, placeholder, vframe} from '@xh/hoist/cmp/layout';
import {div, filler, hbox, hframe, hspacer, placeholder, vbox, vframe} from '@xh/hoist/cmp/layout';
import {tabContainer} from '@xh/hoist/cmp/tab';
import {creates, hoistCmp, uses} from '@xh/hoist/core';
import {button} from '@xh/hoist/desktop/cmp/button';
Expand Down Expand Up @@ -156,24 +156,32 @@ const modelConfig = hoistCmp.factory({
item: numberInput()
}),
hbox(
formField({
field: 'manageGlobal',
item: switchInput()
}),
formField({
field: 'enableSharing',
item: switchInput()
})
),
hbox(
formField({
field: 'enableAutoSave',
item: switchInput()
}),
formField({
field: 'enableDefault',
item: switchInput()
})
vbox(
formField({
field: 'enableAutoSave',
item: switchInput()
}),
formField({
field: 'enableDefault',
item: switchInput()
})
),
vbox(
formField({
field: 'enableGlobal',
item: switchInput()
}),
formField({
field: 'enableSharing',
item: switchInput()
})
),
vbox(
formField({
field: 'manageGlobal',
item: switchInput()
})
)
)
]
});
Expand Down

0 comments on commit c114c48

Please sign in to comment.