Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Dialog wrapper for portalContainer and gave inspector z-index o… #3209

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions desktop/appcontainer/AppContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,25 +122,28 @@ const appContainerView = hoistCmp.factory({
displayName: 'AppContainerView',
model: uses(AppContainerModel),

render({model}) {
const {appSpec, appModel} = XH;
let ret: ReactElement = viewport(
vframe(
render({model}) {
const {appSpec, appModel} = XH;
let ret: ReactElement = viewport(
vframe({
id: 'xh-app-content',
item:[
impersonationBar(),
bannerList(),
refreshContextView({
model: model.refreshContextModel,
item: frame(createElement(appSpec.componentClass, {model: appModel}))
}),
inspectorPanel(),
versionBar()
),
mask({bind: model.appLoadModel, spinner: true}),
aboutDialog(),
changelogDialog(),
feedbackDialog(),
optionsDialog()
);
versionBar()]

}),
mask({bind: model.appLoadModel, spinner: true}),
aboutDialog(),
changelogDialog(),
feedbackDialog(),
optionsDialog()
);

if (!appSpec.showBrowserContextMenu) {
ret = useContextMenu(ret, null);
Expand Down
3 changes: 2 additions & 1 deletion inspector/Inspector.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.xh-inspector {
.xh-modal-support__host > .xh-panel__content > .xh-panel-header {
z-index: 999;
> div >.xh-panel__content > .xh-panel-header {
background-color: hsl(33, 93%, 40%);
color: white;
}
Expand Down
4 changes: 1 addition & 3 deletions inspector/InspectorPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ export const inspectorPanel = hoistCmp.factory({
defaultSize: 400,
side: 'bottom',
persistWith: XH.inspectorService.persistWith,
modalSupport: true,
showModalToggleButton: true,
showHeaderCollapseButton: false,
collapsible: false,
xhImpl: true
},
compactHeader: true,
Expand Down
18 changes: 17 additions & 1 deletion kit/blueprint/Dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,27 @@
* Copyright © 2022 Extremely Heavy Industries Inc.
*/
import {div} from '@xh/hoist/cmp/layout';
import {hoistCmp} from '@xh/hoist/core';
import {elementFactory, hoistCmp} from '@xh/hoist/core';
import {Dialog as BpDialog} from '@blueprintjs/core';

const bpDialog = elementFactory(BpDialog)


/**
* Dialog Body for Blueprint, wrapped as a Hoist Component.
*/
export const [Dialog, dialog] = hoistCmp.withContainerFactory({
displayName: 'Dialog',
observer: false, model: false, memo: false,

render(props) {
return bpDialog({
portalContainer: document.getElementById('xh-app-content'),
...props
});
}
});

export const [DialogBody, dialogBody] = hoistCmp.withContainerFactory({
displayName: 'DialogBody',
className: 'bp4-dialog-body',
Expand Down
2 changes: 0 additions & 2 deletions kit/blueprint/Wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ export {
Checkbox,
ControlGroup,
DatePicker,
Dialog,
Drawer,
EditableText,
FileInput,
Expand Down Expand Up @@ -107,7 +106,6 @@ export const
button = elementFactory(Button),
controlGroup = elementFactory(ControlGroup),
checkbox = elementFactory(Checkbox),
dialog = elementFactory(Dialog),
datePicker = elementFactory(DatePicker),
menuDivider = elementFactory(MenuDivider),
menuItem = elementFactory(MenuItem),
Expand Down