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

Finish upgrading frontend frameworks (formerly BD-39) #31616

Closed
kdmccormick opened this issue Jan 19, 2023 · 12 comments
Closed

Finish upgrading frontend frameworks (formerly BD-39) #31616

kdmccormick opened this issue Jan 19, 2023 · 12 comments
Labels
epic Large unit of work, consisting of multiple tasks maintenance Routine upkeep necessary for the health of the platform

Comments

@kdmccormick
Copy link
Member

kdmccormick commented Jan 19, 2023

What needs upgrading

Background

The original scope for the BD-39 project was to upgrade React and Paragon. Upgrading Paragon would involve other upgrades, including: removing edx-bootstrap, upgrading bootstrap, and upgrading libsass-python.

React was upgraded 🎉 , but the Paragon was not.

Abandoned PRs include:

@kdmccormick
Copy link
Member Author

From a DevExp lens, I'm interested in this because the libsass upgrade likely blocks #31607, which is part of #31604.

@kdmccormick
Copy link
Member Author

FYI @arbrandes , @davidjoy , and @jmbowman . I dropped this into the Frontend Dev WG project.

@leangseu-edx
Copy link
Contributor

For whoever pick this up, make sure

@kdmccormick
Copy link
Member Author

This is related to, or perhaps entirely duplicated by, this platform-roadmap issue: openedx/platform-roadmap#15

@arbrandes arbrandes added the maintenance Routine upkeep necessary for the health of the platform label Jan 23, 2023
@arbrandes arbrandes moved this to Backlog in Frontend Working Group Jan 23, 2023
@arbrandes arbrandes added the epic Large unit of work, consisting of multiple tasks label May 23, 2023
@arbrandes arbrandes moved this to Backlog in Open edX Roadmap May 23, 2023
@kdmccormick
Copy link
Member Author

Tentatively assigning @andrey-canon , who had an idea of how to approach this.

@adamstankiewicz
Copy link
Member

Figured it's worth leaving a mention of openedx/wg-frontend#166 in this issue, given it mentions upgrading React. Not sure if this issue now intends to be only about the Paragon upgrade or also still about getting React upgraded to latest v18 as well?

@kdmccormick
Copy link
Member Author

The current libsass version, 0.10.0, doesn't seem to support Python 3.10:

(venv) ~/openedx/edx-platform 🍀 python3
Python 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sass
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/kyle/openedx/edx-platform/venv/lib/python3.10/site-packages/sass.py", line 733, in <module>
    class SassMap(collections.Mapping):
AttributeError: module 'collections' has no attribute 'Mapping'
>>> 

So this might become an issue sooner than later.

@kdmccormick
Copy link
Member Author

Confirmed that this is due to a breaking change in Py 3.10. From https://docs.python.org/3.9/library/collections.html#module-collections:

Deprecated since version 3.3, will be removed in version 3.10: Moved Collections Abstract Base Classes to the collections.abc module. For backwards compatibility, they continue to be visible in this module through Python 3.9.

@adamstankiewicz
Copy link
Member

adamstankiewicz commented Jul 14, 2023

What needs upgrading

  • Paragon
    • Current: ??
    • Desired: ??

(FWIW, the Paragon library and its associated documentation site supports (nearly) the latest Dart Sass version via the sass NPM package as of v17.5.1).

In terms of what the desired version of Paragon is to install into edx-platform is definitely questionable. Do we intend to keep Paragon up-to-date moving forward in this repo even though we're been migrating the UIs out of edx-platform in favor of MFEs? When the design tokens / CSS variables approach to theming comes in the near future (next 2-3 months 🤞), it may have fairly large implications for edx-platform (and other legacy UIs) that heavily rely on custom SCSS/mixins should these legacy UI repos plan to upgrade to a future design tokens-based version of Paragon; as far as I can tell, we don't have a way to be backwards compatible (i.e., supporting both pre and post design tokens style architectures together from Paragon's POV).

It's also still a bit unclear to me about the strategy to support the older @edx/paragon alongside a latest @edx/paragon-new. I believe the intent is to support incremental migration from old Paragon to later Paragon, but I'm not personally sure if the styles between old and new conflicted at all, causing odd style regressions that may be difficult to identify.

@kdmccormick
Copy link
Member Author

The impression I've gotten from @arbrandes and from TNL is that we are on a sort of bold sprint towards finishing the MFE-ification of edx-platform for everything except XBlock views. If that's true I don't think upgrading Paragon in edx-platform would be a wise use of engineering time. My hope is that we can leave comprehensive theming in place, relatively untouched, until the the final micro-frontend is available in the community release, at which point we deprecate it.

Libsass is a bit different because (a) it'll hard-block our next Python upgrade, and (b) unlike Paragon, it's used all across our core XBlock views. I've written about React-ifying XBlock views but so far nobody has bitten at picking up that discovery.

@kdmccormick
Copy link
Member Author

UPDATE: The Python upgrade no longer depends on upgrading libsass-python due to: #34439

It would still be nice to get off libsass-python, but we are "safe" to leave libsass-python pinned to its ancient 0.10.0 version for the forseeable future.

@jmakowski1123
Copy link

Since we aren't going to actively pursue this in FY25, I'm going to close for now and we can reopen a ticket if/when we do pursue.

@github-project-automation github-project-automation bot moved this from Backlog to Closed in Frontend Working Group Apr 1, 2024
@kdmccormick kdmccormick closed this as not planned Won't fix, can't repro, duplicate, stale Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Large unit of work, consisting of multiple tasks maintenance Routine upkeep necessary for the health of the platform
Projects
Status: Closed
Development

No branches or pull requests

5 participants