AutoSize blocks on custom page when field or lang changes (BL-15996)#7748
AutoSize blocks on custom page when field or lang changes (BL-15996)#7748
Conversation
b927817 to
ac0e951
Compare
| )) { | ||
| editable.removeAttribute("data-book"); | ||
| } | ||
| adjustAutoSizeForVisibleEditableInTranslationGroup(tg); | ||
| setMenuOpen(false); |
There was a problem hiding this comment.
🚩 Appearance classes not cleaned up when switching field type to 'None'
The new applyAppearanceClassForEditable function (line 998-1011) adds bloom-contentFirst/bloom-contentSecond/bloom-contentThird classes when switching TO a field type controlled by the appearance system (e.g., bookTitle). However, when switching FROM such a field type to 'None' (lines 1303-1311), clearFieldTypeClasses() does not remove these appearance classes — it only removes the classes explicitly listed in fieldTypeData. This means bloom-contentFirst etc. could persist as stale classes. The practical impact is likely minimal since these classes control language-role-based styling that may still be appropriate regardless of field type, but it's an asymmetry in the new code: appearance classes are added by applyAppearanceClassForEditable but never explicitly removed when no longer relevant.
(Refers to lines 1303-1311)
Was this helpful? React with 👍 or 👎 to provide feedback.
Cleaning up unwanted -style classes, fetching content when setting language of an element that already has a field type, using wrapper for async DOM changes
ac0e951 to
4f6f250
Compare
StephenMcConnel
left a comment
There was a problem hiding this comment.
@StephenMcConnel reviewed 1 file and all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on JohnThomson).
JohnThomson
left a comment
There was a problem hiding this comment.
@JohnThomson made 2 comments.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on JohnThomson).
| )) { | ||
| editable.removeAttribute("data-book"); | ||
| } | ||
| adjustAutoSizeForVisibleEditableInTranslationGroup(tg); | ||
| setMenuOpen(false); |
StephenMcConnel
left a comment
There was a problem hiding this comment.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on JohnThomson).
StephenMcConnel
left a comment
There was a problem hiding this comment.
@StephenMcConnel made 1 comment.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on JohnThomson).
This change is