Skip to content

Docs: Add Sequin guide #1368

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

Merged
merged 2 commits into from
Oct 1, 2024
Merged

Docs: Add Sequin guide #1368

merged 2 commits into from
Oct 1, 2024

Conversation

thisisgoldman
Copy link
Contributor

@thisisgoldman thisisgoldman commented Sep 27, 2024

Closes #

✅ Checklist

  • ✅ I have followed every step in the contributing guide
  • ✅ The PR title follows the convention.
  • ✅ I ran and tested the code works 👇

Testing

Checked for broken links, spell check, all pages work in dev


Changelog

Add a guide for Sequin!


Screenshots

CleanShot 2024-09-27 at 12 23 21@2x
CleanShot 2024-09-27 at 12 22 36@2x

💯

Summary by CodeRabbit

  • New Features

    • Introduced the CardSequin component to the CardGroup, enhancing the user interface with additional content.
    • Added a new guide for integrating the Sequin framework with Trigger.dev, detailing setup and functionality.
    • Launched a new <Card> component featuring an icon and hyperlink for improved navigation.
  • Documentation

    • Expanded documentation to include guidance on the Sequin framework.
    • Updated guides and snippets to reflect new components and integration instructions.

Copy link

changeset-bot bot commented Sep 27, 2024

⚠️ No Changeset found

Latest commit: 412458c

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 27, 2024

Walkthrough

The changes introduce a new CardSequin component to the CardGroup, enhancing the documentation for the Sequin framework. A new guide is added for integrating Sequin with Trigger.dev, detailing the setup of tasks based on database changes. Additionally, a new entry for the Sequin guide is included in the documentation index, and a <Card> component with an icon and link to the Sequin guide is introduced.

Changes

File Change Summary
docs/guides/frameworks/introduction.mdx Added CardSequin component to CardGroup.
docs/guides/frameworks/sequin.mdx Introduced a guide for integrating Sequin with Trigger.dev, including setup instructions and task creation.
docs/mint.json Added new entry for "guides/frameworks/sequin" in the list of guides.
docs/snippets/card-sequin.mdx Introduced a new <Card> component with an icon prop and href linking to the Sequin guide.

Possibly related PRs

  • Added supabase database operations and new snippet #1359: The addition of the CardSequin component in the main PR is related to the new example task titled "Supabase database operations," as both involve enhancements to the documentation structure and user interface components related to the Sequin framework.

Poem

🐇 In the garden where ideas bloom,
A CardSequin joins the room.
With guides and tasks, we leap and bound,
In the world of Sequin, joy is found!
So hop along, let's celebrate,
New paths to follow, oh, how great! 🌼


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: 1

🧹 Outside diff range and nitpick comments (5)
docs/snippets/card-sequin.mdx (1)

2-6: LGTM: SVG icon looks good, consider adding accessibility attributes.

The SVG icon is well-structured and efficient, using a single path element. The white fill color suggests it's designed for use on a dark background.

Consider adding the following accessibility attributes to the SVG to improve screen reader support:

- <svg width="148" height="46" viewBox="0 0 148 46" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <svg width="148" height="46" viewBox="0 0 148 46" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Sequin logo">
docs/guides/frameworks/sequin.mdx (4)

1-17: Minor typo in the introduction

The introduction provides a clear overview of Sequin and its integration with Trigger.dev. However, there's a small typo that should be corrected.

In line 16, replace "when ever" with "whenever":

-You are about to create a [regular Trigger.dev task](/tasks-regular) that you will execute when ever a post is inserted or updated in your database.
+You are about to create a [regular Trigger.dev task](/tasks-regular) that you will execute whenever a post is inserted or updated in your database.
🧰 Tools
🪛 LanguageTool

[duplication] ~16-~16: Possible typo: you repeated a word
Context: ...uide, you'll learn how to use Sequin to trigger Trigger.dev tasks from database changes. ## Pr...

(ENGLISH_WORD_REPEAT_RULE)


18-32: Grammatical correction in prerequisites

The prerequisites section effectively outlines the necessary components for following this guide. However, there's a small grammatical correction needed.

In line 28, change "setup" to "set up" as it's being used as a verb:

-If you don't have one already, follow [Trigger.dev's Next.js setup guide](/guides/frameworks/nextjs) to setup your project. You can return to this guide when you're ready to write your first Trigger.dev task.
+If you don't have one already, follow [Trigger.dev's Next.js setup guide](/guides/frameworks/nextjs) to set up your project. You can return to this guide when you're ready to write your first Trigger.dev task.
🧰 Tools
🪛 LanguageTool

[misspelling] ~20-~20: You can use ‘ever’ as an intensifier, but if the phrase is a pronoun or an adverb, use “whenever” without a space.
Context: ...](/tasks-regular) that you will execute when ever a post is inserted or updated in your d...

(EVER_INTENSIFIER)


[uncategorized] ~28-~28: The official spelling of this programming framework is “Next.js”.
Context: ...ollow Trigger.dev's Next.js setup guide to setup your project. You can return ...

(NODE_JS)


[grammar] ~28-~28: The word “setup” is a noun. The verb is spelled with a white space.
Context: ...up guide](/guides/frameworks/nextjs) to setup your project. You can return to this gu...

(NOUN_VERB_CONFUSION)


33-141: Excellent task creation guide with minor typo

This section provides a comprehensive guide for creating a Trigger.dev task to generate embeddings for posts. The code snippets are well-structured and the instructions are clear. However, there's a small typo that should be corrected.

In line 122, correct the spelling of "uppserts" to "upserts":

-This task takes in a Sequin record event, creates an embedding, and then uppserts the embedding into a `post_embeddings` table.
+This task takes in a Sequin record event, creates an embedding, and then upserts the embedding into a `post_embeddings` table.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~87-~87: Loose punctuation mark.
Context: ....stringify(embedding), }; } }); ts utils.ts import pg f...

(UNLIKELY_OPENING_PUNCTUATION)


143-197: Well-structured API route setup with minor typo

This section effectively guides users through setting up an API route to handle Sequin webhooks and trigger the Trigger.dev task. The code and instructions are clear and comprehensive. However, there's a small typo that should be corrected.

In line 187, add a space between "API" and "endpoint":

-The `SEQUIN_WEBHOOK_SECRET` ensures that only Sequin can access your APIendpoint.
+The `SEQUIN_WEBHOOK_SECRET` ensures that only Sequin can access your API endpoint.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 8e38db9 and c3724fe.

⛔ Files ignored due to path filters (6)
  • docs/images/sequin-consumer-config.png is excluded by !**/*.png
  • docs/images/sequin-final-run.png is excluded by !**/*.png
  • docs/images/sequin-intro.svg is excluded by !**/*.svg
  • docs/images/sequin-register-task.png is excluded by !**/*.png
  • docs/images/sequin-sort-and-filter.png is excluded by !**/*.png
  • docs/images/sequin-trace.png is excluded by !**/*.png
📒 Files selected for processing (4)
  • docs/guides/frameworks/introduction.mdx (1 hunks)
  • docs/guides/frameworks/sequin.mdx (1 hunks)
  • docs/mint.json (1 hunks)
  • docs/snippets/card-sequin.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/guides/frameworks/sequin.mdx

[duplication] ~16-~16: Possible typo: you repeated a word
Context: ...uide, you'll learn how to use Sequin to trigger Trigger.dev tasks from database changes. ## Pr...

(ENGLISH_WORD_REPEAT_RULE)


[misspelling] ~20-~20: You can use ‘ever’ as an intensifier, but if the phrase is a pronoun or an adverb, use “whenever” without a space.
Context: ...](/tasks-regular) that you will execute when ever a post is inserted or updated in your d...

(EVER_INTENSIFIER)


[uncategorized] ~28-~28: The official spelling of this programming framework is “Next.js”.
Context: ...ollow Trigger.dev's Next.js setup guide to setup your project. You can return ...

(NODE_JS)


[grammar] ~28-~28: The word “setup” is a noun. The verb is spelled with a white space.
Context: ...up guide](/guides/frameworks/nextjs) to setup your project. You can return to this gu...

(NOUN_VERB_CONFUSION)


[uncategorized] ~87-~87: Loose punctuation mark.
Context: ....stringify(embedding), }; } }); ts utils.ts import pg f...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~319-~319: The official spelling of this programming framework is “Next.js”.
Context: ...ured and logged. - Deploy to production and...

(NODE_JS)

🔇 Additional comments (7)
docs/snippets/card-sequin.mdx (3)

1-9: LGTM: Card component structure is correct.

The <Card> component is properly structured with the icon and href props. The self-closing tag is appropriate for a component without children.


1-9: Overall assessment: The Card component for the Sequin guide looks good.

The implementation of the <Card> component for the Sequin guide aligns well with the PR objectives. The SVG icon and href link are appropriately set up. Minor suggestions were made for improving accessibility and verifying the link destination.

Great job on adding this new guide to the documentation!


7-7: LGTM: href value is correct, verify the link destination.

The href value "/guides/frameworks/sequin" aligns with the PR objective of adding a Sequin guide to the documentation.

Please ensure that this link correctly points to the newly added Sequin guide. You can verify this by running the following command:

If the command doesn't return any results, you may need to adjust the href value or create the missing guide file.

✅ Verification successful

LGTM: href value correctly points to the Sequin guide.

The file docs/guides/frameworks/sequin.mdx exists and matches the href "/guides/frameworks/sequin".

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence of the Sequin guide file

# Test: Check if the Sequin guide file exists
fd -t f "sequin\.(mdx?|tsx?)$" docs/guides/frameworks

Length of output: 89

docs/mint.json (1)

262-262: LGTM! Verify the existence of the Sequin guide file.

The addition of the Sequin guide to the navigation structure is appropriate and consistent with the existing format. Good job on maintaining the alphabetical order of the frameworks.

Let's verify that the Sequin guide file exists:

docs/guides/frameworks/sequin.mdx (3)

199-262: Comprehensive Sequin consumer setup guide

This section provides a detailed and well-structured guide for connecting Sequin to the database and creating a consumer. The instructions are clear, including the necessary SQL commands and steps for setting up a local tunnel and push consumer. The content is accurate and easy to follow.


264-310: Clear and comprehensive end-to-end testing guide

This section effectively walks users through the process of testing the entire setup, from spinning up the development environment to verifying the task execution in Trigger.dev. The steps are clear, and the inclusion of screenshots helps users understand what to expect at each stage. The content is well-structured and easy to follow.


312-319: Helpful next steps and further resources

This section provides valuable suggestions for improving the implementation, including error handling and production deployment. The links to relevant documentation are appropriate and will be helpful for users looking to expand their knowledge or troubleshoot issues. The content is concise and informative.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~319-~319: The official spelling of this programming framework is “Next.js”.
Context: ...ured and logged. - Deploy to production and...

(NODE_JS)

@@ -10,11 +10,14 @@ import CardNodejs from "/snippets/card-nodejs.mdx";
import CardNextjs from "/snippets/card-nextjs.mdx";
import CardRemix from "/snippets/card-remix.mdx";
import CardSupabase from "/snippets/card-supabase.mdx";
import CardSequin from "/snippets/card-sequin.mdx";
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Issue with CardSequin export.

The card-sequin.mdx file exists at docs/snippets/card-sequin.mdx, but it does not export the CardSequin component as expected. Please ensure that the CardSequin component is properly exported in card-sequin.mdx.

🔗 Analysis chain

LGTM! Changes align with PR objectives.

The addition of the CardSequin component is consistent with the existing structure and aligns with the PR objective of adding a Sequin guide to the documentation.

To ensure the completeness of this change, please run the following script to verify the existence and basic structure of the CardSequin component:

This script will help confirm that the CardSequin component has been properly created and structured.

Also applies to: 20-20

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence and basic structure of the CardSequin component

# Test 1: Check if the card-sequin.mdx file exists
echo "Checking for card-sequin.mdx file:"
fd -t f "card-sequin.mdx" snippets

# Test 2: Verify the basic structure of the CardSequin component
echo "Verifying the structure of CardSequin component:"
rg --type mdx -A 5 "^export default function CardSequin" snippets/card-sequin.mdx

Length of output: 428


Script:

#!/bin/bash
# Description: Search for card-sequin.mdx in the repository

echo "Searching for card-sequin.mdx in the repository:"
fd -t f "card-sequin.mdx"

Length of output: 162


Script:

#!/bin/bash
# Description: Verify the structure of the CardSequin component

echo "Verifying the structure of CardSequin component:"
rg "^export default function CardSequin" docs/snippets/card-sequin.mdx

Length of output: 179


Script:

#!/bin/bash
# Description: Verify the export statement of the CardSequin component with alternative patterns

echo "Verifying alternative export statements of CardSequin component:"

# Pattern 1: export default CardSequin
rg "^export default CardSequin" docs/snippets/card-sequin.mdx

# Pattern 2: export function CardSequin
rg "^export function CardSequin" docs/snippets/card-sequin.mdx

# Pattern 3: export const CardSequin
rg "^export const CardSequin" docs/snippets/card-sequin.mdx

Length of output: 329

Copy link
Member

@samejr samejr 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 guide! 👏 I've made a couple of tweaks and updated the diagram to match the trigger style.

@samejr samejr merged commit 7d11123 into triggerdotdev:main Oct 1, 2024
1 of 2 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Oct 1, 2024
3 tasks
samejr added a commit that referenced this pull request Oct 1, 2024
commit 7d11123
Author: Eric Goldman <eric@sequin.io>
Date:   Mon Sep 30 17:54:06 2024 -0700

    Add sequin guide (#1368)

    Co-authored-by: James Ritchie <james@trigger.dev>

commit 8da495a
Author: nicktrn <55853254+nicktrn@users.noreply.github.com>
Date:   Mon Sep 30 13:42:22 2024 +0100

    Improve checkpoint reliability and cleanup of temp files (#1367)

    * improve cleanup reliability

    * improve logging

    * bye-bye execa

    * fix for trailing newlines

    * prettier errors

    * trim args and log output by default

    * fix archive cleanup

    * prevent potential memleak

    * more cleanup debug logs

    * ignore abort during cleanup

    * rename checkpoint dir env var and move to helper

    * add global never throw override

    * add tmp cleaner

    * also clean up checkpoint dir by default

    * split by any whitespace, not just tabs

    * only create tmp cleaner if paths to clean

commit 69ec68e
Author: Eric Allam <eallam@icloud.com>
Date:   Sun Sep 29 19:18:39 2024 -0700

    Release 3.0.9

commit a6ea844
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Sun Sep 29 19:17:26 2024 -0700

    chore: Update version for release (#1366)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

commit 4c1ee3d
Author: Eric Allam <eallam@icloud.com>
Date:   Sun Sep 29 19:09:38 2024 -0700

    fix: run metadata not working when using npx/pnpm dlx
samejr added a commit that referenced this pull request Oct 10, 2024
* Added a new dropdown help and feedback menu to the side menu

* Added a shortcut to the popover menu

* Removed dev cli connected button for now

* Contact us form uses original Feedback component to prevent broken links

* Improved the messaging when selecting different options in the email form

* buttons style tweak

* SideMenuItem supports the trailingIconClassName

* Adding a consistent focus-visible states

* Removing tooltips for now

* Squashed commit of the following:

commit 7d11123
Author: Eric Goldman <eric@sequin.io>
Date:   Mon Sep 30 17:54:06 2024 -0700

    Add sequin guide (#1368)

    Co-authored-by: James Ritchie <james@trigger.dev>

commit 8da495a
Author: nicktrn <55853254+nicktrn@users.noreply.github.com>
Date:   Mon Sep 30 13:42:22 2024 +0100

    Improve checkpoint reliability and cleanup of temp files (#1367)

    * improve cleanup reliability

    * improve logging

    * bye-bye execa

    * fix for trailing newlines

    * prettier errors

    * trim args and log output by default

    * fix archive cleanup

    * prevent potential memleak

    * more cleanup debug logs

    * ignore abort during cleanup

    * rename checkpoint dir env var and move to helper

    * add global never throw override

    * add tmp cleaner

    * also clean up checkpoint dir by default

    * split by any whitespace, not just tabs

    * only create tmp cleaner if paths to clean

commit 69ec68e
Author: Eric Allam <eallam@icloud.com>
Date:   Sun Sep 29 19:18:39 2024 -0700

    Release 3.0.9

commit a6ea844
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Sun Sep 29 19:17:26 2024 -0700

    chore: Update version for release (#1366)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

commit 4c1ee3d
Author: Eric Allam <eallam@icloud.com>
Date:   Sun Sep 29 19:09:38 2024 -0700

    fix: run metadata not working when using npx/pnpm dlx

* More support for custom-focus

* More custom focus styles added

* Support for focus-visible style for the Segmented control

* Fixed table triple dot menu z-index issue

* Improved help menu wording

* When you submit the help form, close the modal

* focus-visible style for radio buttons

* button prop is now optional in the SideMenu component

* focus styling for a text link

* Deleted unused sequin files
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.

2 participants