-
-
Notifications
You must be signed in to change notification settings - Fork 38.8k
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
fix: order imports and remove circular dependencies #41824
fix: order imports and remove circular dependencies #41824
Conversation
7cf87c1
to
25e2612
Compare
I didn't notice any inconsistencies in the UI. I am still investigating the action. |
So when you create an asyc type, the complete and error versions get created automatically. freeCodeCamp/client/src/utils/createTypes.js Lines 11 to 15 in e59ad6e
|
That's interesting, thanks Ahmad. It explains why it wasn't completely broken! I will need to look into why the tests started failing, though. |
@ahmadabdolsaheb mystery solved. You were spot on - there was no need to add With that in mind, I think (short of introducing bugs) the only change this might have introduced is to the CSS. And that should be limited to the challenge pages. |
Do we want to give this one more go? |
Sure. I'll take a stab at it tomorrow. We might need a small freeze, though. |
Sure. |
redux depended on templates/Challenges/redux and vice versa. This meant that import order mattered and confusing bugs could arise. (cherry picked from commit 7d67a4e)
Import order generally does not matter, but there are edge cases (circular imports and css imports, for example) where changing order changes behaviour (cherry picked from commit b8d1393)
This brings the classic Show closer to the others as they now all create the description and title components
(cherry picked from commit 51a44ca)
(cherry picked from commit 25e2612)
7dc4ad5
to
6c68517
Compare
@raisedadead I removed the prettier changes and brought everything up-to-date. Ironically, ordering the inputs was not enough to get rid of these warnings:
because of nested imports. That's why I changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Despite that warning, everything seems to look good locally. 🙂
Huh. It's weird that we don't have that rule. Let me see about adding that and fixing the issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been around for a while, I think, https://github.com/freeCodeCamp/freeCodeCamp/runs/3204052148?check_suite_focus=true#step:9:221 and doesn't seem to be breaking anything |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than what Nick said, LGMT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I looked this over and tested it pretty thoroughly - didn't find any issue. LGTM 👍
* rename to TS * update import * migrate with-instant-search * change falsy values to empty string * update import order Finish resolving conflict from #41824 * update import order for search-bar * update setTimeout() type
The goal here was just to simplify the linting/formatting and order the the imports so that webpack would know how to order the css imports. This has worked, but we should audit the css, since the declaration order has probably changed.
However, reordering the imports showed that several modules had circular dependencies since they broke when the order changed. To fix this I separated out the offending code (types for actions) to flatten out the dependencies.
This did not fix
redux/settings
however, since there was a missing type,updateUserFlagComplete
. I don't know how everything functioned without it, but I created it anyway.