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

Moving the docs examples section into guides #1356

Merged
merged 8 commits into from
Sep 25, 2024
Merged

Conversation

samejr
Copy link
Member

@samejr samejr commented Sep 25, 2024

It's a bit confusing having 2 separate concepts for Guides and Examples. They are very similar. So now they are all under one roof and hopefully less confusing.

  • Moved Examples top level section into the Guides top level section
  • Examples now lives as a sub section under Frameworks

Summary by CodeRabbit

  • New Features
    • Introduced an introductory guide with example tasks for using Trigger.dev, showcasing practical applications and integrations.
    • Added new cards in the documentation for "Framework guides" and "Example tasks" to assist users.
  • Bug Fixes
    • Removed proxy authentication requirement in the Puppeteer scraping process for easier page creation.
  • Documentation
    • Updated links in documentation for example guides to reflect new paths.
    • Enhanced organization and readability of the documentation, including navigation adjustments and group renaming.
    • Updated a warning message hyperlink related to web scraping.

@samejr samejr requested a review from matt-aitken September 25, 2024 14:30
Copy link

changeset-bot bot commented Sep 25, 2024

⚠️ No Changeset found

Latest commit: bc5a3f8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented Sep 25, 2024

Warning

Rate limit exceeded

@samejr has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 1 minutes and 1 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Files that changed from the base of the PR and between 86daa46 and bc5a3f8.

Walkthrough

The changes in this pull request involve updates to the documentation for Trigger.dev, including modifications to links for Puppeteer and FFmpeg examples, the introduction of a new guide for example tasks, and the removal of proxy authentication from the Puppeteer scraping function. Additionally, the docs/mint.json file has been reformatted for better organization, including renaming groups and consolidating navigation.

Changes

File(s) Change Summary
docs/config/config-file.mdx Updated links from /examples/puppeteer to /guides/examples/puppeteer and /examples/ffmpeg-video-processing to /guides/examples/ffmpeg-video-processing.
docs/guides/examples/intro.mdx Added new file introducing example tasks with descriptions and links to respective guides.
docs/guides/examples/puppeteer.mdx Updated links to point to the correct section; removed proxy authentication setup from puppeteerScrapeWithProxy function.
docs/introduction.mdx Added new cards for "Framework guides" and "Example tasks" linking to relevant resources.
docs/mint.json Reformatted "openapi" array; renamed "Examples" to "Guides & examples" and consolidated navigation groups.
docs/snippets/web-scraping-warning.mdx Updated hyperlink in a warning message regarding web scraping to point to the new URL.

Possibly related PRs

  • New puppeteer examples #1355: Introduces new examples for using Puppeteer, which directly relates to the main PR's updates on the documentation for Puppeteer, including changes to links and setup instructions.

🐰 In the garden, changes bloom,
Proxy gone, there's more room!
Cards for guides, tasks anew,
Jump right in, explore what's true!
With each tweak, our paths align,
Happy hopping, all will shine! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (3)
docs/introduction.mdx (1)

27-32: Consider using distinct icons for each card

While using the same icon ("wand-magic-sparkles") for all cards maintains visual consistency, using distinct icons for each card could improve quick visual identification and navigation for users.

Consider using more specific icons for each card. For example:

  • "Framework guides" could use an icon like "code" or "sitemap"
  • "Example tasks" could use an icon like "list-check" or "clipboard"

This would help users quickly distinguish between different types of resources.

docs/mint.json (2)

98-98: Good change: Updated anchor name

Renaming the anchor from "Examples" to "Guides & examples" accurately reflects the consolidation of these sections. This change aligns with the PR objectives and improves navigation clarity.

Consider using "Guides & Examples" (capitalizing "Examples") for consistency with other anchor names in the file.


272-285: Great restructuring of documentation sections

The changes in this section effectively implement the PR objectives:

  1. The "Example tasks" group has been added under the Frameworks section, consolidating the examples as intended.
  2. The "Dashboard" group has been moved and updated.
  3. A new "Migrations" group has been added with information on upgrading from v2.

These changes improve the overall structure and navigation of the documentation, making it more intuitive for users.

Consider adding a brief description or introduction page to the new "Example tasks" group to help users understand the purpose and content of this section.

Also applies to: 289-290, 293-294

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 3af8ae5 and 8bc61ad.

📒 Files selected for processing (3)
  • docs/guides/examples/puppeteer.mdx (0 hunks)
  • docs/introduction.mdx (1 hunks)
  • docs/mint.json (8 hunks)
💤 Files not reviewed due to no reviewable changes (1)
  • docs/guides/examples/puppeteer.mdx
🔇 Additional comments not posted (8)
docs/introduction.mdx (2)

27-32: LGTM: New cards added successfully

The addition of "Framework guides" and "Example tasks" cards aligns well with the PR objectives of consolidating Examples into the Guides section. This change should help streamline the documentation structure and reduce confusion for users.


30-32: Consider updating the "Example tasks" link

Given that the Examples section has been moved into Guides, the link for the "Example tasks" card might need to be updated.

Please verify if the link "/examples/intro" is still correct, or if it should be updated to reflect the new structure (e.g., "/guides/frameworks/examples" or similar).

docs/mint.json (6)

4-4: LGTM: Improved formatting of "openapi" field

The "openapi" field has been condensed into a single line, which improves readability without affecting functionality.


90-93: Excellent: Added redirect for Examples section

The new redirect from "/docs/examples/:slug*" to "docs/guides/examples/:slug*" is crucial for maintaining link integrity after moving the Examples section into Guides. This ensures a smooth transition and prevents broken links, aligning perfectly with the PR objectives.


106-106: LGTM: Improved formatting of "Getting Started" pages

Condensing the "pages" array into a single line improves readability without affecting functionality.


113-113: LGTM: Improved formatting in "Fundamentals" group

The "pages" arrays for "Tasks" and "Configuration" subgroups have been condensed into single lines, improving readability without affecting functionality.

Also applies to: 119-119


125-125: LGTM: Improved formatting in multiple groups

The "pages" arrays for various groups and subgroups (Development, Deployment integrations, Wait, Tasks API, and Projects API) have been condensed into single lines. This improves readability and maintains consistency throughout the file without affecting functionality.

Also applies to: 135-135, 147-147, 165-165, 203-203


Line range hint 1-302: Overall assessment: Excellent restructuring of documentation

This PR successfully achieves its main objective of consolidating the Examples and Guides sections, improving the overall structure and navigation of the documentation. The changes include:

  1. Adding necessary redirects to maintain link integrity.
  2. Updating anchor names to reflect the new structure.
  3. Reorganizing and condensing various sections for improved readability.
  4. Creating a new "Example tasks" group under Frameworks.
  5. Updating the "Dashboard" and adding a "Migrations" section.

These changes will provide a more intuitive and less confusing experience for users navigating the documentation. The minor suggestions provided in the review comments can further enhance the user experience.

Great work on this restructuring! The changes align well with the PR objectives and improve the overall documentation structure.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (2)
docs/guides/examples/intro.mdx (1)

7-19: LGTM: Comprehensive and well-structured table of examples

The table provides a clear and concise overview of various example tasks for using Trigger.dev. The content aligns well with the PR objectives of consolidating Examples under Guides. Each task is properly linked to its respective guide, and the descriptions are informative.

For improved consistency, consider standardizing the sentence structure in the descriptions. For example, the Puppeteer description could be adjusted to:

- | [Puppeteer](/guides/examples/puppeteer)                              | Use Puppeteer to generate a PDF or scrape a webpage.                         |
+ | [Puppeteer](/guides/examples/puppeteer)                              | Use Puppeteer to generate a PDF and scrape a webpage.                        |

This minor change aligns it more closely with the structure of other descriptions in the table.

docs/guides/examples/puppeteer.mdx (1)

146-146: Approved with a minor suggestion.

The addition of information about using a BrowserBase proxy for web scraping is valuable and aligns with best practices. However, there's a minor grammatical improvement we can make.

Consider adding a comma after "In this example" for better readability:

-In this example we use [Puppeteer](https://pptr.dev/) with a [BrowserBase](https://www.browserbase.com/) proxy to scrape the GitHub stars count from the [Trigger.dev](https://trigger.dev) landing page and log it out.
+In this example, we use [Puppeteer](https://pptr.dev/) with a [BrowserBase](https://www.browserbase.com/) proxy to scrape the GitHub stars count from the [Trigger.dev](https://trigger.dev) landing page and log it out.
🧰 Tools
LanguageTool

[typographical] ~146-~146: It appears that a comma is missing.
Context: ... from a web page ### Overview In this example we use Puppeteer w...

(DURING_THAT_TIME_COMMA)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 8bc61ad and 3a02b34.

📒 Files selected for processing (5)
  • docs/config/config-file.mdx (2 hunks)
  • docs/guides/examples/intro.mdx (1 hunks)
  • docs/guides/examples/puppeteer.mdx (2 hunks)
  • docs/introduction.mdx (1 hunks)
  • docs/snippets/web-scraping-warning.mdx (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • docs/config/config-file.mdx
  • docs/snippets/web-scraping-warning.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/introduction.mdx
🧰 Additional context used
LanguageTool
docs/guides/examples/puppeteer.mdx

[typographical] ~146-~146: It appears that a comma is missing.
Context: ... from a web page ### Overview In this example we use Puppeteer w...

(DURING_THAT_TIME_COMMA)

🔇 Additional comments not posted (5)
docs/guides/examples/intro.mdx (2)

1-5: LGTM: Well-structured frontmatter

The YAML frontmatter is correctly formatted and provides relevant metadata for the document. The title and description accurately reflect the content of the file.


1-19: Great job on restructuring the documentation!

This new intro.mdx file successfully addresses the main objective of the PR by integrating the Examples section into the Guides. The content is well-organized, clear, and provides users with a comprehensive overview of available example tasks. The table format makes it easy for users to quickly find relevant examples for their needs.

The file structure and content quality contribute to a more cohesive and less confusing documentation experience, as intended by this PR.

docs/guides/examples/puppeteer.mdx (3)

14-16: LGTM: Links updated correctly.

The links have been updated to reflect the new structure where Examples are now part of the Guides section. This change aligns with the PR objective of consolidating Examples under Guides.


Line range hint 1-246: Overall assessment: Documentation structure improved, but clarification needed on proxy usage.

The changes in this file generally align with the PR objectives of moving the Examples section into Guides. The link updates and additional information about using a proxy for web scraping are valuable improvements.

However, the removal of proxy authentication from the puppeteerScrapeWithProxy function raises concerns:

  1. It seems to contradict the emphasis on using a proxy for web scraping.
  2. This change isn't explained in the PR objectives.

To ensure consistency across the documentation, please clarify the intention behind removing proxy authentication and update the documentation accordingly if this change is intentional.


Line range hint 168-169: Clarification needed: Removal of proxy authentication.

The proxy authentication setup has been removed from the puppeteerScrapeWithProxy function. This change seems to contradict the emphasis on using a proxy for web scraping, as mentioned in the note above the code.

Could you please clarify the rationale behind removing the proxy authentication? If this was intentional, we might need to update the accompanying documentation to reflect this change.

To verify the impact of this change, you can run the following script:

This will help us ensure that all relevant parts of the documentation are consistent with this change.

✅ Verification successful

Verified: Removal of proxy authentication.

The search did not find any remaining references to proxy authentication in the documentation or TypeScript files.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining references to proxy authentication in the codebase

# Test: Search for proxy authentication related code
rg --type mdx --type typescript 'page.authenticate|proxy authentication' docs/

Length of output: 108


Script:

#!/bin/bash
# Description: Check for any remaining references to proxy authentication in the codebase

# Test: Search for proxy authentication related code in .mdx and .ts files
rg -g "*.mdx" -g "*.ts" 'page.authenticate|proxy authentication' docs/

Length of output: 72

samejr and others added 4 commits September 25, 2024 15:52
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.

None yet

1 participant