Giter Site home page Giter Site logo

adobe / aem-experimentation Goto Github PK

View Code? Open in Web Editor NEW
7.0 16.0 6.0 485 KB

A lightweight Franklin plugin for experimentation and segmentation.

License: Apache License 2.0

JavaScript 91.13% CSS 8.87%
audiences campaigns experimentation franklin franklin-plugin segmentation experience-decisioning

aem-experimentation's Issues

Run experiment should fetch whole document, not only "plain"

Currently challengers are loaded with the plain selector, and the innerHTML of the main element is replaced with it.

That lacks support for changing metadata with the challenger, for example changing the pages template or theme.

Furthermore this is the same mechanism we load fragments with, and for AEM authoring we remove the instrumentation for fragments, leaving the challenger being not editable anymore.

I would like to suggest,

  • to load the full page,
  • parse it with a dom parser or contextual fragment,
  • then replace the main of the page with the challengers main, and
  • if we want to replace metadata that is different on the challenger as well.

Replace key/common metadata from the challenger, add a config option for which metadata is updated

This is a very similar issue as #15 but running into an issue with a customer trying to use this where the Template metadata is used to load dynamic js and their challengers are using different template values.

I think we could safely:

  • add a config which is an array of metadata fields to update
  • default that value to be ['template', 'theme']
  • update/overwrite those metadata fields when overwriting main

Gear button on pile not working

When I click the gear icon in the pile here https://main--exlm--buuhuu.hlx.page/en/dirk-demo nothing happens.

That seems to be related to this piece of code: https://github.com/adobe/aem-experimentation/blob/main/src/preview.js#L52-L75

  const actions = typeof header === 'object'
    ? (header.actions || []).map((action) => (action.href
      ? `<div class="hlx-button"><a href="${action.href}">${action.label}</a></div>`
      : `<div class="hlx-button"><a href="#">${action.label}</a></div>`))
    : [];
  // ...
  const buttons = [...popup.querySelectorAll('.hlx-popup-header-actions .hlx-button a')];
  actions.forEach((action, index) => {
    if (action.onclick) {
      buttons[index].addEventListener('click', action.onclick);
    }
  });

While the only item in header.actions has an onclick handler, the html string in the actions array does not.

The automated release is failing 🚨

🚨 The automated release from the main branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the main branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Disable the pill per default, enable only on .page or locahost

This request is an ask to reverse the logic to show or not show the pill.

Currently it is not shown if:

  • on .live
  • if configured on prodHost
  • if configured isProd returns true

We should reverse this to use a white list and show it only if

  • on .page or localhost (as recommended in the README.md)
  • if configured and isProd returns false
  • if configured and not on prodHost

That way no user setting is needed when running aem-experimentation with crosswalk

Audiences Popup Dialog not appearing on page preview

Expected Behaviour

The Audiences popup dialog should appear at the bottom right of the page, when audiences are configured for it on the metadata block of the page document.

Actual Behaviour

The Audiences popup dialog is not appearing on the page.

Reproduce Scenario (including but not limited to)

Any page with Audiences configured in its metadata block.

Steps to Reproduce

  1. Configure a page document with a desktop and mobile Audience in its metadata block.
  2. View the page on the development server or alternatively preview it and view it on the preview domain.

Platform and Version

Microsoft Edge Version 121.0.2277.112 (Official build) (64-bit)

Sample Code that illustrates the problem

Logs taken while reproducing problem

TypeError: Cannot read properties of undefined (reading 'forEach')
    at createPopupDialog (preview.js:71:18)
    at createPopupButton (preview.js:81:17)
    at decorateAudiencesPill (preview.js:463:16)
    at async Module.decoratePreviewMode (preview.js:490:5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.