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

feat: added Faq section in overview #429

Conversation

Akshaybagai52
Copy link
Contributor

@Akshaybagai52 Akshaybagai52 commented Mar 3, 2024

What kind of change does this PR introduce?

Issue Number: #190

Screenshots/videos:

If relevant, did you update the documentation?

Summary

Does this PR introduce a breaking change?

Copy link
Collaborator

@benjagm benjagm left a comment

Choose a reason for hiding this comment

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

This is a great start. Thanks a lot!! I left some comment but this is moving in the right direction. Congrats!!

data/faq.json Outdated Show resolved Hide resolved
@@ -0,0 +1,25 @@
import React, { useState, useEffect } from 'react'
Copy link
Collaborator

Choose a reason for hiding this comment

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

  • This page will go under the overview section and with a link in the sidebar.
    pages/overview/faq

  • Can we rename frequently-asked-questions by faq?

  • This page is missing the sidebar. Please see [slug].page.tsx inside overview to understand how to show it.

  • I'd love to provide a experience like to this page: https://graphql.org/faq/ With groups, collapsing expanding effect and each question will have a mardown heading to able to generate self-links so people can link the questions externaly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is also done

@Akshaybagai52
Copy link
Contributor Author

Thanks @benjagm for the review will implement these changes

@Akshaybagai52
Copy link
Contributor Author

Hey @benjagm can you review this
Thanks

@benjagm benjagm added this to the Docs Release 3 milestone Mar 6, 2024
@Akshaybagai52 Akshaybagai52 changed the base branch from main to web-release-3 March 7, 2024 13:17
@Akshaybagai52
Copy link
Contributor Author

Hey @benjagm I've changed the base branch can you review this now

Can you please change the target branch of this PR to : https://github.com/json-schema-org/website/tree/web-release-3

Reference docs: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-base-branch-of-a-pull-request

I've changed the base branch can you review this now

Copy link
Collaborator

@benjagm benjagm left a comment

Choose a reason for hiding this comment

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

This is almost done! Excellent job here @Akshaybagai52 !!

Just left the last changes but this is pretty close to be completed.

@@ -69,6 +69,7 @@ const getDocsPath = [
'/overview/sponsors',
'/overview/similar-technologies',
'/overview/code-of-conduct',
'overview/faq',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
'overview/faq',
'/overview/faq',

Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing '/' character.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated this

components/Accordion.tsx Outdated Show resolved Hide resolved
@@ -0,0 +1,18 @@
import React from 'react';
Copy link
Collaborator

Choose a reason for hiding this comment

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

If accordion and faq are not reusable components I suggest to keep the functionality inside the faq tsx page.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made it like that because in future it can become reusable components. If any other page needs this accordion and also we can add the question answer by passing category as props so it can be reused if we have some other categories of questions like we are doing with "general"

className='flex justify-between items-center p-4 cursor-pointer'
onClick={() => handleToggle(index)}
>
<div className='text-[20px]'>{item.question}</div>
Copy link
Collaborator

Choose a reason for hiding this comment

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

For questions to have their own externally accesible url well need to add a self link something like:

<div className='text-[20px]'><a href="#{question-id}">{item.question}</a></div>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What I did in this is that on clicking of question the accordion expands and then show the answer of the quesiton but with this addition it will redirect to other link.
So what I did in this is to add arrow in the end of answer on clicking of that arrow they can redirect to respected links.
Let me know about your views on this

Copy link
Collaborator

Choose a reason for hiding this comment

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

The accordion expansion effects works well but we need to also change the url from /faq to something like /faq#xxxxxxxxxx. The blue arrow you added I think doesn't add any value. Just focus on adding the self link navigation when expanding the accordion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it I'll update this

Copy link
Collaborator

@benjagm benjagm left a comment

Choose a reason for hiding this comment

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

We are almost there! Left some comments.

@@ -0,0 +1,38 @@
name: Greet on User First PR Merge
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why pushing this change? please remove from the PR anything that is unrelated to this fature.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually these changes comes automatically when I change the base branch

Copy link
Collaborator

Choose a reason for hiding this comment

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

That is fine but remove them from your PR. Just push your code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay

@@ -115,6 +115,12 @@ CarbonAds.stylesheet = {
margin-top: 4px;
color: rgb(100 116 139);
}

@media (max-width: 1023px) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why pushing this change? please remove from the PR anything that is unrelated to this feature.

@@ -329,128 +329,6 @@ const Footer = () => (
</footer>
);

const OpenJS = () => (
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why pushing this change? please remove from the PR anything that is unrelated to this feature.

@@ -99,30 +99,31 @@ Using the product catalog example, `productId` is a numeric value that uniquely
To add the `properties` object to the schema:

1. Add the `properties` validation keyword to the end of the schema:

```json

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why pushing this change? please remove from the PR anything that is unrelated to this feature.

@@ -139,8 +139,8 @@ you control, for example:
{ "$id": "http://yourdomain.com/schemas/myschema.json" }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why pushing this change? please remove from the PR anything that is unrelated to this feature.

@@ -8,7 +8,7 @@ section: docs
* [Schema Identification](#schema-identification)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why pushing this change? please remove from the PR anything that is unrelated to this feature.

className='flex justify-between items-center p-4 cursor-pointer'
onClick={() => handleToggle(index)}
>
<div className='text-[20px]'>{item.question}</div>
Copy link
Collaborator

Choose a reason for hiding this comment

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

The accordion expansion effects works well but we need to also change the url from /faq to something like /faq#xxxxxxxxxx. The blue arrow you added I think doesn't add any value. Just focus on adding the self link navigation when expanding the accordion.

@Akshaybagai52
Copy link
Contributor Author

Akshaybagai52 commented Mar 11, 2024

Hey @benjagm these changes comes automatically when I changed the base branch from main to web-release-3. Can you tell me do I need to take pull from web-release-3 or I would take from main ?

@Akshaybagai52 Akshaybagai52 changed the title Feature/faq section feat: added Faq section in overview Mar 12, 2024
Copy link
Collaborator

@benjagm benjagm left a comment

Choose a reason for hiding this comment

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

We are getting really closer. Congrats!!

This is looking really good!!!!

I found two issue. See the video for extended explanation:

  1. Unexpected contraction of the page width.
  2. Links to specific questions doesn't work.

Video with audio:

video1444402921.mp4

@Akshaybagai52
Copy link
Contributor Author

We are getting really closer. Congrats!!

This is looking really good!!!!

I found two issue. See the video for extended explanation:

  1. Unexpected contraction of the page width.
  2. Links to specific questions doesn't work.

Video with audio:

video1444402921.mp4

Thanks for the detailed review I will fix this

@Akshaybagai52
Copy link
Contributor Author

Hey @benjagm when I reset branch then PR got closed
The issue is resolved now you can check in this PR
#534

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cookbook page, with solutions to frequently asked questions
2 participants