Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/madcodelife/dockview into…
Browse files Browse the repository at this point in the history
… 531-fixtypo-onlywhenvisibile-onlywhenvisible
  • Loading branch information
mathuo committed Mar 27, 2024
2 parents deb59eb + 0d34d72 commit 78a5534
Show file tree
Hide file tree
Showing 8 changed files with 41,033 additions and 41,033 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe('contentContainer', () => {

const cut = new ContentContainer(
fromPartial<DockviewComponent>({
renderer: 'onlyWhenVisibile',
renderer: 'onlyWhenVisible',
overlayRenderContainer,
}),
fromPartial<DockviewGroupPanelModel>({
Expand All @@ -91,7 +91,7 @@ describe('contentContainer', () => {
view: {
content: contentRenderer,
},
api: { renderer: 'onlyWhenVisibile' },
api: { renderer: 'onlyWhenVisible' },
});

cut.openPanel(panel as IDockviewPanel);
Expand Down Expand Up @@ -126,7 +126,7 @@ describe('contentContainer', () => {
view: {
content: contentRenderer2,
} as Partial<IDockviewPanelModel>,
api: { renderer: 'onlyWhenVisibile' },
api: { renderer: 'onlyWhenVisible' },
} as Partial<IDockviewPanel>;

cut.openPanel(panel2 as IDockviewPanel);
Expand All @@ -153,7 +153,7 @@ describe('contentContainer', () => {
disposable.dispose();
});

test("that panels renderered as 'onlyWhenVisibile' are removed when closed", () => {
test("that panels renderered as 'onlyWhenVisible' are removed when closed", () => {
const overlayRenderContainer = fromPartial<OverlayRenderContainer>({
detatch: jest.fn(),
});
Expand All @@ -169,14 +169,14 @@ describe('contentContainer', () => {

const panel1 = fromPartial<IDockviewPanel>({
api: {
renderer: 'onlyWhenVisibile',
renderer: 'onlyWhenVisible',
},
view: { content: new TestContentRenderer('panel_1') },
});

const panel2 = fromPartial<IDockviewPanel>({
api: {
renderer: 'onlyWhenVisibile',
renderer: 'onlyWhenVisible',
},
view: { content: new TestContentRenderer('panel_2') },
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ describe('dockviewGroupPanelModel', () => {
options = {};

panelApi = fromPartial<DockviewPanelApi>({
renderer: 'onlyWhenVisibile',
renderer: 'onlyWhenVisible',
onDidTitleChange: new Emitter().event,
onDidParametersChange: new Emitter().event,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('dockviewPanel', () => {
group,
model,
{
renderer: 'onlyWhenVisibile',
renderer: 'onlyWhenVisible',
}
);

Expand Down Expand Up @@ -102,7 +102,7 @@ describe('dockviewPanel', () => {
group,
model,
{
renderer: 'onlyWhenVisibile',
renderer: 'onlyWhenVisible',
}
);

Expand Down Expand Up @@ -157,7 +157,7 @@ describe('dockviewPanel', () => {
group,
model,
{
renderer: 'onlyWhenVisibile',
renderer: 'onlyWhenVisible',
}
);

Expand Down Expand Up @@ -203,7 +203,7 @@ describe('dockviewPanel', () => {
group,
model,
{
renderer: 'onlyWhenVisibile',
renderer: 'onlyWhenVisible',
}
);

Expand Down Expand Up @@ -250,7 +250,7 @@ describe('dockviewPanel', () => {
group,
model,
{
renderer: 'onlyWhenVisibile',
renderer: 'onlyWhenVisible',
}
);

Expand Down Expand Up @@ -295,7 +295,7 @@ describe('dockviewPanel', () => {
group,
model,
{
renderer: 'onlyWhenVisibile',
renderer: 'onlyWhenVisible',
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export class ContentContainer
let container: HTMLElement;

switch (panel.api.renderer) {
case 'onlyWhenVisibile':
case 'onlyWhenVisible':
this.group.renderContainer.detatch(panel);
if (this.panel) {
if (doRender) {
Expand Down Expand Up @@ -198,7 +198,7 @@ export class ContentContainer

public closePanel(): void {
if (this.panel) {
if (this.panel.api.renderer === 'onlyWhenVisibile') {
if (this.panel.api.renderer === 'onlyWhenVisible') {
this.panel.view.content.element.parentElement?.removeChild(
this.panel.view.content.element
);
Expand Down
2 changes: 1 addition & 1 deletion packages/dockview-core/src/dockview/dockviewComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ export class DockviewComponent
}

get renderer(): DockviewPanelRenderer {
return this.options.defaultRenderer ?? 'onlyWhenVisibile';
return this.options.defaultRenderer ?? 'onlyWhenVisible';
}

constructor(options: DockviewComponentOptions) {
Expand Down
2 changes: 1 addition & 1 deletion packages/dockview-core/src/overlayRenderContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getDomNodePagePosition, toggleClass } from './dom';
import { CompositeDisposable, Disposable, IDisposable } from './lifecycle';
import { IDockviewPanel } from './dockview/dockviewPanel';

export type DockviewPanelRenderer = 'onlyWhenVisibile' | 'always';
export type DockviewPanelRenderer = 'onlyWhenVisible' | 'always';

export interface IRenderable {
readonly element: HTMLElement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ const components = {
<button
onClick={() => {
setMode(
mode === 'onlyWhenVisibile'
mode === 'onlyWhenVisible'
? 'always'
: 'onlyWhenVisibile'
: 'onlyWhenVisible'
);
}}
>
Expand Down
Loading

0 comments on commit 78a5534

Please sign in to comment.