-
Notifications
You must be signed in to change notification settings - Fork 87
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
Design a better way to trigger the full view mode in the authoring #4534
Conversation
|
||
return ( | ||
<Tooltip | ||
text={this.props.isExpanded ? 'Revert Authoring' : 'Expand Authoring'} |
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.
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'], |
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.
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> |
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.
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 { |
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.
props should be:
interface IProps {
fullWidth: boolean;
setFullWidth(): void;
}
SDESK-7269