Docuss conflict with plugin

I’m trying to add this plugin so we can have an explainer popup to new visitors to explain how they can use the site to help support vulnerable people near them through the coronavirus pandemic: https://github.com/tshenry/discourse-versatile-banner

It loads, and then loads our app over the top of it closing the popup. This is very similar to the bug we had with the header search bar: https://meta.discourse.org/t/search-banner-theme-component/122939

I suspect the issue is in the load order and Docuss would need to force itself to be 1st, so plugins and theme components load afterwards.

@syl what do you think and if you agree it needs to be fixed how long do you think it’ll take, as i want to get out platform out in the next day or two, so if it’ll take longer than 2 days i’ll try to find an alternative way to get a popup intro running. Perhaps in React.

@AndyatFocallocal, I will have a look tomorrow morning.

1 Like

I’ve left it active on here so you can see the behaviour live, i’m on Desktop and chrome. Also seeing it on Android. Its set to only show 1st time you visit the site so if you don’t see it try visiting here incognito.

I could also put the search bar on if you want to see that aswell. Its more disruptive to site useage so i’ll put it on when/if you want to see it. It seems to be using the same mechanism to load, and then Docuss loads our app and closes it.

We can discuss a change in Docuss, I will come back to this in a moment. But right now, Docuss seems to work as expected and there doesn’t seem to be a conflict with the “versatile banner” plugin.

In your “versatile banner” settings, you asked the banner to be displayed:

  1. on Discourse pages with urls containing /c/ and /t/, and
  2. on the Discourse home page, a page that is never displayed because it is hidden when the PHM home page is displayed instead. That is why you don’t see the banner on the home page.

Docuss has 3 separated areas:

  1. top of the screen: Discourse header
  2. left of the screen: user-defined web application (in our case: PHM)
  3. right of the screen: Discourse page

The “versatile banner” is only displayed in area 3, the Discourse area.

Maybe we could change this behavior and consider all banner plugins to be part of area 1 (Discourse header). However:

  • There might be technical issues, I’d have to investigate more.
  • This might cause other problems. Imagine one day you want to install a plugin called “banner for topics”, which displays a banner on top of all topics. Now imagine a split Docuss page with PHM on the left and the topic on the right. Do you really want your new banner to display in area 1? (i.e. on top of both PHM and the topic) Or is it more logical to consider that the banner should be displayed only in area 3? (on the right only, on top of the topic itself)

What do you think?

1 Like

@syl sorry for the late reply I’ve been thinking about it this morning as its trickier than i had realised.

From where i’m standing the simplest and most versatile solution would be a tick box in the admin section which allows users to select whether to use Discourse or their site as the homepage. In our use case that would mean i’d load Discourse as the homepage and put that plugin to full page to have a splash landing page we could design.

Of course we could just code a splash page in our platform, its just that we don’t have a React dev around here right now.

Any design decision on Docuss is of course your call. If you liked that idea i could see it offering increased utility to users, especially if you suggest the versatile banner plugin if they want a splash page to introduce the new system to their users.

i could also just edit our homepage temporarily i guess. so there is a work around

I think there’s an easier way : create your splash page as a static html page, create a corresponding json file, host both files on a free service (github, for example), and add the json file url as the first entry in your “docuss website json file” setting. It sounds like a more logical way than trying to design a home page with a banner plugin. What do you think?

1 Like

i’ll play around with it. I tend to spend about a day when creating a new html page and winding up distinctly unimpressed with how it turns out from a UX/UI point of view.

The plan of the pop up was that it was clear to the user that’s a welcome message and i wasn’t going to have a new splash page, just give them direct links to parts of our maps which have poor UX, and the new features for COVID 19. That idea doesn’t sound realistic right now given how Docuss positions the forum and app as the plugin is opening to the right which is hidden. I’ll play around with positioning, maybe i can use a css hack to push it back to the right, but i’m not expecting that will work

I will investigate the technical side of having banner plugins considered part of the header (thus visible even when the web app is full screen and the Discourse page is hidden).

1 Like

Unfortunately, I see no way to solve this. Docuss works because it doesn’t involve itself too much in Discourse display: it is displayed on top of Discourse, with a small “hole” at the top of the screen so that we can see the Discourse header. Being able to display an arbitrary-sized additional banner below the header would be very difficult.
So my advise is either to add a new Docuss home page (single html static page) or to add the splash message inside PHM.

1 Like

Ok thanks for that. I’ll find a solution.

i think there is still a small bug with the plugins loading 1st for a half second and then Docuss pushes them aside. Both this one and the search one they appear briefly while loading the page.