Skip to content

Commit 61f8d18

Browse files
committed
Changelog: Tweaked spacing, count and element referencing
During review of #5663
1 parent f786d25 commit 61f8d18

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

resources/js/components/page-editor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export class PageEditor extends Component {
2525
this.draftDisplayIcon = this.$refs.draftDisplayIcon;
2626
this.changelogInput = this.$refs.changelogInput;
2727
this.changelogDisplay = this.$refs.changelogDisplay;
28+
this.changelogCounter = this.$refs.changelogCounter;
2829
this.changeEditorButtons = this.$manyRefs.changeEditor || [];
2930
this.switchDialogContainer = this.$refs.switchDialog;
3031
this.deleteDraftDialogContainer = this.$refs.deleteDraftDialog;
@@ -77,8 +78,7 @@ export class PageEditor extends Component {
7778
const updateChangelogDebounced = debounce(this.updateChangelogDisplay.bind(this), 300, false);
7879
this.changelogInput.addEventListener('input', () => {
7980
const count = this.changelogInput.value.length;
80-
const counterEl = document.getElementById('changelog-count');
81-
if (counterEl) counterEl.innerText = `${count} / 250`;
81+
this.changelogCounter.innerText = `${count} / 180`;
8282
updateChangelogDebounced();
8383
});
8484

resources/views/pages/parts/editor-toolbar.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,17 +104,17 @@ class="dropdown-container">
104104
<span refs="page-editor@changelogDisplay">{{ trans('entities.pages_edit_set_changelog') }}</span>
105105
</button>
106106
<ul refs="dropdown@menu" class="wide dropdown-menu">
107-
<li class="px-l py-m">
107+
<li class="px-m py-s">
108108
<p class="text-muted pb-s">{{ trans('entities.pages_edit_enter_changelog_desc') }}</p>
109109
<textarea
110110
refs="page-editor@changelogInput"
111111
name="summary"
112112
id="summary-input"
113113
rows="2"
114-
maxlength="250"
114+
maxlength="180"
115115
placeholder="{{ trans('entities.pages_edit_enter_changelog') }}"
116116
></textarea>
117-
<small class="text-muted mt-xs" id="changelog-count">0 / 250</small>
117+
<small refs="page-editor@changelogCounter" class="text-muted mt-xs">0 / 180</small>
118118
</li>
119119
</ul>
120120
<span>{{-- Prevents button jumping on menu show --}}</span>

0 commit comments

Comments
 (0)