Skip to content
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

feat: Add support for loading themes at runtime #558

Closed
wants to merge 3 commits into from

Conversation

xitij2000
Copy link
Contributor

@xitij2000 xitij2000 commented Aug 23, 2023

Description

This PR updates this repo to use the version of Paragon with design tokens, and runtime theming.

How Has This Been Tested?

To test the changes in this PR you need to set things up as follows:

  1. Run npm install --legacy-peer-deps to install the packages. This is installing current WIP versions so this allows installation despite conflicts.
  2. Create module.config.js file with the following contents:
module.exports = {
  localModules: [
    { moduleName: '@edx/frontend-platform', dir: '../frontend-platform', dist: 'src' },
  ],
};

Note that the 'dir' key above should point to where you've checked out frontend-platform to the correct version. i.e the version in pacakge.json
3. If using tutor, shut down the discussion MFE and add the following content to .env.private:

BASE_URL='http://apps.local.overhang.io:2002'
CREDENTIALS_BASE_URL='http://localhost:18150'
ECOMMERCE_BASE_URL='http://localhost:18130'
LMS_BASE_URL='http://local.overhang.io:8000'
LEARNING_BASE_URL='http://apps.local.overhang.io:2000'
LOGIN_URL='http://local.overhang.io:8000/login'
LOGOUT_URL='http://local.overhang.io:8000/logout'
MARKETING_SITE_BASE_URL='http://local.overhang.io:8000'
ORDER_HISTORY_URL='http://localhost:1996/orders'
REFRESH_ACCESS_TOKEN_ENDPOINT='http://local.overhang.io:8000/login_refresh'
APP_ID='discussions'
MFE_CONFIG_API_URL='http://local.overhang.io:8000/api/mfe_config/v1'

And add the following to webpack.dev.config.js:

const { createConfig } = require('@edx/frontend-build');
const config = createConfig('webpack-dev');
config.devServer.allowedHosts = ['apps.local.overhang.io'];
module.exports = config;

This will allow loading the MFE from apps.local.overhang.io:2002.

Screenshots/sandbox (optional):

Include a link to the sandbox for design changes or screenshot for before and after. Remove this section if it's not applicable.

Before After

Merge Checklist

  • If your update includes visual changes, have they been reviewed by a designer? Send them a link to the Sandbox, if applicable.
  • Is there adequate test coverage for your changes?

Post-merge Checklist

  • Deploy the changes to prod after verifying on stage or ask @openedx/edx-infinity to do it.
  • 🎉 🙌 Celebrate! Thanks for your contribution.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Aug 23, 2023
@openedx-webhooks
Copy link

Thanks for the pull request, @xitij2000! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

This is currently a draft pull request. When it is ready for our review and all tests are green, click "Ready for Review", or remove "WIP" from the title, as appropriate.

@itsjeyd itsjeyd added the waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. label Sep 13, 2023
@itsjeyd
Copy link

itsjeyd commented Oct 10, 2023

Hey @xitij2000, just to confirm, you're planning to come back to this PR at some point, right?

@itsjeyd itsjeyd added the core contributor PR author is a Core Contributor (who may or may not have write access to this repo). label Oct 17, 2023
@awais-ansari
Copy link
Contributor

Hey @xitij2000, Just to confirm. Do you still need this PR? We are planning to clean up all open PRs.

@awais-ansari
Copy link
Contributor

@xitij2000 closing this PR. Please reopen it whenever you start working on it. Thanks.

@openedx-webhooks
Copy link

@xitij2000 Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

1 similar comment
@openedx-webhooks
Copy link

@xitij2000 Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

@awais-ansari awais-ansari deleted the kshitij/design-tokens branch October 31, 2023 10:21
@itsjeyd itsjeyd added closed inactivity PR was closed because the author abandoned it and removed waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. labels Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed inactivity PR was closed because the author abandoned it core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants