Skip to content
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

Design a better way to trigger the full view mode in the authoring #4534

Merged
merged 10 commits into from
Jun 21, 2024

Conversation

dzonidoo
Copy link
Collaborator

@dzonidoo dzonidoo commented Jun 5, 2024

SDESK-7269

@petrjasek petrjasek added this to the 2.8 milestone Jun 13, 2024

return (
<Tooltip
text={this.props.isExpanded ? 'Revert Authoring' : 'Expand Authoring'}
Copy link
Member

Choose a reason for hiding this comment

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

use "full width mode" and "leave full width mode"; translate strings

@@ -101,7 +101,10 @@ angular.module('superdesk.apps.authoring', [
.directive('html5vfix', directive.Html5vfix)
.directive('sdDashboardCard', directive.DashboardCard)
.component('sdCharacterCount', reactToAngular1(CharacterCount, ['item', 'html', 'limit'], [], 'display: inline'))
.component('sdAuthoringIntegrationWrapper', reactToAngular1(AuthoringAngularIntegration, ['itemId', 'action'], []))
.component('sdAuthoringIntegrationWrapper', reactToAngular1(
AuthoringAngularIntegration, ['itemId', 'action', 'hideMonitoring', 'isExpanded'],
Copy link
Member

Choose a reason for hiding this comment

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

Update terminology accross files so it's the following:
fullWidth / setFullWidth - for both authoring components
monitoringHidden / setMonitoringHidden - for monitoring

The reason for different names is to reduce coupling and limit information authoring receives about implementation details of the rest of the system.

@@ -5,7 +5,7 @@
sd-media-query min-width="880"
data-test-id="authoring-topbar"
>

<toggle-full-width ng-click="hideMonitoring(currentRoute.href === item.href, $event)" ng-href="#{{ :: item.href }}" is-expanded="monitoringHidden"></toggle-full-width>
Copy link
Member

Choose a reason for hiding this comment

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

are arguments to hideMonitoring doing anything? When I logged them, it always appears empty

import classNames from 'classnames';
import {gettext} from 'core/utils';

interface IProps {
Copy link
Member

Choose a reason for hiding this comment

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

props should be:

interface IProps {
    fullWidth: boolean;
    setFullWidth(): void;
}

@dzonidoo dzonidoo merged commit 5ecfc56 into superdesk:develop Jun 21, 2024
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.

3 participants