Skip to content

Merge personalisation WordList into Grid 3#42

Merged
willwade merged 2 commits intomainfrom
refactorgrid
Apr 28, 2026
Merged

Merge personalisation WordList into Grid 3#42
willwade merged 2 commits intomainfrom
refactorgrid

Conversation

@willwade
Copy link
Copy Markdown
Owner

Process WordList items attached to a page (from personalisation) and merge them into the existing Grid.WordList.Items.WordListItem array. Checks for a known symbol key ('wordListItems'), handles casing variations of existing items, ensures an array, and appends new items in Grid 3 format (Text.p.s.r, Image as '', PartOfSpeech 'Unknown'). Skips processing if there is no existing WordList.Items to avoid creating new cells.

Process WordList items attached to a page (from personalisation) and merge them into the existing Grid.WordList.Items.WordListItem array. Checks for a known symbol key ('wordListItems'), handles casing variations of existing items, ensures an array, and appends new items in Grid 3 format (Text.p.s.r, Image as '', PartOfSpeech 'Unknown'). Skips processing if there is no existing WordList.Items to avoid creating new cells.
When personalizing vocabularies with WordList items, the code was checking
if originalGrid.Grid.WordList.Items existed before adding items. If the
original page didn't have a WordList, items would not be added.

This change ensures the WordList structure is created if it doesn't exist,
allowing personalization items to be added to pages without existing
WordLists.
@willwade willwade merged commit bbd6155 into main Apr 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant