Browse Source

Revert all changes related to deprecation of the LabeledInputView component.

The changes will appear in a separate PR.
panr 5 years ago
parent
commit
ea32cb743f

+ 0 - 10
packages/ckeditor5-ui/src/labeledinput/labeledinputview.js

@@ -7,8 +7,6 @@
  * @module ui/labeledinput/labeledinputview
  */
 
-/* globals console */
-
 import View from '../view';
 import uid from '@ckeditor/ckeditor5-utils/src/uid';
 import LabelView from '../label/labelview';
@@ -17,9 +15,6 @@ import '../../theme/components/labeledinput/labeledinput.css';
 /**
  * The labeled input view class.
  *
- * @deprecated The LabeledInputView component has been marked as deprecated and will be removed in the next major release.
- * Please use {@link module:ui/labeledfieldview/labeledfieldview~LabeledFieldView} component instead.
- *
  * @extends module:ui/view~View
  */
 export default class LabeledInputView extends View {
@@ -32,11 +27,6 @@ export default class LabeledInputView extends View {
 	constructor( locale, InputView ) {
 		super( locale );
 
-		// Deprecation warning.
-		console.warn( 'The LabeledInputView component has been marked as deprecated' +
-			'and will be removed in the next major release. ' +
-			'Please use LabeledFieldView component instead.' );
-
 		const inputUid = `ck-input-${ uid() }`;
 		const statusUid = `ck-status-${ uid() }`;
 

+ 1 - 18
packages/ckeditor5-ui/tests/labeledinput/labeledinputview.js

@@ -3,8 +3,6 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
 
-/* globals console */
-
 import View from '../../src/view';
 import LabeledInputView from '../../src/labeledinput/labeledinputview';
 import InputView from '../../src/inputtext/inputtextview';
@@ -13,30 +11,15 @@ import LabelView from '../../src/label/labelview';
 describe( 'LabeledInputView', () => {
 	const locale = {};
 
-	let view, deprecatedWarning;
+	let view;
 
 	beforeEach( () => {
-		deprecatedWarning = sinon.stub( console, 'warn' );
 		view = new LabeledInputView( locale, InputView );
 
 		view.render();
 	} );
 
-	afterEach( () => {
-		sinon.restore();
-	} );
-
 	describe( 'constructor()', () => {
-		describe( 'deprecation warning', () => {
-			it( 'should be shown in the console after component initialization', () => {
-				sinon.assert.calledOnce( deprecatedWarning );
-			} );
-
-			it( 'should inform about using LabeledFieldView instead of LabeledInputView', () => {
-				sinon.assert.calledWithMatch( deprecatedWarning, 'Please use LabeledFieldView component instead' );
-			} );
-		} );
-
 		it( 'should set view#locale', () => {
 			expect( view.locale ).to.deep.equal( locale );
 		} );