-
Notifications
You must be signed in to change notification settings - Fork 86
Get authoring ref #4720
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
Get authoring ref #4720
Conversation
} | ||
|
||
const exposed: IExposedFromAuthoring<T> = { | ||
getExposed( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one can't be public because it needs internal details as arguments. Since all those details come from props anyway, you can drop arguments and then the method could be public.
|
||
if (state.initialized !== true) { | ||
if (state.initialized === false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's better throw an error, so our return type is not nullable. Returning null
isn't useful anyway, if I get null
what I'm supposed to do? call again hoping it would be initialized? :D
render() { | ||
const state = this.state; | ||
const {authoringStorage, fieldsAdapter, storageAdapter, getLanguage, getSidePanel} = this.props; | ||
getExposed(): IExposedFromAuthoring<T> | null { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mark as public
@@ -121,6 +121,8 @@ import {editor3ToOperationalFormat} from 'apps/authoring-react/fields/editor3'; | |||
import {prepareSuperdeskQuery} from './helpers/universal-query'; | |||
import {showPopup} from 'superdesk-ui-framework/react'; | |||
import {ui} from './ui-utils'; | |||
import {forwardRef, RefObject} from 'react'; | |||
import React from 'react'; | |||
|
|||
export function openArticle( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no changes in this file?
} | ||
|
||
// TODO: remove test code | ||
if (uiFrameworkAuthoringPanelTest) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop this block
STT-31