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

Custom theme property values are not imported #53

Closed
swashbuck opened this issue Aug 19, 2024 · 0 comments · Fixed by #54
Closed

Custom theme property values are not imported #53

swashbuck opened this issue Aug 19, 2024 · 0 comments · Fixed by #54
Assignees
Labels
bug An error has occurred high priority Should be prioritised over all other issues

Comments

@swashbuck
Copy link

swashbuck commented Aug 19, 2024

What happened?

When importing a course with a custom theme, the custom theme property values are not included. We are using custom theme properties for background images, page header images, favicon, and more. In the AAT, the properties are present, but the values are missing.

In the course export, both _vanilla and _customtheme properties are present. However, all properties are set to default values (e.g. _minimumHeights._xlarge: 0)

The custom theme is based on Vanilla theme 9.20.0.

Update: It looks like _boxMenu property values are also missing. For example: _boxMenu._menuHeader._backgroundImage._large.

Expected behaviour

Importing a course with a custom theme should retain all property values of the custom theme.

Steps to reproduce

  1. Replace all _vanilla schema properties with _customtheme.

Add a _customtheme property. For example, add page header images to a content object:

"_customtheme": {
  "_pageHeader": {
    "_backgroundImage": {
      "_xlarge": "course/en/images/page-header-lg.jpg",
      "_large": "course/en/images/page-header-md.jpg",
      "_medium": "course/en/images/page-header-sm.jpg",
      "_small": "course/en/images/page-header-sm.jpg"
    }
  }
}
  1. Replace all _vanilla references in the theme JS with _customtheme.
onPostRender(view) {
  const viewModel = view.model;
  const theme = viewModel.get('_customtheme');
}
  1. Update bower.json and package.json accordingly. For instance, targetAttribute should be _customtheme.

Authoring tool version

1.0.0-rc.4

Framework version

5.40.7

What browsers are you seeing the problem on?

Firefox, Chrome

Relevant log output

No response

@swashbuck swashbuck added the bug An error has occurred label Aug 19, 2024
@taylortom taylortom added the high priority Should be prioritised over all other issues label Aug 21, 2024
@joe-allen-89 joe-allen-89 transferred this issue from adapt-security/adapt-authoring Sep 5, 2024
taylortom added a commit that referenced this issue Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error has occurred high priority Should be prioritised over all other issues
Projects
3 participants