Skip to content

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

Merged
merged 5 commits into from
Jan 15, 2025
Merged

Get authoring ref #4720

merged 5 commits into from
Jan 15, 2025

Conversation

thecalcc
Copy link
Contributor

STT-31

}

const exposed: IExposedFromAuthoring<T> = {
getExposed(
Copy link
Member

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.

@thecalcc thecalcc requested a review from tomaskikutis January 13, 2025 11:08

if (state.initialized !== true) {
if (state.initialized === false) {
Copy link
Member

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 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mark as public

@thecalcc thecalcc requested a review from tomaskikutis January 14, 2025 10:29
@@ -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(
Copy link
Member

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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop this block

@thecalcc thecalcc requested a review from tomaskikutis January 15, 2025 09:32
@thecalcc thecalcc enabled auto-merge (squash) January 15, 2025 10:13
@thecalcc thecalcc merged commit 65301c2 into superdesk:develop Jan 15, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants