Skip to content

Commit

Permalink
[not verified] [RNMobile] Show "No title"/"No description" placeholde…
Browse files Browse the repository at this point in the history
…r for not belonged videos (#31134)

* Display no description placeholder for not belonged videos

* Display no title placeholder for not belonged videos

* Add changelog

* Bump package version
  • Loading branch information
fluiddot authored and romarioraffington committed Jun 8, 2023
1 parent 9efd16a commit 858d6d1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: added

RNMobile: Display no title and no description placeholder for not belonged videos
2 changes: 1 addition & 1 deletion projects/packages/videopress/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@automattic/jetpack-videopress",
"version": "0.14.5",
"version": "0.14.6-alpha",
"description": "VideoPress package",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/videopress/#readme",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion projects/packages/videopress/src/class-package-version.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* The Package_Version class.
*/
class Package_Version {
const PACKAGE_VERSION = '0.14.5';
const PACKAGE_VERSION = '0.14.6-alpha';

const PACKAGE_SLUG = 'videopress';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,26 @@ import VideoNotOwnedWarning from '../video-not-owned-warning';
*/
export default function DetailsPanel( { attributes, setAttributes, videoBelongToSite } ) {
const { title, description } = attributes;
const titlePlaceholder = videoBelongToSite
? __( 'Add title', 'jetpack-videopress-pkg' )
: __( 'No title', 'jetpack-videopress-pkg' );
const descriptionPlaceholder = videoBelongToSite
? __( 'Add description', 'jetpack-videopress-pkg' )
: __( 'No description', 'jetpack-videopress-pkg' );

return (
<PanelBody title={ __( 'Details', 'jetpack-videopress-pkg' ) }>
<TextControl
value={ title || '' }
onChange={ value => setAttributes( { title: value } ) }
placeholder={ __( 'Add title', 'jetpack-videopress-pkg' ) }
placeholder={ titlePlaceholder }
label={ __( 'Title', 'jetpack-videopress-pkg' ) }
disabled={ ! videoBelongToSite }
/>
<BottomSheetTextControl
initialValue={ description }
onChange={ value => setAttributes( { description: value } ) }
placeholder={ __( 'Add description', 'jetpack-videopress-pkg' ) }
placeholder={ descriptionPlaceholder }
label={ __( 'Description', 'jetpack-videopress-pkg' ) }
disabled={ ! videoBelongToSite }
/>
Expand Down

0 comments on commit 858d6d1

Please sign in to comment.