mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
* fix: provide css value for workpads old workpads were missing this value, this fixes scaling in fullscreen mode * fix: make workpadCss a required prop this will cause warnings in the future if the value is missing. also remove the unused css prop.
This commit is contained in:
parent
ee5278cace
commit
11cdfa16fe
2 changed files with 7 additions and 4 deletions
|
@ -25,13 +25,12 @@ export class Workpad extends React.PureComponent {
|
|||
isFullscreen: PropTypes.bool.isRequired,
|
||||
width: PropTypes.number.isRequired,
|
||||
height: PropTypes.number.isRequired,
|
||||
workpadCss: PropTypes.string,
|
||||
workpadCss: PropTypes.string.required,
|
||||
undoHistory: PropTypes.func.isRequired,
|
||||
redoHistory: PropTypes.func.isRequired,
|
||||
nextPage: PropTypes.func.isRequired,
|
||||
previousPage: PropTypes.func.isRequired,
|
||||
fetchAllRenderables: PropTypes.func.isRequired,
|
||||
css: PropTypes.object,
|
||||
registerLayout: PropTypes.func.isRequired,
|
||||
unregisterLayout: PropTypes.func.isRequired,
|
||||
};
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import { get, omit } from 'lodash';
|
||||
import { safeElementFromExpression, fromExpression } from '@kbn/interpreter/common';
|
||||
|
||||
import { DEFAULT_WORKPAD_CSS } from '../../../common/lib/constants';
|
||||
import { append } from '../../lib/modify_path';
|
||||
import { getAssets } from './assets';
|
||||
|
||||
|
@ -19,7 +19,11 @@ const appendAst = element => ({
|
|||
|
||||
// workpad getters
|
||||
export function getWorkpad(state) {
|
||||
return get(state, workpadRoot);
|
||||
return {
|
||||
// shim old workpads with new properties
|
||||
css: DEFAULT_WORKPAD_CSS,
|
||||
...get(state, workpadRoot),
|
||||
};
|
||||
}
|
||||
|
||||
// should we split `workpad.js` to eg. `workpad.js` (full) and `persistentWorkpadStructure.js` (persistent.workpad)?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue