topcoder-platform / micro-frontends-forums-app

MIT License
1 stars 1 forks source link

[$200] Investigate linking into forums MFE #9

Closed jmgasper closed 2 years ago

jmgasper commented 3 years ago

@atelomycterus - I'm hoping you and @yoution can work together to figure out a good solution to link into the forums MFE. For instance, from the challenge listing or from Work Manager or from registration emails / notifications from the forum. Is there a way we can support deep links in the MFE / embedded Vanilla?

Screen_Shot_2021-12-01_at_9_18_13_am Screen_Shot_2021-12-01_at_9_23_00_am
jmgasper commented 3 years ago

Challenge https://www.topcoder.com/challenges/a4415324-131a-4348-adff-c13c124e04a3 has been created for this ticket.

This is an automated message for ghostar via Topcoder X

jmgasper commented 3 years ago

Challenge https://www.topcoder.com/challenges/a4415324-131a-4348-adff-c13c124e04a3 has been assigned to obog.

This is an automated message for ghostar via Topcoder X

yoution commented 3 years ago

@atelomycterus can you update the backend code? can we use the http 301 code to redirect to the mfe forum from old forum url?

atelomycterus commented 3 years ago

@yoution Yes, we can. I am working on it. Keep you updated on it.

atelomycterus commented 3 years ago

@jmgasper @yoution I fixed the backend. Please apply PR-https://github.com/topcoder-platform/forums-plugins/pull/105. Thanks!

Go to https://vanilla.topcoder-dev.com/dashboard/settings/plugins. Set Micro Frontends Forums URL (e.g. https://platform.topcoder-dev.com/forums) and click on Save. image

If user clicks on 'https://vanilla.topcoder-dev.com/categories/657cf9d1-469a-4c6e-a1a2-dd8b29106433' , Vanilla Forums should redirect to https://platform.topcoder-dev.com/forums/#/categories/657cf9d1-469a-4c6e-a1a2-dd8b29106433.

REST API + Vanilla admin dashboard should work without any issues. Let me know if you see any issues or unexpected behavior.

@yoution Please let me know if embed.js should be updated.

jmgasper commented 2 years ago

@atelomycterus / @yoution - This appears to be working. Sporadically, I am seeing the following error, but I'm chalking that up to a load balancer issue. Can you please check as well?

Screen_Shot_2021-12-05_at_9_10_37_pm
atelomycterus commented 2 years ago

@jmgasper Yes, I see this issue. It happens sporadically. I'll look at Vanilla source code. image

atelomycterus commented 2 years ago

@jmgasper Please apply PR-https://github.com/topcoder-platform/forums/pull/644.

I added two Vanilla params in bootstrap. Vanilla forum is embedded by default.

$Configuration['Garden']['Embed']['Allow'] = true; // Vanilla forum is embedded
$Configuration['Garden']['Embed']['ForceForum'] = true; // Force the forum to only be accessible through the mfe url 

After deploying the mfe url should be configured manually at (https://vanilla.topcoder-dev.com/embed/settings). We can configure it automatically using env vars. Please define a new env variables for dev/prod in GitHub. Let me know the env variable's name to add it in config.php.

Let's deploy it and verify it.

atelomycterus commented 2 years ago

@jmgasper I tested it. It looks fine, no errors: image

jmgasper commented 2 years ago

Payment task has been updated: https://www.topcoder.com/challenges/a4415324-131a-4348-adff-c13c124e04a3 Payments Complete Winner: obog Copilot: ghostar Challenge a4415324-131a-4348-adff-c13c124e04a3 has been paid and closed.

This is an automated message for ghostar via Topcoder X