sudheerj / reactjs-interview-questions

List of top 500 ReactJS Interview Questions & Answers....Coding exercise questions are coming soon!!
38.89k stars 9.24k forks source link

Table of Contents is too long maybe make it a collapsible section #273

Closed sahilbakoru closed 5 months ago

sahilbakoru commented 11 months ago

Table of Contents is too long maybe make it a collapsible section .

Just like shown below.

https://github.com/sudheerj/reactjs-interview-questions/assets/68190549/ecb2f42a-aee7-4c4d-b058-8d655ef7a351

Above video from this gist : https://gist.github.com/pierrejoubert73/902cc94d79424356a8d20be2b382e1ab#how-to-add-a-collapsible-section-in-markdown

sudheerj commented 11 months ago

The table of contents is helpful to see all the questions at the same time. If we close it by default, reader may not get idea to expand them.

sanketmali09 commented 11 months ago

In Markdown, you can create collapsible sections like the one you've shown using HTML

and elements, just as you've demonstrated in your example. Here's how to do it:

1.

Use

and : These HTML elements are used to define the collapsible section. The element is the clickable header that users will click on to expand or collapse the content. 2.

Place your content inside the

element: You can include any Markdown content, such as headings, lists, code blocks, or paragraphs, within the
element. This content will be hidden by default when the section is collapsed. 3.

Keep the

element concise: The element should provide a brief and meaningful label for the collapsible section. Users will click on this label to toggle the visibility of the content. 4.

Use indentation: While it's not required, indenting the content within the

element helps improve readability and maintainability, especially for larger sections of content. 5.

Use backticks for code blocks: If you want to include code blocks, as you did in your example, use triple backticks (```) to define the code block and specify the language (e.g., js for JavaScript).

Remember that the support for HTML in Markdown may vary depending on the platform or renderer you're using. Most Markdown renderers should support

and , but it's a good idea to test your Markdown documents in the specific environment where you intend to use them to ensure proper rendering and interactivity. On Tue, Oct 3, 2023 at 8:24 PM Sahil bakoru​ ​ ***@***.***> wrote: > Closed #273 > as > completed. > > — > Reply to this email directly, view it on GitHub > , > or unsubscribe > > . > You are receiving this because you are subscribed to this thread.Message > ID: > github.com> >
sahilbakoru commented 11 months ago

chat GPT is that you ?

sanketmali09 commented 11 months ago

Ok i will send you tomorrow

On Tue, 3 Oct, 2023, 10:43 pm Sahil bakoru​ ​, @.***> wrote:

Reopened #273 https://github.com/sudheerj/reactjs-interview-questions/issues/273.

— Reply to this email directly, view it on GitHub https://github.com/sudheerj/reactjs-interview-questions/issues/273#event-10541213730, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7GHGHXBP5UPOC4X27VT6S3X5RBU7AVCNFSM6AAAAAA5KZPOAGVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQGU2DCMRRGM3TGMA . You are receiving this because you commented.Message ID: <sudheerj/reactjs-interview-questions/issue/273/issue_event/10541213730@ github.com>

sahilbakoru commented 11 months ago

I have made a pull request for that, video and code is also there.

check the pull request : https://github.com/sudheerj/reactjs-interview-questions/pull/274

sudheerj commented 5 months ago

@sahilbakoru Thanks added