The discussion revolves around a feature request to modify Discourse’s embedding behavior so that a new topic is only created when a user clicks a “Start Discussion” link, rather than automatically upon page load. icaria36 proposes this change to prevent unwanted topic creation by bots and to improve user experience. The idea is to add a rel="nofollow" to the link and open it in a new tab, with the topic creation triggered by a JavaScript event. joebuhlig suggests this could be implemented as a plugin or a pull request (PR), with a new /comments route that accepts url and user-click parameters. sam adds that the topic should only be created if the user is logged in and actively clicks to comment, with a loading state shown during creation. eviltrout agrees with the approach and highlights the need for a smooth interstitial during topic creation.
Currently when Embed Discourse comments on another website via Javascript, a new Discourse topic is created whenever the corresponding external page is being loaded. The feature requested consists on creating the topic only when a user would click the “Start Discussion” link in the external page.
Details:
This preference could be defined per host at /admin/customize/embedding.
The “Start Discussion” link would include a rel="nofollow" in order to avoid as much as possible the creation of pages by bots.
The link would open in a new tab, in order to assure that the user doesn’t end accidentally in nowhere’s land, also to give a little more time to the new topic to be created.
When do you need it done?
No rush.
What is your budget, in $ USD that you can offer for this task?
Every feature has a price. I have cut as much complexity as possible in this request with the intention of making it more affordable. I’m a hobbyist willing to invest in the solution to this problem. If I cannot afford it alone, I might ask others to help co-funding.
Hey there, Quim! I might be able to help you out here.
I was reading through the other topic on this and had a hard time nailing down what the exact process is that you want to support and whether or not it should be a PR or a plugin.
Are you wanting to follow @eviltrout’s process for it or do you want to go with your concept?
I’d rather go for this minimalistic concept. In principle it solves my problem and I believe it would alleviate the problem of whoever is bothered about the current behavior. Any development going deeper into this direction should probably pass through this development stage, I guess.
PR or plugin, I don’t have enough knowledge to decide. The other thread is tagged pr-welcome. Then again, if a plugin would make the process simple for starters, so be it. I guess it would not be difficult to turn the plugin into a core feature if this is wanted in the future.
In other words, because my potential budget is humble, I will take the simplest route that provides this feature.
My sense is that a PR would be the better route here. But let me pose the concept as I understand it:
This would create a new /comments route that requires two parameters: url and user-click. This URL would be used under the “Start Discussion” link.
The user-click parameter would be appended by javascript when clicked to stop crawlers from triggering it.
If a topic already exists for the embed url passed as a parameter, then the user is redirected to that topic.
If the topic does not exist, the topic is created as per usual.
My biggest question is around settings. Is this intended to be the default way this should work or is this a setting enabled in the embed setup? We may need someone from the team to answer that one. Especially if this is to be a PR.