Skip to content

[$600] Embedded theme vs. real site #648

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
jmgasper opened this issue Jan 4, 2022 · 7 comments
Closed

[$600] Embedded theme vs. real site #648

jmgasper opened this issue Jan 4, 2022 · 7 comments

Comments

@jmgasper
Copy link
Collaborator

jmgasper commented Jan 4, 2022

@atelomycterus - One request that's coming in for a new app is to be able to embed specific forums in an MFE.

The wrinkle is that the main site (discussions.topcoder.com) will continue to work as it does now, with the existing header / footer, but the embedded forums on the new app won't show:

  • Header
  • Footer
  • Side menu navigation

Eventually, the embed it will just be a very limited view into the "group" page - Code Questions, Code Documents, etc...

Can we do this with a custom embed.js?

@jmgasper
Copy link
Collaborator Author

jmgasper commented Jan 4, 2022

Challenge https://www.topcoder.com/challenges/d08265a4-0057-4708-87de-bc7d24a7f9da has been created for this ticket.

This is an automated message for ghostar via Topcoder X

@jmgasper
Copy link
Collaborator Author

jmgasper commented Jan 4, 2022

Challenge https://www.topcoder.com/challenges/d08265a4-0057-4708-87de-bc7d24a7f9da has been assigned to obog.

This is an automated message for ghostar via Topcoder X

@atelomycterus
Copy link
Collaborator

atelomycterus commented Jan 5, 2022

@jmgasper The current progress: 
 - I added mfe template in Topcoder theme. So footer + header, nav bar and search field are hidden in MFE but  no changes for the main forum. So we use the Topcoder theme for both cases.
 
 - I managed to show categories by challengeID. I am testing it locally using in a frame. I'm going to test it with MFE tomorrow.
 I think we need to hide 'home'->'challenge forums' -> 'Development' or show it as plain text.
image

@jmgasper
Copy link
Collaborator Author

jmgasper commented Jan 5, 2022

@atelomycterus - That's great, thanks for the update!

@atelomycterus
Copy link
Collaborator

atelomycterus commented Jan 6, 2022

@jmgasper Please set two parameters before 'http://vanilla.topocder-dev.com/js/embed.js' to embed a list of categories by challengeID in micro-frontend app.
Example:

  <script>
      var vanilla_category_id ='69cb5726-8bcc-4b56-b45a-a9b85e91e4ed'; // Topcoder Challenge ID
      var vanilla_embed_type = 'mfe'; // This parameter is used in Vanilla
    </script>
    <script type="text/javascript" src="http://vanilla.topocder-dev.com/js/embed.js">

Please apply PRs:
#651
topcoder-platform/forums-plugins#107
topcoder-platform/forums-theme#64

Let me know if you need any help to integrate with micro-frontend apps.

Thanks!

Tests

Tested with hard-coded challengeID locally with mfe-forums-app.

The list of categories for a challenge.
image

The list of discussions
image

The Discussion with comments
image

@jmgasper
Copy link
Collaborator Author

jmgasper commented Jan 6, 2022

@atelomycterus - Thanks for this. We should have this integrated into the self service app and deployed in dev for testing sometime tomorrow.

@jmgasper
Copy link
Collaborator Author

jmgasper commented Jan 6, 2022

Payment task has been updated: https://www.topcoder.com/challenges/d08265a4-0057-4708-87de-bc7d24a7f9da
Payments Complete
Winner: obog
Copilot: ghostar
Challenge d08265a4-0057-4708-87de-bc7d24a7f9da has been paid and closed.

This is an automated message for ghostar via Topcoder X

@jmgasper jmgasper added this to the v1.9 - Self service app milestone Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants