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

Update stoplight css #4350

Merged
merged 2 commits into from
Oct 30, 2023
Merged

Conversation

GideonShils
Copy link
Collaborator

@GideonShils GideonShils commented Oct 26, 2023

What are you changing in this pull request and why?

A few CSS fixes for our stoplight based API docs:

  • Use same font as rest of docs site
  • Fix codeblock colors so they are legible in dark mode
  • Ensure stoplight CSS does not override nav bar fonts / styles

Updated sidepanel fonts:
Screenshot 2023-10-26 at 5 03 20 PM
Screenshot 2023-10-26 at 5 03 14 PM

Updated content fonts / codeblock colors:
Screenshot 2023-10-26 at 5 03 33 PM
Screenshot 2023-10-26 at 5 03 43 PM

Checklist

  • Review the Content style guide and About versioning so my content adheres to these guidelines.
  • Add a checklist item for anything that needs to happen before this PR is merged, such as "needs technical review" or "change base branch."

@GideonShils GideonShils requested a review from a team as a code owner October 26, 2023 21:08
@vercel
Copy link

vercel bot commented Oct 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-getdbt-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 30, 2023 5:01pm

@github-actions github-actions bot added content Improvements or additions to content size: small This change will take 1 to 2 days to address labels Oct 26, 2023
Base automatically changed from gideonshils/load-stoplight-styles-first to current October 26, 2023 21:18
@GideonShils GideonShils force-pushed the gideonshils/api-docs-stoplight-fixes branch from f901bba to 2a532c9 Compare October 26, 2023 21:24
@github-actions github-actions bot added size: medium This change will take up to a week to address and removed size: small This change will take 1 to 2 days to address labels Oct 26, 2023
@GideonShils GideonShils force-pushed the gideonshils/api-docs-stoplight-fixes branch from 2a532c9 to c99be20 Compare October 26, 2023 21:24
@github-actions github-actions bot added size: small This change will take 1 to 2 days to address and removed size: medium This change will take up to a week to address labels Oct 26, 2023
@GideonShils GideonShils force-pushed the gideonshils/api-docs-stoplight-fixes branch from c99be20 to c365a15 Compare October 26, 2023 21:25
@GideonShils GideonShils force-pushed the gideonshils/api-docs-stoplight-fixes branch from c365a15 to 915a827 Compare October 30, 2023 14:15
@github-actions github-actions bot added size: medium This change will take up to a week to address and removed size: small This change will take 1 to 2 days to address labels Oct 30, 2023
@GideonShils GideonShils force-pushed the gideonshils/api-docs-stoplight-fixes branch 2 times, most recently from 3faad9e to a0ad50d Compare October 30, 2023 14:56
@runleonarun
Copy link
Collaborator

runleonarun commented Oct 30, 2023

@GideonShils I'm still seeing missing bullet points. For example here:

Screenshot 2023-10-30 at 8 41 15 AM

And missing steps as shown in the quickstarts.

@JKarlavige JKarlavige self-requested a review October 30, 2023 15:45
Comment on lines 269 to 271
"/css/redoc.css",
"/css/stoplight-base.css",
"/css/stoplight-custom.css",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hey @GideonShils, when the css files are added within the docusaurus config, it will add them to every page throughout the site. For example, I see styles from stoplight-base.css being applied on the homepage.

Most are overridden by custom styles, but it might be difficult to promise styles on all pages are not affected.

Rather than adding them here in the config, would it be possible to add the css files directly in the src/pages/dbt-cloud/api* files to make them only available on those pages?

image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I ended up removing the css files from the docusaurus config and imported them directly in the stoplight component. I kept them as separate stylesheets as opposed to CSS modules so that they would only load on the API docs pages and not on the rest of the site. Tested to ensure:

  • New styles do not load on rest of site: headings look correct, bullet points appear as expected
  • Styles load on new pages: nav bar has correct font, content has correct custom styles

@GideonShils GideonShils marked this pull request as draft October 30, 2023 16:07
@GideonShils GideonShils force-pushed the gideonshils/api-docs-stoplight-fixes branch from 93ecc71 to 4bb2820 Compare October 30, 2023 16:41
@GideonShils GideonShils marked this pull request as ready for review October 30, 2023 16:41
@GideonShils GideonShils force-pushed the gideonshils/api-docs-stoplight-fixes branch from 4bb2820 to db35385 Compare October 30, 2023 16:41
Copy link
Collaborator

@JKarlavige JKarlavige left a comment

Choose a reason for hiding this comment

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

lgtm! verified stoplight styles being picked up on the api pages, while not being applied to other pages on the site :shipit:

Copy link
Collaborator

@runleonarun runleonarun left a comment

Choose a reason for hiding this comment

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

Hey @GideonShils! This looks good to me. I love that the examples are working, I think it's a known issue that the Send API request is still not working, but all fonts and the rest of the site look good.

The one tiny nit I found was the API calls are also hard to read in dark mode. But [perhaps something for another day.

Screenshot 2023-10-30 at 10 12 36 AM

@runleonarun runleonarun merged commit b1a2442 into current Oct 30, 2023
@runleonarun runleonarun deleted the gideonshils/api-docs-stoplight-fixes branch October 30, 2023 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Improvements or additions to content size: medium This change will take up to a week to address
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants