mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
Adjusted subtitle copy
closes https://linear.app/tryghost/issue/MOM-180 closes https://linear.app/tryghost/issue/MOM-184
This commit is contained in:
parent
41f8ed6f45
commit
9ab9a88d5b
@ -61,7 +61,7 @@
|
|||||||
<div class="relative">
|
<div class="relative">
|
||||||
<GhTextarea
|
<GhTextarea
|
||||||
@class={{concat "gh-editor-subtitle " (if @excerptErrorMessage "red")}}
|
@class={{concat "gh-editor-subtitle " (if @excerptErrorMessage "red")}}
|
||||||
@placeholder="Add a subtitle..."
|
@placeholder="Add a subtitle"
|
||||||
@shouldFocus={{false}}
|
@shouldFocus={{false}}
|
||||||
@tabindex="1"
|
@tabindex="1"
|
||||||
@autoExpand=".gh-koenig-editor"
|
@autoExpand=".gh-koenig-editor"
|
||||||
|
@ -63,7 +63,7 @@ export default BaseValidator.create({
|
|||||||
customExcerpt(model) {
|
customExcerpt(model) {
|
||||||
if (!validator.isLength(model.customExcerpt || '', 0, 300)) {
|
if (!validator.isLength(model.customExcerpt || '', 0, 300)) {
|
||||||
if (model.feature.editorSubtitle) {
|
if (model.feature.editorSubtitle) {
|
||||||
model.errors.add('customExcerpt', 'Please keep the subtitle under 300 characters.');
|
model.errors.add('customExcerpt', 'Subtitle cannot be longer than 300 characters.');
|
||||||
} else {
|
} else {
|
||||||
model.errors.add('customExcerpt', 'Excerpt cannot be longer than 300 characters.');
|
model.errors.add('customExcerpt', 'Excerpt cannot be longer than 300 characters.');
|
||||||
}
|
}
|
||||||
|
@ -516,7 +516,7 @@ describe('Acceptance: Editor', function () {
|
|||||||
await fillIn('[data-test-textarea="subtitle"]', Array(302).join('a'));
|
await fillIn('[data-test-textarea="subtitle"]', Array(302).join('a'));
|
||||||
|
|
||||||
expect(find('[data-test-error="subtitle"]'), 'subtitle error').to.exist;
|
expect(find('[data-test-error="subtitle"]'), 'subtitle error').to.exist;
|
||||||
expect(find('[data-test-error="subtitle"]')).to.have.trimmed.text('Please keep the subtitle under 300 characters.');
|
expect(find('[data-test-error="subtitle"]')).to.have.trimmed.text('Subtitle cannot be longer than 300 characters.');
|
||||||
|
|
||||||
await fillIn('[data-test-textarea="subtitle"]', Array(300).join('a'));
|
await fillIn('[data-test-textarea="subtitle"]', Array(300).join('a'));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user