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

updating links and home page #508

Merged
merged 6 commits into from
Sep 24, 2024
Merged

Conversation

cohenaj194
Copy link
Contributor

@cohenaj194 cohenaj194 commented Sep 24, 2024

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced a redesigned Index component featuring a new hero section, an enhanced features section, an about us section, and a prominent call to action section.
    • Added a footer with copyright information.
  • Style Enhancements

    • Updated Tailwind CSS with new utility classes and modifications to improve layout and design consistency, including changes to padding, font sizes, and background colors.
  • SEO and Security Improvements

    • Added rel="nofollow" and rel="noopener noreferrer nofollow" attributes to external links for enhanced SEO and security.

Copy link

cloudflare-workers-and-pages bot commented Sep 24, 2024

Deploying saddlebag-with-pockets with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4d3dcfa
Status: ✅  Deploy successful!
Preview URL: https://cb48cc80.saddlebag-with-pockets.pages.dev
Branch Preview URL: https://home-page-and-item-improveme.saddlebag-with-pockets.pages.dev

View logs

Copy link
Contributor

coderabbitai bot commented Sep 24, 2024

Walkthrough

The changes introduce a comprehensive redesign of the Index component in the app/routes/_public._index.tsx file, adding new sections such as a hero, features, about us, and a call to action. The Tailwind CSS file has also undergone significant updates, with various utility classes added, removed, or modified to enhance styling options. Additionally, rel="nofollow" attributes have been added to external links in specific components to improve SEO practices.

Changes

File Path Change Summary
app/routes/_public._index.tsx Major structural changes to the Index component, adding hero, features, about us, call to action sections, and a footer. Retained hidden SEO content.
app/routes/queries.item-data.$itemId.tsx Added rel="nofollow" attribute to three CustomButton components linking to external sites (Universalis, FFXIV Teamcraft, Garland Tools).
app/routes/wow.item-data.$itemId.tsx Updated link for the first CustomButton to a generic link; added rel="noopener noreferrer nofollow" attribute to three CustomButton components linking to external sites (Saddlebag Exchange, WoWHead, Undermine Exchange).
app/tailwind.css Modifications to utility classes, including additions, removals, and updates to existing classes for margins, padding, colors, and responsive design. Significant restructuring of the Tailwind CSS framework's utility options.

Possibly related PRs

  • remove universalis_list_uuid #424: The changes in the app/routes/_public._index.tsx file include an update to the title text, which is directly related to the modifications made in the main PR that also involves the Index component in the same file.
  • Fix ffxiv item #433: This PR modifies the CustomButton component in app/routes/queries.item-data.$itemId.tsx, which is also referenced in the main PR's changes to the Index component.
  • Wow marketshare recommended #437: Although primarily focused on the WoW marketshare, this PR includes changes to app/routes/wow._index.tsx, which may relate to the overall structure and navigation of the site, similar to the changes made in the main PR.
  • Wow market 2 #438: This PR introduces changes in app/routes/wow.marketshare._index.tsx, which may connect to the overall layout and functionality enhancements in the main PR.
  • adding weekly stats to reselling search #505: This PR adds new metrics related to item sales in app/components/FFXIVResults/FullScan/Results.tsx, which could relate to the overall enhancements in user engagement and information clarity in the main PR.

🐰 Hopping through the code, oh what a sight,
New sections added, everything feels right!
With buttons that guide, but search engines can't see,
Tailwind's new styles, as bright as can be!
Saddlebag Exchange, a place to explore,
Join us, dear friends, there's so much in store! 🌟


Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 04d347c and 4d3dcfa.

Files selected for processing (2)
  • app/routes/queries.item-data.$itemId.tsx (1 hunks)
  • app/routes/wow.item-data.$itemId.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • app/routes/queries.item-data.$itemId.tsx
  • app/routes/wow.item-data.$itemId.tsx

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

Outside diff range and nitpick comments (1)
app/routes/wow.item-data.$itemId.tsx (1)

184-184: LGTM: Addition of rel="nofollow" to Undermine Exchange link

The addition of rel="nofollow" to the CustomButton component linking to the Undermine Exchange is correct and consistent with the previous changes. This completes the SEO strategy for all external links in this component.

For consistency, consider using a template literal for the link prop, similar to the WoWHead link:

-link={`${listing.link}`}
+link={`https://undermine.exchange/${listing.link}`}

This assumes that listing.link contains only the path and not the full URL. If it already includes the full URL, then the current implementation is correct.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between cbba5ad and 04b08e0.

Files selected for processing (4)
  • app/routes/_public._index.tsx (2 hunks)
  • app/routes/queries.item-data.$itemId.tsx (1 hunks)
  • app/routes/wow.item-data.$itemId.tsx (1 hunks)
  • app/tailwind.css (19 hunks)
Additional comments not posted (16)
app/routes/queries.item-data.$itemId.tsx (4)

153-153: LGTM! Addition of rel="nofollow" to external link.

The addition of rel="nofollow" to the Universalis link is appropriate for external links. This attribute instructs search engines not to follow this link, which can help in preserving your site's SEO value. It's a good practice, especially for links to external tools or services that are not directly affiliated with your site.


158-158: LGTM! Consistent application of rel="nofollow".

The addition of rel="nofollow" to the FFXIV Teamcraft link maintains consistency with the previous external link. This approach ensures all external tools are treated equally in terms of SEO considerations.


163-163: LGTM! Completed consistent implementation of rel="nofollow".

The addition of rel="nofollow" to the Garland Tools link completes the consistent application of this attribute to all external links in the component. This uniform approach to handling external links is beneficial for SEO management and aligns well with best practices for linking to external tools or services.

Overall, these changes:

  1. Improve SEO management by preventing unintended PageRank transfer.
  2. Maintain consistency in how external links are handled.
  3. Align with common web development practices for external linking.

153-163: Overall assessment: Consistent and beneficial updates to external links.

The changes in this file are focused and consistent, adding rel="nofollow" to all external links (Universalis, FFXIV Teamcraft, and Garland Tools). This update aligns well with the PR objective of updating links and follows best practices for SEO management.

Key points:

  1. Consistency: All external links are treated uniformly.
  2. SEO Impact: Prevents unintended PageRank transfer to external sites.
  3. Best Practices: Aligns with common web development practices for external linking.
  4. User Experience: No negative impact on functionality or user experience.

These changes contribute to better SEO management without affecting the user interface or functionality of the page. Good job on maintaining consistency across all external links!

app/routes/wow.item-data.$itemId.tsx (3)

174-174: LGTM: Addition of rel="nofollow" to Saddlebag Exchange link

The addition of rel="nofollow" to the CustomButton component linking to the Saddlebag Exchange is correct and aligns with the PR objective. This attribute instructs search engines not to follow the link, which can be beneficial for SEO purposes when linking to external sites.


179-179: LGTM: Addition of rel="nofollow" to WoWHead link

The addition of rel="nofollow" to the CustomButton component linking to WoWHead is correct and consistent with the previous change. This maintains the SEO strategy for external links.


174-184: Overall: Consistent implementation of rel="nofollow" for external links

The changes in this file consistently add the rel="nofollow" attribute to all CustomButton components that link to external sites (Saddlebag Exchange, WoWHead, and Undermine Exchange). This implementation:

  1. Aligns with the PR objective of updating links.
  2. Improves the SEO strategy by preventing search engines from following these external links.
  3. Maintains consistency across all external links in the component.
  4. Does not introduce any errors or affect the functionality of the component.

These changes are well-implemented and contribute to better SEO practices for the application.

app/tailwind.css (8)

1016-1018: New margin-top utility class added

The addition of the .mt-8 class provides a new utility for adding a top margin of 2rem (32px). This aligns with Tailwind's utility-first approach and enhances the flexibility of the design system.


1264-1266: New maximum width utility class added

The addition of the .max-w-2xl class introduces a new utility for setting a maximum width of 42rem. This provides more options for controlling element widths, particularly useful for responsive designs.


1534-1538: Increased spacing for stacked elements

The .space-y-10 class has been updated to provide larger spacing (2.5rem or 40px) between stacked elements. This change offers more breathing room in layouts, potentially improving readability and visual hierarchy.


1837-1840: New light purple background color added

The addition of the .bg-purple-50 class introduces a very light purple background color option. This expands the color palette available in the design system, providing more flexibility for subtle background variations.


1842-1844: New darker purple background color added

The addition of the .bg-purple-600 class introduces a darker purple background color option. This complements the previously added .bg-purple-50, providing a wider range of purple background choices. This addition enhances the purple color scheme options in the design system.


3253-3256: New responsive typography class for small screens

The addition of the .sm\:text-4xl class within the sm breakpoint provides a responsive typography option for small screens. This class sets a larger font size (2.25rem) and appropriate line height (2.5rem) when the small screen breakpoint is reached. This enhancement improves the responsive design capabilities of the stylesheet, allowing for better text scaling across different device sizes.


Line range hint 1-3385: Overall assessment of Tailwind CSS changes

The modifications to this Tailwind CSS file enhance the design system's capabilities in several ways:

  1. New utility classes have been added for margin, maximum width, and background colors, providing more design flexibility.
  2. Existing classes have been updated to offer improved spacing options.
  3. Responsive design has been enhanced with new small-screen typography options.

These changes align well with the Tailwind philosophy of providing a comprehensive set of utility classes. They should improve the ability to create responsive, visually appealing layouts.

However, there is one point that requires clarification:

  • The exact changes to the .space-y-2 class are not visible in the provided code, despite being mentioned in a comment.

Overall, these updates seem to be positive improvements to the stylesheet.


1540-1543: Clarification needed on .space-y-2 changes

The comment suggests that the .space-y-2 class has been updated with modified margin calculations. However, the specific changes are not visible in the provided code snippet. Could you please clarify the exact modifications made to this class?

To confirm the changes, please run the following command:

This will help us verify the actual modifications to the .space-y-2 class.

Verification successful

Review Comment Clarified

After reviewing the .space-y-2 class in app/tailwind.css, no removed or replaced code was detected. It appears there have been no modifications to this segment.

[incorrect_review_comment]


Review Comment Verified

The .space-y-2 class in app/tailwind.css has been modified with changes to the margin-top and margin-bottom properties. The review comment correctly points out that the removed and replaced code is not shown in the provided snippet.

Scripts executed

The following scripts were executed for the analysis:

Script:

rg --type css -A 5 '\.space-y-2'

Length of output: 338


Script:

#!/bin/bash
git diff HEAD~1 HEAD -- app/tailwind.css

Length of output: 6809

app/routes/_public._index.tsx (1)

58-58: Verify the image source for the hero background

The src attribute of the <img> tag points to "/images/hero-bg.jpg" with a comment indicating it's a placeholder image path. Please ensure that this path is correct and the image exists before deploying to production.

app/routes/_public._index.tsx Outdated Show resolved Hide resolved
app/routes/_public._index.tsx Outdated Show resolved Hide resolved
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 (3)
app/routes/_public._index.tsx (3)

54-83: LGTM! Consider adding alt text for better accessibility.

The Hero Section implementation looks great. The use of a background image with a gradient overlay creates an appealing visual effect. The title, subtitle, and CTA buttons are well-structured and clear.

Consider adding a more descriptive alt text for the background image to improve accessibility. For example:

- alt="Hero Background"
+ alt="Abstract background representing data visualization in MMO markets"

Line range hint 123-267: LGTM! Minor suggestion for consistency.

The About Us Section is well-structured and informative. The division into FFXIV and WoW subsections with distinct styling is a nice touch. The links to various tools and features provide clear value propositions for users.

There's a minor inconsistency in the spacing of some list items. Consider adjusting the spacing to be uniform across all items. For example:

-                  <li>
-                    Get real-time FFXIV Discord alerts for{' '}
+                  <li>
+                    Get real-time FFXIV Discord alerts for{' '}
                     <a
                       href="https://saddlebagexchange.com/price-sniper"
                       className="text-purple-600 underline">
                       Prices
                     </a>
-                    ,{' '}
+                    ,{' '}
                     <a
                       href="https://saddlebagexchange.com/undercut"
                       className="text-purple-600 underline">
                       Undercuts, Sales
                     </a>
-                    , and more!
+                    , and more!
                   </li>

Apply this consistently to all list items in both FFXIV and WoW sections.


Line range hint 1-391: Overall, great improvements with one area of concern

The updates to the Index component significantly enhance the user interface and content presentation. The new sections (Hero, Features, About Us, Call to Action, and Footer) are well-implemented and provide a more engaging user experience.

Key points:

  1. The Hero Section effectively captures attention with its visual design and clear CTAs.
  2. The Features Section now has improved interactivity as requested.
  3. The About Us Section provides valuable information for both FFXIV and WoW users.
  4. The Call to Action Section is concise and encourages user engagement.
  5. The Footer is simple and functional.

The main area of concern is the hidden SEO content, which should be addressed to comply with search engine guidelines and best practices.

Please review and implement the suggested changes for the hidden SEO content to ensure compliance with SEO best practices and avoid potential penalties from search engines.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 04b08e0 and 7247e90.

Files selected for processing (2)
  • app/routes/_public._index.tsx (5 hunks)
  • app/tailwind.css (19 hunks)
Files skipped from review as they are similar to previous changes (1)
  • app/tailwind.css
Additional comments not posted (3)
app/routes/_public._index.tsx (3)

85-121: Great job implementing the requested changes!

The Features Section looks excellent. You've successfully addressed the previous feedback:

  1. The entire area of each feature tile is now clickable.
  2. Hover effects have been added to enhance user interaction.

The use of a grid layout for the features provides a clean and organized appearance.


269-287: Excellent Call to Action Section!

The Call to Action Section is well-implemented. The gradient background adds visual appeal, and the content is concise and engaging. The CTA button is clear and prominent, encouraging user interaction.


290-298: LGTM! Simple and effective footer.

The Footer Section is implemented well. Using new Date().getFullYear() for the copyright year is a good practice to keep it current automatically.

app/routes/_public._index.tsx Show resolved Hide resolved
@@ -171,14 +171,17 @@ export default function Index() {
<CustomButton
link={`https://saddlebagexchange.com/wow/export-search?itemId=${listing.itemID}&minPrice=1`}
buttonText="Best Place to Sell!"
rel="nofollow"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@CodeRabbit this isnt working. Any ideas? Heres an example of what this button becomes:

<a title="Best Place to Sell!" class="" href="https://saddlebagexchange.com/wow/export-search?itemId=190315&amp;minPrice=1" target="_blank"><span class="group inline-flex items-center rounded-md bg-black px-2.5 py-1 text-sm font-medium text-white cursor-pointer overflow-hidden"><span class="h-[26px] flex items-center group-hover:scale-110 transition ease-in-out duration-300">Best Place to Sell!<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="h-4 w-4 inline align-text-bottom ml-1"><path fill-rule="evenodd" d="M12.586 4.586a2 2 0 112.828 2.828l-3 3a2 2 0 01-2.828 0 1 1 0 00-1.414 1.414 4 4 0 005.656 0l3-3a4 4 0 00-5.656-5.656l-1.5 1.5a1 1 0 101.414 1.414l1.5-1.5zm-5 5a2 2 0 012.828 0 1 1 0 101.414-1.414 4 4 0 00-5.656 0l-3 3a4 4 0 105.656 5.656l1.5-1.5a1 1 0 10-1.414-1.414l-1.5 1.5a2 2 0 11-2.828-2.828l3-3z" clip-rule="evenodd"></path></svg></span></span></a>

Copy link
Contributor

Choose a reason for hiding this comment

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

@cohenaj194, it looks like the rel attribute isn't currently being passed to the underlying <a> element in your CustomButton component. To fix this issue, you'll need to modify the CustomButton to accept the rel prop and apply it to the <a> tag.

Here's how you can update your CustomButton component:

// In CustomButton.tsx

interface CustomButtonProps {
  link: string;
  buttonText: string;
  rel?: string;
  // other props...
}

const CustomButton: React.FC<CustomButtonProps> = ({ link, buttonText, rel, ...props }) => (
  <a href={link} rel={rel} {...props}>
    {/* Existing content */}
    {buttonText}
  </a>
);

export default CustomButton;

By adding the rel prop to your component's props and passing it down to the <a> element, you ensure that attributes like rel="nofollow" are correctly applied.

Let me know if this helps!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@coderabbitai make a ticket for this

Copy link
Contributor

Choose a reason for hiding this comment

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

@cohenaj194, I've created the GitHub issue as requested: #509

Analysis chain

@cohenaj194, I've created a ticket for this issue as requested.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Create a GitHub issue for the missing 'rel' prop in CustomButton component

gh issue create \
  --title "CustomButton component does not pass 'rel' prop to underlying <a> element" \
  --body "The \`CustomButton\` component does not pass the \`rel\` prop to the underlying \`<a>\` element, which prevents attributes like \`rel=\"nofollow\"\` from being applied.

**Affected PR:** https://github.com/ff14-advanced-market-search/saddlebag-with-pockets/pull/508
**Original Comment:** https://github.com/ff14-advanced-market-search/saddlebag-with-pockets/pull/508#discussion_r1773841826
**Reported by:** @cohenaj194" \
  --assignee cohenaj194

Length of output: 628

Copy link

sonarcloud bot commented Sep 24, 2024

@cohenaj194 cohenaj194 merged commit f42b924 into master Sep 24, 2024
5 checks passed
@cohenaj194 cohenaj194 deleted the home-page-and-item-improvements branch September 24, 2024 19:31
@coderabbitai coderabbitai bot mentioned this pull request Nov 9, 2024
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.

1 participant