Skip to content

v3 pages have page titles #1582

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
Jan 21, 2025
Merged

v3 pages have page titles #1582

merged 2 commits into from
Jan 21, 2025

Conversation

samejr
Copy link
Member

@samejr samejr commented Jan 5, 2025

All main v3 route.tsx pages now have relevant page titles in the format:

{Page title} | Trigger.dev

CleanShot 2025-01-05 at 13 03 46@2x

Summary by CodeRabbit

  • New Features
    • Added page metadata (titles) to multiple routes across the application
    • Improved SEO and page identification by setting descriptive page titles for various sections like Projects, Tasks, Alerts, API Keys, Batches, Concurrency, Deployments, Environment Variables, Runs, Schedules, Settings, Team, Billing, Usage, Profile, and Personal Access Tokens

Copy link

changeset-bot bot commented Jan 5, 2025

⚠️ No Changeset found

Latest commit: 83fa1a7

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 Jan 5, 2025

Warning

There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

🔧 eslint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

apps/webapp/app/routes/_app.orgs.$organizationSlug._index/route.tsx

Oops! Something went wrong! :(

ESLint: 8.45.0

ESLint couldn't find the config "custom" to extend from. Please check that the name of the config is correct.

The config "custom" was referenced from the config file in "/.eslintrc.js".

If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.

Walkthrough

The pull request introduces a consistent enhancement across multiple route files in the Trigger.dev web application. Specifically, each route file now includes a new meta function exported from the @remix-run/react package. This function sets a descriptive page title for various sections of the application, such as "Projects", "Tasks", "Alerts", and other organizational and account-related pages. The changes are uniform across different routes, suggesting a systematic approach to improving page metadata and potentially SEO capabilities.

Changes

File Path Change Summary
apps/webapp/app/routes/_app.orgs.$organizationSlug._index/route.tsx Added meta function to set page title to "Projects | Trigger.dev"
apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.**/route.tsx Added meta function to set page titles for various project-related routes (Tasks, Alerts, API Keys, Batches, Concurrency, Deployments, Environment Variables, Runs, Schedules, Settings, Test)
apps/webapp/app/routes/_app.orgs.$organizationSlug.settings/route.tsx Added meta function to set page title to "Organization settings | Trigger.dev"
apps/webapp/app/routes/_app.orgs.$organizationSlug.team/route.tsx Added meta function to set page title to "Team | Trigger.dev"
apps/webapp/app/routes/_app.orgs.$organizationSlug.v3.billing/route.tsx Added meta function to set page title to "Billing | Trigger.dev"
apps/webapp/app/routes/_app.orgs.$organizationSlug.v3.usage/route.tsx Added meta function to set page title to "Usage | Trigger.dev"
apps/webapp/app/routes/account.**/route.tsx Added meta function to set page titles for account-related routes (Profile, Personal Access Tokens)

Poem

🐰 Metadata hopping, titles so bright,
Routes now sparkle with SEO might!
From Projects to Tokens, each page now sings,
A rabbit's touch that metadata brings! 🌟
Trigger.dev's pages, now crystal clear! 🚀


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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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

🧹 Nitpick comments (7)
apps/webapp/app/routes/_app.orgs.$organizationSlug._index/route.tsx (1)

12-18: Nicely implemented meta function.

Defining a descriptive page title here is helpful for SEO and user navigation. You could consider adding additional meta tags (e.g., description) if relevant for enhanced discoverability and clarity in search results.

apps/webapp/app/routes/_app.orgs.$organizationSlug.v3.billing/route.tsx (1)

21-27: Billing page title meta function.

Setting "Billing | Trigger.dev" is consistent with the PR’s objective to standardize page titles. Consider including other relevant meta attributes (e.g., description) if beneficial for SEO.

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.concurrency/route.tsx (2)

35-35: Separation of concerns.

Maintaining a separate area (line 35) for imports vs. logic is a neat practice. Keep it consistent for clarity.


36-42: Meta function for concurrency page.

The "Concurrency limits | Trigger.dev" title is well-aligned with the standardized naming. If concurrency limits ever become environment-specific, consider adding environment details to the page title.

apps/webapp/app/routes/account._index/route.tsx (1)

25-31: Appropriately named user profile page title.

"Your profile | Trigger.dev" aligns with the standardized pattern. If you anticipate unique user identification in the future, e.g., “John’s Profile,” consider a dynamic title.

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules/route.tsx (1)

3-3: Consider verifying Remix version consistency for MetaFunction.
You are importing MetaFunction from @remix-run/react here, whereas some files import it from @remix-run/node. While both can work, consider standardizing your imports across the codebase to promote consistency.

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx (1)

11-11: Keep import sources aligned for clarity.
Here, MetaFunction is imported from @remix-run/node instead of @remix-run/react. For predictability and maintainability, consider consolidating your import strategy for MetaFunction throughout the project.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 668b34d and 83fa1a7.

📒 Files selected for processing (18)
  • apps/webapp/app/routes/_app.orgs.$organizationSlug._index/route.tsx (1 hunks)
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx (2 hunks)
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.alerts/route.tsx (2 hunks)
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.apikeys/route.tsx (2 hunks)
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.batches/route.tsx (2 hunks)
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.concurrency/route.tsx (3 hunks)
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.deployments/route.tsx (3 hunks)
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.environment-variables/route.tsx (2 hunks)
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.runs._index/route.tsx (2 hunks)
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules/route.tsx (2 hunks)
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.settings/route.tsx (2 hunks)
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.test/route.tsx (2 hunks)
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.settings/route.tsx (2 hunks)
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.team/route.tsx (2 hunks)
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.v3.billing/route.tsx (1 hunks)
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.v3.usage/route.tsx (3 hunks)
  • apps/webapp/app/routes/account._index/route.tsx (2 hunks)
  • apps/webapp/app/routes/account.tokens/route.tsx (2 hunks)
🔇 Additional comments (35)
apps/webapp/app/routes/_app.orgs.$organizationSlug._index/route.tsx (2)

1-1: Good addition of MetaFunction import.

Importing MetaFunction from "@remix-run/react" correctly enables you to define a meta export for setting the page title and metadata.


7-7: Imports are consistent and organized.

It's great that you've simplified the imports, keeping only what's necessary. This helps maintain clarity in your file.

apps/webapp/app/routes/_app.orgs.$organizationSlug.v3.billing/route.tsx (5)

1-1: Clear reintroduction of hero icon imports.

Re-importing CalendarDaysIcon and StarIcon offers a clearer UI. Confirm if both icons are indeed used in the final code; if any are unused, consider removing to keep the imports tidy.


3-3: Reintroducing PlanDefinition import.

Check if this matches the latest version of your plan or subscription definitions from @trigger.dev/platform/v3. Keeping them consistent throughout avoids type mismatches.


7-7: Correct usage of newly added DateTime import.

Makes the code more readable and consistent for date handling.


11-11: Good reusage of helper services (getCurrentPlan, getPlans).

Ensures the code is DRY by centralizing plan/fetch logic.


19-20: MetaFunction import is appropriate.

Ensures you can define the meta export logic below.

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.concurrency/route.tsx (3)

6-6: Appropriate icon usage.

LockOpenIcon from "@heroicons/react/24/solid" clearly indicates unlocked or upgradeable concurrency limits. Keep icon usage consistent across the codebase.


7-7: MetaFunction import.

Same pattern as other routes. Good for consistent page titles.


17-17: Paragraph import reinstated.

This clarifies text blocks more semantically, enhancing readability.

apps/webapp/app/routes/account._index/route.tsx (1)

3-3: MetaFunction import is correct.

Ensures you can define metadata for the user’s account profile page.

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.apikeys/route.tsx (1)

32-38: Consistent titling approach.
The new meta function with "API keys | Trigger.dev" aligns well with the PR objective of standardizing page titles. No concerns identified.

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.settings/route.tsx (1)

27-33: Straightforward metadata addition.
This meta block accurately reflects “Project settings | Trigger.dev.” The naming convention is consistent and improves clarity for users and search engines.

apps/webapp/app/routes/_app.orgs.$organizationSlug.settings/route.tsx (1)

31-37: Appropriate and clear page title.
The meta export runs in parallel to other updates across this PR, ensuring organizational settings have a clearly defined page title.

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.test/route.tsx (1)

57-63: Title consistency maintained.
Adding "Test | Trigger.dev" helps unify the user experience across the v3 pages. This looks properly implemented.

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.batches/route.tsx (2)

7-7: Import of MetaFunction
No functional issues are apparent. This aligns with the added meta function below, so it looks good.


53-59: Added meta function for page title
The meta function providing "Batches | Trigger.dev" is consistent with the PR’s intent to establish uniform page titles across v3 routes.

apps/webapp/app/routes/account.tokens/route.tsx (2)

6-6: Integration of MetaFunction
This import is straightforward and necessary for the newly introduced meta export.


48-54: New meta export for “Personal Access Tokens”
Excellent addition for setting a clear, descriptive page title. This aligns perfectly with the PR objectives.

apps/webapp/app/routes/_app.orgs.$organizationSlug.team/route.tsx (2)

4-4: Import for MetaFunction
No issues here. This is required for introducing a new meta export.


47-53: Added meta function for “Team”
The newly added title “Team | Trigger.dev” meets the uniform naming pattern seen in this PR.

apps/webapp/app/routes/_app.orgs.$organizationSlug.v3.usage/route.tsx (3)

1-2: New imports for page enhancements
The imported InformationCircleIcon and MetaFunction allow for improved UX (InfoPanel) and custom page title.


17-18: Introduction of Header2 and InfoPanel
Incorporating these components enhances the readability and contextual information offered to users.


39-46: meta function for “Usage | Trigger.dev”
Good addition that aligns with the consistent page title format across v3 routes.

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.deployments/route.tsx (3)

7-7: Import usage looks consistent.
All imported hooks and functions appear to be used, aligning well with broader coding practices.


41-41: Retaining the trailing comma is fine.
This aligns with many style guides, improving diff readability.


62-69: Good addition of a meta function for setting an SEO-friendly page title.
This change follows the PR's objective of consistent page titles.

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.environment-variables/route.tsx (2)

12-12: Import statement aligns with usage.
Including MetaFunction is consistent with how Remix sets page metadata.


72-79: Page title meta addition is consistent with the PR's objective.
Consider whether to dynamically reflect environment or project-specific info in the title if needed in future.

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.runs._index/route.tsx (2)

3-3: All imports look properly used.
This is a straightforward addition of MetaFunction to support page metadata.


56-63: Meta function correctly implements a page title.
The addition meets the PR requirement for standardized titles.

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.alerts/route.tsx (2)

13-13: Additional import is used effectively.
No issues with your usage of MetaFunction here.


64-71: Title meta function helps maintain consistency.
Good job aligning the file with the standardized title format.

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.schedules/route.tsx (1)

69-75: Meta function aligns with the PR objective.
Returning a single key-value pair in an array for page metadata is valid and meets the goal of providing a descriptive page title: "Schedules | Trigger.dev".

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.v3.$projectParam._index/route.tsx (1)

92-98: Consistent page title addition.
This meta function correctly fulfills the requirement to add a descriptive page title, "Tasks | Trigger.dev," contributing to standardized page titles across v3 routes.

Copy link

pkg-pr-new bot commented Jan 5, 2025

@trigger.dev/build

npm i https://pkg.pr.new/triggerdotdev/trigger.dev/@trigger.dev/build@1582

@trigger.dev/react-hooks

npm i https://pkg.pr.new/triggerdotdev/trigger.dev/@trigger.dev/react-hooks@1582

@trigger.dev/rsc

npm i https://pkg.pr.new/triggerdotdev/trigger.dev/@trigger.dev/rsc@1582

trigger.dev

npm i https://pkg.pr.new/triggerdotdev/trigger.dev@1582

@trigger.dev/sdk

npm i https://pkg.pr.new/triggerdotdev/trigger.dev/@trigger.dev/sdk@1582

@trigger.dev/core

npm i https://pkg.pr.new/triggerdotdev/trigger.dev/@trigger.dev/core@1582

commit: 83fa1a7

@matt-aitken matt-aitken merged commit c855e4a into main Jan 21, 2025
9 checks passed
@matt-aitken matt-aitken deleted the pages-have-titles branch January 21, 2025 12:07
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