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

Use updated components for advisor, and add promoted lessons widget/shortcode #28

Open
Mierdin opened this issue Jan 23, 2020 · 0 comments

Comments

@Mierdin
Copy link
Member

Mierdin commented Jan 23, 2020

Thinking it might be useful to have the promoted lessons carousel on one of the main blog, kind of like the advisor widget.

In looking at this, I noticed the import for the advisor in https://github.com/nre-learning/nre-hugo-theme/blob/master/layouts/partials/scripts.html#L4 was using an older version of the antidote.js file while it was still in antidote-web, before being moved to antidote-ui-components. So I updated it, and also added a reference for the promoted lessons component.

Doing so made it so that neither component worked, because they couldn't get a handle on lit-html:

TypeError: Error resolving module specifier: lit-html

It turns out that the older version of antidote.js that's currently referenced in that repo uses an external, absolute URL for importing lit-html. However, the advisor.js and promotedlessons.js that are currently in master for antidote-ui-components are using it by name, which implies that it has some way of looking it up when running locally, but external web applications can't make use of this so they fail to find it.

Need to research how these imports actually work and how best to move forward. I was considering turning those imports in antidote-ui-components into relative imports but it felt wrong. Anyways I'm putting a hold on this until I have time to do more research.

This will require coordination across the antidote-ui-components, nre-hugo-theme, and this repo.

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

No branches or pull requests

1 participant