DiscPage: a plugin to create static pages and insert discussion balloons in the text

Hi Syl,
not sure if it’s always been there and/or on purpose but I’ve just noticed that the new topic button of the parent category of any discpage category is disabled, I assume there:
https://github.com/sylque/discpage/blob/b6da51a6d706d9b52864017ebffe25e13c7894fd/assets/javascripts/discourse/lib/lib.js.es6#L53-L54

Is it intended? It doesn’t seem to be the case on castafiore.org (I’m on ( 2aac657da7 ) and latest of discpage). Weirdly I don’t remember the balloon categories ever been hidden (but the new topic button is also disabled). I have two couples discpage/balloons categories, each couple in it’s own category.

Thanks @Benjamin_D.

Looks like a bug, I will investigate this more.

DiscPage does its best to prevent users from using the balloon category manually. The reason is that the balloon category is supposed to be applied automatically by DiscPage, when the user creates a new topic in a balloon.

To enforce this rule:

  1. DiscPage hides the balloon category from the category combo box in the “New Topic” dialog.
  2. DiscPage disables the “New Topic” button on the balloon category page.

Do you confirm this is what you see?

:+1: I do
And I can also confirm that the parent category is not hidden in the combo box in the new topic dialog

The issue has been fixed in v1.0.46 (more information here).

1 Like

I am confused and am seeking some guidance. We have a Standard account and I am wondering if this plugin can be installed at that account level. I am not seeing it listed on the page where our plugins options are.

What am I missing?
Do we need to upgrade to Business account to have it available to us?

I look forward to hearing. Thanks
Neil

Hi Neil,
I don’t know much about Discourse hosting plans, so maybe you should contact the Discourse team about that.
From what I can read here, I don’t think you can use DiscPage with a Standard hosting plan. My understanding is that you need an Entreprise hosting plan (or a self-hosted Discourse instance) if you want to be allowed to install any plugin.
Best,

1 Like

I found the Usage Instructions on Github for Adding Discussion Balloons to be a bit misleading…

The Readme says this… (and following these instructions, I could not get any balloons to appear)…

To add a balloon, add [dpgb id=myBalloonId][/dpgb] to your topic text.

For example:

## Introduction [dpgb id=intro][/dpgb]

The balloon id must contain only [a-zA-z_].

However I’ve discovered the following, and now the balloons do appear…

To add a balloon, in the Topic editor, the format should instead be…

[dpgb id=myballoonid] The section you want to highlight when the balloon is clicked, for your users to comment on, goes here in between these tags [/dpgb]

For example:

[dpgb id=intro] Introduction [/dpgb]

Also the id must contain only [a-z] (lowercase letters only).

You might also notice in my example below that extra spaces before and after the [dpgb=id] and [/dpgb] are not problematic.


So here is a sample of what I put in the Topic editor in my Discourse…

And here is how the resulting page looks…

Hmm… when I click the orange balloons the page does slides in to halves, but when I click the + New Topic button in the Right panel…

… the Topic editor slides up from the bottom, so I use that to write my Topic …

… but then after I save it, it’s not connected to the Page Topic, and still there is no Topic list in the Right panel…

Anyone have thoughts about What is happening (or not happening that is supposed to happen) here?

Here is the live page:

Thanks @denvergeeks , I will have a look later today.

I see 4 issues here:

Inserting [dpgb id=myBalloonId][/dpgb] at the end of a heading (in order to select the heading and following paragraphs, as documented here) doesn’t work anymore. Let’s follow up with the issue here.

Placing [dpgb id=myBalloonId]Some text here[/dpgb] around a text (in order to select that text only) is undocumented. Let’s follow up with this issue here.

The id must contain only [a-z ] (lowercase letters only)

@denvergeeks, this probably happens because you set force_lowercase_tags=true in your Discourse settings (or maybe it’s the default value). I’m surprised you were hit by this, because in that case the balloon should have been replaced by a warning:

When hovering over the red “DiscPage Error”, you should get the following error message:

Balloon id has uppercase. This doesn’t fit force_lowercase_tags=true in Discourse settings. Fix: either make your balloon id all lowercase, or set force_lowercase_tags to false.

The same error message is also printed in the console.

If the above doesn’t work for you, please create an issue in Github so that we can discuss further.

@denvergeeks, you describe another issue where creating a topic doesn’t work. I cannot reproduce this, so we’ll need to interact more. Please create a separate Github issue.

Thank you @syl – I appreciate your responses :nerd_face: and glad to see that you are still around here!

I will continue over on the DiscPage Github Issues Cue

Thank you so much @syl as of DiscPage v1.0.52 everything appears to be working again!!! (I sure do love this plugin :nerd_face: )

1 Like

I can not go to your new demo

502 Bad Gateway
1 Like

Thanks, let me have a look.

1 Like

The demo is back online (link: DiscPage Demo - Castafiore).

3 Likes

I must be missing something obvious…

After clicking an orange balloon, the associated Topic List slides in from the right, but then I can find no button to create a comment on the portion of text associated with the orange balloon.

I meticulously followed the setup instructions on the Github page.

I have a category Page with all of the the proper security settings…

Please advise!

EDIT: For others who find this problem (and for my future self) – The below Theme Component was the cause.

Once I disabled that theme component… the button to create a New Topic appeared and everything worked as expected :smiley:

TWO MORE THINGS…

  1. Other Themes besides the Default Discourse Theme can result in wonky unusable layouts, so if you are seeing these types of mis-behaviors try using the Default Theme.

  2. If the Sidebar Menu is enabled in the Navigation Menu settings, that sidebar menu will show up within the comments slide-in only to confuse users, so I needed to use either the Header Dropdown or the Legacy to prevent this. (Alternatively, you can use the Side Menu navigation on your site, but use CSS to hide it on the DiscPage category.)

2 Likes

Bug report. When this plugin is enabled, it causes this strange rendering anomaly.

1 Like

Hey @Hifihedgehog , thanks for the report. I will have a look.

1 Like

@Hifihedgehog ,

I’ve create an entry to discuss the issue:

I couldn’t reproduce the problem yet. However, I’ve just published a new version of the plugin (1.0.53), which fixes some other layout issues with the last version of Discourse. Would you please install this new version and let me know if the problem is still there?
Thanks.

1 Like

I just gave it a try. The bug persists. I get it while in portrait mode on my Surface Pro 8 near the bottom of a topic.

1 Like