Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New: Migration Scripts (fixes #158) #159

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open

New: Migration Scripts (fixes #158) #159

wants to merge 38 commits into from

Conversation

joe-replin
Copy link

New

Testing

Test using this branch of the Adapt Framework which includes the scripts that handle the migration.
adaptlearning/adapt_framework#3633

@joe-replin joe-replin self-assigned this Jan 15, 2025
Copy link
Contributor

@chris-steele chris-steele left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great start and very useful reference. Just added a few small pointers...

@joe-replin
Copy link
Author

@chris-steele, appreciate the early review. I am requesting another review from you and have officially turned this PR to 'Needs Reviewing'.

Copy link
Contributor

@joe-allen-89 joe-allen-89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor points to switch to new helpers, but looking really good overall.

@joe-replin
Copy link
Author

I have tested the migration itself and everything has tested as expected.

Copy link
Contributor

@joe-allen-89 joe-allen-89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@joe-replin joe-replin requested a review from oliverfoster March 6, 2025 17:14

mutateContent('adapt-contrib-accordion - add accordion._items._classes attribute', async () => {
accordions.forEach(accordion => {
accordion._items.forEach(item => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A test with missing _items will error here.

 { _id: 'c-110', _component: 'accordion' }

Is this ok?


mutateContent('adapt-contrib-accordion - add accordion._items._classes attribute', async () => {
accordions.forEach(accordion => {
accordion._items.forEach(item => {
Copy link
Member

@oliverfoster oliverfoster Mar 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be as simple as optional chaining throughout?

Suggested change
accordion._items.forEach(item => {
accordion._items?.forEach(item => {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Reviewing
Development

Successfully merging this pull request may close these issues.

Add Migration Scripts
4 participants