-
Notifications
You must be signed in to change notification settings - Fork 984
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIx spacing to avoid horizontal scroling (#5180)
## What are you changing in this pull request and why? Reason: When guides have large photos, videos, tables, or code blocks they would sometimes go off screen, requiring the user to scroll horizontally. In some of the Guides this was more egregious than others, but an all around negative for the customer experience. The following screenshots are cropped but they show the text running off-screen on the right hand side: <img width="996" alt="Screenshot 2024-03-27 at 4 10 07 PM" src="https://github.com/dbt-labs/docs.getdbt.com/assets/60105315/bca49f6a-0786-4d24-8dc3-e67773d3c91f"> <img width="1225" alt="Screenshot 2024-03-27 at 4 10 00 PM" src="https://github.com/dbt-labs/docs.getdbt.com/assets/60105315/20463a07-1751-4c62-8422-b38252e1f73f"> <img width="987" alt="Screenshot 2024-03-27 at 4 09 38 PM" src="https://github.com/dbt-labs/docs.getdbt.com/assets/60105315/7c410ac4-df89-4190-8f3b-cc19052a9ebc"> Solution: Adding a max width to each of the guides, regardless of whether or not they were impacted (future proofing them if iterations add those elements. The width set to 900px and brings the text to the edge but gives a little buffer. This also prevents code blocks and other elements from extending the beyond the border. Users will now scroll within the text block itself, rather than the whole screen. This auto-sizes pictures and videos so they fit on the screen. Limitations: - Doesn't have an impact on tables. For tables to resize, we're going to need some custom code for our site (which I believe is in the queue) - The closing </div> bracket can't be placed before snippets with no headers (the header is in the snippet) or it causes a glitch where the text won't appear on the screen for those sections (despite them still appearing on the menu). This is resolved by moving the closing bracket above these sections. It only impacted adapter docs that use the same snippets at the end. ## Checklist - [x] Review the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) so my content adheres to these guidelines. - [x] For [docs versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#about-versioning), review how to [version a whole page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version) and [version a block of content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content). - [x] Add a checklist item for anything that needs to happen before this PR is merged, such as "needs technical review" or "change base branch."
- Loading branch information
Showing
35 changed files
with
164 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.