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

openapi tutorial layout #279

Merged
merged 4 commits into from
Sep 9, 2024
Merged

openapi tutorial layout #279

merged 4 commits into from
Sep 9, 2024

Conversation

thimy
Copy link
Member

@thimy thimy commented Aug 29, 2024

This PR depends on #277

  • Added parsing of yml file to generate guide sidebar the same way we do for help sidebar
  • Created the pages necessary to display the newly created openapi guides.

I left Phil's commits so we can check how it renders but what really counts is the last commit, I'll remove them once this gets approved.

There's also a commit that fixes links in markdown that will go to #256.
@ChristopheDujarric you can start reviewing Phil's posts from here but comments will have to go to #256.

@thimy thimy self-assigned this Aug 29, 2024
Copy link

netlify bot commented Aug 29, 2024

Deploy Preview for bump-content-hub ready!

Name Link
🔨 Latest commit 1063ba9
🔍 Latest deploy log https://app.netlify.com/sites/bump-content-hub/deploys/66d96e22e4b85800084acec8
😎 Deploy Preview https://deploy-preview-279--bump-content-hub.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ChristopheDujarric
Copy link
Contributor

Not sure how far this relates to this PR, but there is an issue with wide tables. Example: https://deploy-preview-279--bump-content-hub.netlify.app/guides/openapi/specification/v3.1/understanding-structure/parameter-serialization/#query-parameters

image

Should we consider larger content zones?

@ChristopheDujarric
Copy link
Contributor

It isn't clear in mind mind anymore: did we not want to keep the "next article"/"previous article at the end of pages?

This, or have the scroll only on the content area, not on the side bar, so that the index is always visible.
image

@ChristopheDujarric
Copy link
Contributor

Apart from those two comments, this looks gorgeous, thanks @thimy and @grossyoan !

src/_data/sidebars/guides/openapi/v3-1.yml Outdated Show resolved Hide resolved
src/_data/sidebars/guides/openapi/v3-1.yml Outdated Show resolved Hide resolved
@grossyoan
Copy link
Contributor

Hi Thimy! Thanks for this amazing work.
I have a few questions/feedback:

  • We don't have the OpenAPI Specification entry in the nav yet. Is it developed? image
  • Is the "OpenAPI Complete guide" module developed? It should be displayed in the Guides homepage, and when you enter the "OpenAPI" category of the guides image
  • We shouldn't see the OpenAPI Specification guides in the "OpenAPI" category. Otherwise, it will make the standard guides unreadable. That's why we created a new enty in the top nav. image

@thimy
Copy link
Member Author

thimy commented Sep 2, 2024

Sorry, I didn't want to show entrypoints to the guide while they were not approved but that was a bit stupid since you can't review the layout. xd
The last commit will need to be removed before merging.

@thimy thimy force-pushed the openapi-tutorial-layout branch 4 times, most recently from fe9af8c to 0c34df5 Compare September 4, 2024 12:32
@thimy
Copy link
Member Author

thimy commented Sep 4, 2024

I have added the prev/next navigation and added css classes to add on a per table basis to fix the overflowing content.

image

@grossyoan
Copy link
Contributor

Perfect!

Could you rename "OpenAPI" to "OpenAPI Specification" in the navbar? So we're good on that part too.

Thanks a lot for all this good work Thimy!

@thimy
Copy link
Member Author

thimy commented Sep 4, 2024

Done ✅

@thimy thimy requested a review from Polo2 September 4, 2024 14:32
Adds a frontmatter attribute that hides an entry from being listed
in the main guides page.
To be added on a per table basis.
* full-bleed lets the table expand beyond the text column
* break-word make table content break and wrap instead of forcing width based on content

Also added `white-space: nowrap` to `code` in `th` so column name doesn't get squeezed.
@thimy
Copy link
Member Author

thimy commented Sep 5, 2024

I removed Phil's commits to avoid noise, may I have a technical review please? 🙏

src/_components/guides/in_depth/post_info.erb Show resolved Hide resolved
src/_components/guides/in_depth/post_info.rb Show resolved Hide resolved
src/_components/guides/in_depth/post_info.rb Show resolved Hide resolved
plugins/builders/sidebar.rb Show resolved Hide resolved
src/_layouts/indepth_guide.erb Show resolved Hide resolved
<button data-button-style="secondary" data-button-size="small" data-toggle-target="button" data-action="toggle#click">
Show menu <svg width="11" height="12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m10 6 .543.517a.75.75 0 0 0 0-1.034L10 6ZM0 6.75h10v-1.5H0v1.5Zm10.543-1.267-4.762-5-1.086 1.034 4.762 5 1.086-1.034Zm-1.086 0-4.762 5 1.086 1.034 4.762-5-1.086-1.034Z" fill="#025FD7"/></svg>
</button>
<h1><%= data.title %></h1>
Copy link
Contributor

@fbraure fbraure Sep 6, 2024

Choose a reason for hiding this comment

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

You are gona have 2< h1 >in the page?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure I understand what you mean, we always skip adding # in markdown content and we put the main title in the frnotmatter in case we need to retrieve it as data.

Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed, if we have some tags that reset the h* hierarchy, like section define in the Sidebar component, that's not a subject

@thimy thimy requested a review from fbraure September 6, 2024 08:27
Copy link
Contributor

@fbraure fbraure left a comment

Choose a reason for hiding this comment

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

That ok for me, thank you Thimy :)

<button data-button-style="secondary" data-button-size="small" data-toggle-target="button" data-action="toggle#click">
Show menu <svg width="11" height="12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m10 6 .543.517a.75.75 0 0 0 0-1.034L10 6ZM0 6.75h10v-1.5H0v1.5Zm10.543-1.267-4.762-5-1.086 1.034 4.762 5 1.086-1.034Zm-1.086 0-4.762 5 1.086 1.034 4.762-5-1.086-1.034Z" fill="#025FD7"/></svg>
</button>
<h1><%= data.title %></h1>
Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed, if we have some tags that reset the h* hierarchy, like section define in the Sidebar component, that's not a subject

@thimy thimy merged commit 7fb6969 into main Sep 9, 2024
5 checks passed
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.

4 participants