Skip to content
Merged
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
4 changes: 2 additions & 2 deletions src/components/viewer/ComponentViewerStateCreator.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('ComponentViewerStateCreator', () => {

it('should take fullscreen state from url', () => {
const stateCreator = new ComponentViewerStateCreator(registries);
const state = stateCreator.stateFromUrl('fullScreen=true');
const state = stateCreator.stateFromUrl('_rcv_fs=true');

expect(state.isFullScreen).toEqual(true);
});
Expand All @@ -53,6 +53,6 @@ describe('ComponentViewerStateCreator', () => {
selectedToolbarItem: ''
});

expect(url).toEqual('registryName=core&demoName=demo-name&fullScreen=true');
expect(url).toEqual('_rcv_rname=core&_rcv_dname=demo-name&_rcv_fs=true');
});
});
12 changes: 6 additions & 6 deletions src/components/viewer/ComponentViewerStateCreator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { Registry, Registries } from '../';
import { DemoEntryAndRegistry } from '../registry/DemoEntryAndRegistry';

const queryParamNames = {
registryName: 'registryName',
demoName: 'demoName',
entryTitle: 'entryTitle',
selectedToolbarItem: 'toolbarItem',
isFullScreen: 'fullScreen',
isHelpOn: 'help'
registryName: '_rcv_rname',
demoName: '_rcv_dname',
entryTitle: '_rcv_title',
selectedToolbarItem: '_rcv_titem',
isFullScreen: '_rcv_fs',
isHelpOn: '_rcv_help'
};

export class ComponentViewerStateCreator {
Expand Down