openedx / frontend-app-discussions

A React-based micro frontend for the Open edX discussion forums.
GNU Affero General Public License v3.0
6 stars 61 forks source link

testing: Using Paragon CSS External Hosting (JavaScript-based configuration) #726

Open PKulkoRaccoonGang opened 3 days ago

PKulkoRaccoonGang commented 3 days ago

Description

The JavaScript-based configuration approach allows the user to add Paragon CSS from external hosting.

module.exports = {
  PARAGON_THEME_URLS: {
    core: {
      urls: {
        default: 'https://cdn.jsdelivr.net/npm/@openedx/paragon@alpha/dist/core.min.css',
      },
    },
    defaults: {
      light: 'light',
      dark: 'dark',
    },
    variants: {
      light: {
        urls: {
          default: 'https://cdn.jsdelivr.net/npm/@openedx/paragon@alpha/dist/light.min.css',
        },
      },
      dark: {
        urls: {
          default: 'https://cdn.jsdelivr.net/npm/@edx/brand-edx.org@alpha/dist/light.min.css',
        },
      },
    },
  },
};

Info

Related PRs

openedx-webhooks commented 3 days ago

Thanks for the pull request, @PKulkoRaccoonGang! 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:

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.

open-craft-grove commented 3 days ago

Sandbox deployment successful 🚀 🎓 LMS 📝 Studio ℹ️ Grove Config, Tutor Config, Tutor Requirements

brian-smith-tcril commented 1 day ago

I assume this visual bug isn't related to the styles being delivered via CDN but I noticed it here so I figure documenting it is worth doing

Screenshot from 2024-07-05 11-18-13 Screenshot from 2024-07-05 11-18-08 Screenshot from 2024-07-05 11-18-03

dcoa commented 21 hours ago

I assume this visual bug isn't related to the styles being delivered via CDN but I noticed it here so I figure documenting it is worth doing

Hi @brian-smith-tcril, it's because of the styles loaded by the dark theme if you change your device theme to light, the default paragon styles will be loaded

dcoa commented 20 hours ago

Thank @PKulkoRaccoonGang, all the design token work is fantastic and looks good. 🥳

I noticed some changes that are not related to the design tokens but It's affecting the styles.

These lines (from PR https://github.com/openedx/frontend-app-discussions/pull/697) override font-size 14px and 16px affecting header and footer, not only the main area

This is how the dropdown is looking image

This is how supported to be (redwood) image

We can increase the specification of the rule to avoid affecting the header and footer, also we can use var(--pgn-typography-font-size-sm) instead of 14px

Also, this change made the submit button resize, which looks weird to me, I mean, the component usually has a weight resize when executing the summit (because the length of the text changes and an icon is added). However, due to the text reduction (but the icon maintains the original one) a height resize is added.

scrnli_7_6_2024_12-00-00 PM.webm

dcoa commented 19 hours ago

This is again not directly related to design tokens implementation, I'm not 100% sure if it's related to Paragon (that's why I highlight it) or the discussions implementation but the tabs course menu is not displaying the "more" button for responsive support during the first load, I have to resize the screen to make it work.

scrnli_7_6_2024_12-46-06 PM.webm

And again the changes from PR https://github.com/openedx/frontend-app-discussions/pull/697 are affecting the "more" button and the dropdown text size