Skip to content

Comments

fix(client): update text container for fsd lessons#65889

Open
AdityaSingh-18 wants to merge 3 commits intofreeCodeCamp:mainfrom
AdityaSingh-18:fix/update-text-container-for-fsd-lessons
Open

fix(client): update text container for fsd lessons#65889
AdityaSingh-18 wants to merge 3 commits intofreeCodeCamp:mainfrom
AdityaSingh-18:fix/update-text-container-for-fsd-lessons

Conversation

@AdityaSingh-18
Copy link
Contributor

@AdityaSingh-18 AdityaSingh-18 commented Feb 15, 2026

Checklist:

Closes #63699

This PR is to update the text container for fsd lessons to make the lesson content width consistent and less wide, while keeping the interactive editor width unchanged.

Changes Made:

  • Made the width of the text container the same as in non-interactive editor lessons
  • The code blocks inside the interactive editor boundary have the same width when the interactive editor is disabled to maintain consistency
  • When the interactive editor is enabled, it is displayed with a wider width compared to text content
  • Shrunk the editor a little and added margin between text and editor

@AdityaSingh-18 AdityaSingh-18 requested review from a team as code owners February 15, 2026 13:59
@github-actions github-actions bot added the platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. label Feb 15, 2026
@AdityaSingh-18 AdityaSingh-18 marked this pull request as draft February 15, 2026 17:33
@AdityaSingh-18 AdityaSingh-18 marked this pull request as ready for review February 16, 2026 07:25
@raisedadead raisedadead requested a review from ahmaxed February 17, 2026 17:35
@moT01 moT01 added the status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. label Feb 19, 2026
Copy link
Member

@moT01 moT01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one comment about the code - maybe fine to just leave it. Regarding the UI - it's not bad...

image Image

The text is more readable, but the editor feels a little wide. I shrunk the editor and added some margin above and below to check it out (text is the same width):

image Image

Looks a bit better in my opinion. For the most part, I think that's enough room in the editor to show the code and preview. There may be a few spots where it feels a bit crowded in the editor - couldn't actually find any. I think I would do something like that, what do you think @AdityaSingh-18?

Comment on lines +280 to +283
if (
nodule.type === 'interactiveEditor' &&
showInteractiveEditor
) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like there's some extra logic happening here. We have pretty much the same check in the renderNodule function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct me if I’m mistaken, but although the checks look similar, they serve different purposes. The renderNodule function is used for rendering the data, while the map() function is for layout wrapper.

So currently, when nodule.type is interactiveEditor and the editor is ON, it is rendered directly at full width. For all other nodules or when the editor is OFF, the <Col /> wrapper is applied to display data like in non-interactiveEditor lectures.

@AdityaSingh-18
Copy link
Contributor Author

Yes, I agree with slightly shrinking the editor. After adjusting the text width, the editor does feel a bit too wide in comparison.

Also I saw a PR on adding the navbar on the review pages. I currently don't have much idea about how it will works, but I think it would be helpful otherwise the navbar might overlap or cut the editor content.

@AdityaSingh-18
Copy link
Contributor Author

@moT01 I have shrunk the editor and added margin. Please let me know if any changes are needed.

Image

image

(Also should I remove those comments in code?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update text container width for fsd lessons

2 participants