Skip to content

WIP - Implement New Forums Object #5041

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rootelement opened this issue Oct 3, 2020 · 9 comments
Closed

WIP - Implement New Forums Object #5041

rootelement opened this issue Oct 3, 2020 · 9 comments
Assignees
Labels
Milestone

Comments

@rootelement
Copy link
Contributor

rootelement commented Oct 3, 2020

The challenge object will now have a discussions node. The logic on the frontend should be:

  1. If the challenge object has a discussions object, loop through it and look for type: challenge.
  2. If it has type: challenge, build a link for the <a href="{url}">{name}</a>
  3. If there is no discussions node, if there is no type challenge, or if the type challenge has no url, default back to looking for the legacy.forumId that you do now.

Note, it is valid to have multiple type challenge nodes, so the frontend code should list them in a <ul> type list. Order of the array is fine, you don't need to sort them alphabetically or anything.

Example Challenge Object

{
  ...
  "discussions": [
    {
       "name": "Challenge Discussions",
       "type": "challenge",
       "provider": "vanilla",
       "url": "https://vanilla.topcoder-dev.com/forum/group/discussionid",
       "options": [{ "key": "foo", "value": "bar" }]
    }
  ]
}

The options array has nothing currently on the challenge forum. That's for future-proofing if we need to do registration for slack, or some other setup for other providers. Ignore that for now for Vanilla challenge forums.

Reference Issue:
topcoder-platform/challenge-api#290

@rootelement
Copy link
Contributor Author

This is working in dev. I created this challenge in work manager:
https://challenges.topcoder-dev.com/projects/16640/challenges/6f87e86b-5694-4547-b267-35f3ddd87906/view

The challenge object looks like this:

"discussions": [
        {
            "provider": "vanilla",
            "name": "Forum Creation Test Discussion",
            "id": "a730ce22-20f7-4566-b99f-ba8901999a31",
            "type": "challenge",
            "url": "https://vanilla.topcoder-dev.com/categories/6f87e86b-5694-4547-b267-35f3ddd87906"
        }
    ],

@Oanh-and-only-Oanh FYI

@rootelement
Copy link
Contributor Author

@Oanh-and-only-Oanh @luizrrodrigues do you have an ETA for this to be in Dev? We'd like to start E2E testing.

@luizrrodrigues
Copy link
Collaborator

@rootelement I'll push to QA env shortly

luizrrodrigues added a commit that referenced this issue Oct 13, 2020
@luizrrodrigues
Copy link
Collaborator

luizrrodrigues commented Oct 13, 2020

@rootelement Done, deployed in QA env:
https://qa-community-app.topcoder-dev.com/challenges

Note: Applied logical above to Challenge Details. But we need discuss as change to Challenge Listing page and Challenge Card, both not support multiple forums link.

@rootelement
Copy link
Contributor Author

Thank you sir, We are testing.

I'm thinking we shouldn't show the forum link until the person is registered on the challenge? I will check that. We might not send it on the forum object if the person isn't registered. Not sure yet.

Good so far. Don't worry about multiple yet.

@rootelement
Copy link
Contributor Author

@Oanh-and-only-Oanh i thought this went out with the last release. This not being in prod will prevent us from using new forums on things launched out of Work Manager.

@sushilshinde can this functionality go out first thing your daytime?

cc: @mtwomey

@SathyaJayabal
Copy link
Collaborator

@rootelement @luizrrodrigues , able to see the forums link on details page even without logging in or registering to the challenge
Screenshot 2020-11-12 at 8 56 09 AM

@SathyaJayabal
Copy link
Collaborator

@rootelement @luizrrodrigues , while testing on prod backend,

  1. created a challenge through WM
    https://staging-community-app.topcoder.com/challenges/e4c77f3b-fd3c-4591-bad5-03b17b527d55

  2. Do not see the new forums link on details page because the vanilla forum url is missing in the discussions object

Screenshot 2020-11-12 at 9 29 21 AM

@SathyaJayabal
Copy link
Collaborator

SathyaJayabal commented Nov 12, 2020

@luizrrodrigues @Oanh-and-only-Oanh
Admin user and registered user able to view "Challenge Discussion" link and link opens new vanilla forums in new tab. As expected

Screenshot 2020-11-12 at 10 34 47 AM

forums.mov.zip

Not logged in or not registered users not able to see "Challenge Discussion" link as expected.
Screenshot 2020-11-12 at 10 33 10 AM
Screenshot 2020-11-12 at 10 33 39 AM

But for some Challenges, the Discussions object does not have the URL field and hence even new challenges created using WM point to the old forums.
Example:
Prod backend: #5041 (comment)
Dev backend: https://community-app.topcoder-dev.com/challenges/f008b241-864a-47a8-9b0d-c07b0b0c66ca
Screenshot 2020-11-12 at 10 41 41 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants