Skip to content

Fix: set _tooltip._position migration to schema default 'bottom' (fixes #370) - #371

Merged
swashbuck merged 1 commit into
masterfrom
issue/370
Jul 20, 2026
Merged

swashbuck merged 1 commit into
masterfrom
issue/370

Conversation

@swashbuck

Copy link
Copy Markdown
Contributor

Fixes #370

Fix

  • The v6.12.1 > v6.13.1 migration in migrations/v6.js set _tooltip._position to an empty string ''. _position was introduced in v6.13.1 already carrying an enum and a "bottom" default, so '' is not a permitted value and migrated content fails modern-schema validation (/_items/N/_tooltip/_position must be equal to one of the allowed values).
  • Set _position to the schema default 'bottom' in both the mutateContent and the matching checkContent. The migration's own check previously passed only because it asserted the same invalid ''.

Testing

  1. grunt migration:test --file=adapt-contrib-hotgraphic
  2. All scenarios pass; migrated items now hold a valid _position ('bottom').

The v6.12.1 > v6.13.1 migration added `_tooltip._position` with an empty
string `''`. `_position` was introduced in v6.13.1 (commit 7831ee3) already
carrying an enum and a `'bottom'` default; `''` is not a permitted enum
value, so migrated content fails modern-schema validation (e.g. on AAT
import: `/_items/N/_tooltip/_position must be equal to one of the allowed
values`). The migration's own test passed only because its checkContent
asserted the same invalid `''`.

Set `_position` to the schema default `'bottom'` in both the mutate and the
matching check.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@swashbuck
swashbuck merged commit cdfc882 into master Jul 20, 2026
1 check passed
@swashbuck
swashbuck deleted the issue/370 branch July 20, 2026 16:27
@github-project-automation github-project-automation Bot moved this from Needs Reviewing to Recently Released in adapt_framework: The TODO Board Jul 20, 2026
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 6.20.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Recently Released

Development

Successfully merging this pull request may close these issues.

Fix tooltip _position migration writes invalid empty string

5 participants