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

Use disclosure widget to show/hide more details in challenges #54190

Open
lasjorg opened this issue Mar 22, 2024 · 6 comments · May be fixed by suyeon-cha/freeCodeCamp#2 or #54561
Open

Use disclosure widget to show/hide more details in challenges #54190

lasjorg opened this issue Mar 22, 2024 · 6 comments · May be fixed by suyeon-cha/freeCodeCamp#2 or #54561
Labels
help wanted Open for all. You do not need permission to work on these. scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. scope: UI Threads for addressing UX changes and improvements to user interface

Comments

@lasjorg
Copy link
Contributor

lasjorg commented Mar 22, 2024

Describe the Issue

I can't remember if we have talked about this before.

With the current editor layout explaining a concept and giving example code can get awkward. Because the instructions are inside the code it can push the code too far away from the instructions.

It would be nice to have the option to disclose more details and example code in the challenge text.

Base explanation

<details>
  <summary>More details:</summary>
  More detailed explanation and code example
</details>

Requirements

Affected Page

https://www.freecodecamp.org/learn

Your code




Expected behavior

Less shallow explanations because of limitations in the layout and allowing the camper to disclose more details as needed.

Screenshots

No response

System

  • Device: [e.g. iPhone 6, Laptop]
  • OS: [e.g. iOS 14, Windows 10, Ubuntu 20.04]
  • Browser: [e.g. Chrome, Safari]
  • Version: [e.g. 22]

Additional context

No response

@lasjorg lasjorg added scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. scope: UI Threads for addressing UX changes and improvements to user interface status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. labels Mar 22, 2024
@ShaunSHamilton
Copy link
Member

I think this should just require a CSS fix so the summary does not appear like this:
image

Clicking on it still works, but does cover the code (not sure if this is better or worse):
image

@Sembauke
Copy link
Member

Why not make the upper-jaw scrollable? Make it have a fixed height and a shown scrollbar, when needed.

@lasjorg
Copy link
Contributor Author

lasjorg commented Apr 12, 2024

That doesn't hide the content.

The idea is to have more information if the camper needs it, without having it take up space before they need it. Or just quickly toggle it visible/hidden as needed.

@Sembauke Sembauke added help wanted Open for all. You do not need permission to work on these. and removed status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. labels Apr 15, 2024
@gova646
Copy link
Contributor

gova646 commented Apr 21, 2024

Could you please provide a more detailed explanation of the issue. Also can you please provide the links to the respeccive pages where the changes are required.In the link https://www.freecodecamp.org/learn/ I donot see summary in it.

@a2937
Copy link
Member

a2937 commented Apr 26, 2024

Okay so near as I can tell, we want the code examples collapsible. Which seems to be coming from right around here right? https://github.com/freeCodeCamp7/freeCodeCamp/blob/1cab4b5797a50618ab51dc91441167e983e3f715/client/src/templates/Challenges/components/prism-formatted.tsx

But here might be better too, as it sets up the examples. https://github.com/freeCodeCamp/freeCodeCamp/blob/1cab4b5797a50618ab51dc91441167e983e3f715/client/src/templates/Challenges/utils/index.ts

@moT01
Copy link
Member

moT01 commented Apr 28, 2024

Related: #52954

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Open for all. You do not need permission to work on these. scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. scope: UI Threads for addressing UX changes and improvements to user interface
Projects
None yet
6 participants