mdn / kuma

The project that powers MDN.
https://developer.mozilla.org
Mozilla Public License 2.0
1.93k stars 679 forks source link

Survey banner broken on home page #6068

Closed atopal closed 4 years ago

atopal commented 4 years ago

Summary The task completion survey banner is visually broken on the home page.

Steps To Reproduce (STR) Not that easy to re-produce since the banner shows up for only 5% of users. I think there might be a waffle url parameter, not quite sure though

Actual behavior Banner showed liked this: MDN_Web_Docs_und_Notizen_und_MClark_pdf__Seite_1_von_18_

Expected behavior Should have looked like this (see top right corner) CSS__Cascading_Style_Sheets___MDN_und_Notizen

Additional context The issue is only on the home page, assuming that's because it's not reactified

peterbe commented 4 years ago

Same thing here: https://github.com/mdn/kuma/issues/5816

schalkneethling commented 4 years ago

@atopal With the following config locally:

Screenshot 2020-02-17 at 13 04 30

I still cannot get the task completion survey to show up on the homepage.

When I look at the templates, the only template the loads the task-completion.js file is the wiki base Jinja template, not the homepage.

So, my questions then are:

Thanks!

atopal commented 4 years ago

Please add the survey to the home page, if it doesn't have it already.

schalkneethling commented 4 years ago

Please add the survey to the home page, if it doesn't have it already.

This is beginning to turn into a rabbit hole :) To add the task completion survey to the homepage I have to add task-completion.js. Here I had to make a couple of small changes as it still depended on jQuery.

I then realized that we are not including the i18n JS files(provides interpolate, gettext etc.) on the new frontend homepage so, I had to add those. The task completion JavaScript depends on mdn.Notifier.growl which lives inside components.js.

That was not included on the new homepage. Including that though breaks because components.js depend on jQuery which is not added to the new homepage.

This means I need to add jQuery(and all of the above) to the homepage just to be able to show the task completion survey. @atopal should I continue down the rabbit hole, or should I abondon it?

atopal commented 4 years ago

Ah, alright, let's drop this. As long as nothing is broken on the home page, this bug is done. I filed https://github.com/mdn/kuma/issues/6522 to look into adding this to the home page.

schalkneethling commented 4 years ago

Ah, alright, let's drop this. As long as nothing is broken on the home page, this bug is done. I filed #6522 to look into adding this to the home page.

Thank you for the feedback Kadir.

schalkneethling commented 4 years ago

Tested on both localhost.org as well as wiki.localhost.org with and without being signed in. Also confirmed that task-completion.js is not loaded on the page.