Copr integration


#1

I am one of the developers of Copr. I would love to integrate Copr with discussion.f.o. What can I do for it?

I would probably like to have a category named “Copr projects” and have a topic for each project (we have 9k projects) and have it embedded on each copr project page. Is it feasible?

I discovered https://meta.discourse.org/t/embedding-discourse-comments-via-javascript/31963 which state that admin has to enable the embedding.


#2

I created the Copr category with a description and gave you moderator rights for Discourse - it would certainly be doable to create a topic for each project. It seems a lot but it’s just 9000 rows in a database so it should be fine.

Shall we go ahead and do this? Others’ thoughts?


#3

In the page I linked in comment 0 is stated that those topics are created automatically once the embeded code on the page is called. We can try it.


#4

I tried to create a page with an embedded comment and I get " Error Embedding".

I guess that is because in admin section I cannot find and do this step: Admin > Customize > Embedding. @sanja can you do something about it?


#5

Yes - see my email just now. Should work once all settings for the embedding host are set up. Looking forward to see it working.


#6

I configure (btw it seems that path whitelisting does not work, but I can leave it) and now I have:

https://copr-fe-dev.cloud.fedoraproject.org/coprs/g/mock/mock/

Which does not work. While artificial

https://copr.fedorainfracloud.org/test.html

works. And I do not know why the first one does not work. Any idea?


#7

So I am a bit concerned that it just overload the main index page. Is there a way to have a more balanced view, or just hide copr from that ?

Cause if suddenly, there is 9000 topics, there will likely be lots of discussions. My screen show 12 lines. So if each copr topic receive a message every 2 years (cause 12 * 365 * 2 => 8760 messages, so kinda 9000), the main page would show 12 discussions on copr, and any discussion older than 1 day would be pushed down.

And 1 message every 2 years is not that much traffic per package, and so that’s not exactly great IMHO.


#8

I just ticked “Suppress category from latest topics.” and it no more appears on the front page.


#9

Hello, is it possible for a user to reply directly on a page where discourse is loaded in the embedded mode? We would like this option very much in our Copr projects. See e.g. here: https://copr-fe-dev.cloud.fedoraproject.org/coprs/g/mock/mock/. Needing to jump back and forth to comment wouldn’t be very pleasant experience for our users.


#10

@sanja Can you please grant @frostyx the admin rights. He will try to tune CSS for embedding according to https://patdavid.net/2017/05/styling-discourse-embeds/

@frostyx I already set the class for Copr elements to copr-discussion, so you need to define a style for these classes.


#11

I find that I can grant it myself. Done. So when you will be revoking my admin rights later, include @frostyx as well.


#12

Ok, let me know when it’s finished.


#13

ping on answering in the embedded mode?


#14

@clime I haven’t found a way for that yet. :confused: Maybe we could implement that but that’s not gonna change for a while still then. Anyone else?


#15

@sanja: thank you for looking at it. This is quite important feature for us. This discussion forum here is a fine thing but we would like our users to stay on Copr site when they encounter some interesting project and they would like to comment.


#16

@msuchy @clime Shall we consider this not working for the COPR purpose then?

https://meta.discourse.org/t/embedding-discourse-comments-via-javascript/31963 says that “One important thing to note with this setup is that users have to navigate to your forum to post replies . This is intentional, as we feel that the posting interface on a Discourse forum is currently much richer than what we could embed via Javascript.” - that’s a shame but not something we can currently change (not easily or quickly anyway).


#17

We need to discuss it first in our team properly.


#18

On our team meeting, we did not come to 100% conclusion that we want it. So we are going postpone the work on this. @sanja you can revoke my and @frostyx admin rights. We may revisit this later.

For now, thank you for the co-operation.

For anyone interested in, here is the original PR for Copr https://pagure.io/copr/copr/pull-request/364


#19

Doing that - also deleting the COPR category for now, if that’s alright with you? For apps in general, there is the “Apps and Gaming” category.