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

fix(docs): replace twitter logo/links with x logo/links #3815

Merged
merged 8 commits into from
Sep 29, 2024

Conversation

dgz9
Copy link
Contributor

@dgz9 dgz9 commented Sep 27, 2024

Closes # N/A

📝 Description

This PR updates all Twitter references to X (formerly Twitter) in the NextUI documentation. This includes changing the Twitter logo to the X logo and updating all twitter.com links to x.com.

⛳️ Current behavior (updates)

Currently, the NextUI documentation uses the old Twitter bird logo and links to twitter.com for social media references.

🚀 New behavior

  • The Twitter bird logo has been replaced with the new X logo.
  • All twitter.com links have been updated to x.com.
  • The TwitterIcon component has been renamed to XIcon and its SVG path has been updated to represent the X logo.

💣 Is this a breaking change (Yes/No):

No

📝 Additional Information

N/A

Summary by CodeRabbit

  • New Features

    • Introduced a new XIcon component for the updated branding.
  • Bug Fixes

    • Updated various URLs from Twitter to X to reflect the platform rebranding.
  • Documentation

    • Revised links in README and other documentation to point to the new X domain.
  • Style

    • Adjusted the visual presentation of the LinkIcon in the FeaturesGrid component by removing the specific class name.

Copy link

changeset-bot bot commented Sep 27, 2024

🦋 Changeset detected

Latest commit: 1ee8df9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

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

Not sure what this means? Click here to learn what changesets are.

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

Copy link

vercel bot commented Sep 27, 2024

@dgz9 is attempting to deploy a commit to the NextUI Inc Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented Sep 27, 2024

Walkthrough

The changes in this pull request primarily involve updating URLs from the old Twitter domain to the new X domain across various files in the repository. This includes modifications to contact links, icon components, and documentation, ensuring that all references to Twitter are replaced with the corresponding X links. Additionally, a new icon component for X has been introduced, and existing components have been updated to utilize this new icon.

Changes

File Path Change Summary
.github/ISSUE_TEMPLATE/config.yml Updated Twitter URL to X URL.
apps/docs/components/icons/social.tsx Added new XIcon component and updated exports.
apps/docs/components/navbar.tsx Replaced TwitterIcon with XIcon in the Navbar component.
apps/docs/libs/constants.tsx Replaced TwitterIcon with XIcon and updated the URL to X.
packages/core/react/README.md Updated Twitter link to X link in README.
.changeset/slimy-cats-brush.md Documented updates related to the rebranding from Twitter to X.

Possibly related PRs

  • chore(docs): v2.4.0 #3084: The changes in the main PR regarding the URL update for the Twitter account are related to the documentation updates in this PR, which also discusses enhancements and changes in the NextUI version, including links.
  • chore(docs): update component link #3737: This PR modifies the Navbar component, which is relevant as it involves changes to navigation links, similar to the URL update in the main PR.
  • Chore/ph announcement #3743: Although this PR focuses on a different aspect of the application, it involves changes in the Navbar component, which is also relevant to the main PR's context of updating links.
  • fix(docs): missing tw nested groups in docs #3751: This PR addresses documentation issues, which may relate to the overall context of updating links and references in the project, similar to the main PR's URL update.
  • chore(docs): update sponsor section #3758: This PR updates the sponsor section, which may involve changes to links and references, aligning with the main PR's focus on updating URLs.
  • fix(docs): broken links #3796: This PR fixes broken links in the documentation, which is directly related to the main PR's focus on updating a specific URL.

Suggested reviewers

  • jrgarciadev

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between ca64568 and 1ee8df9.

📒 Files selected for processing (1)
  • apps/docs/components/marketing/features-grid.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/docs/components/marketing/features-grid.tsx

Warning

Review ran into problems

🔥 Problems

Error running Biome: Command failed with exit code 4: jk_cp -o -f -k -j /cache/46/4c91c798-6b79-4bfd-9f5d-34e61379e032 /dev/null /dev/urandom /usr/bin/ast-grep /usr/bin/curl /usr/bin/diff /usr/bin/dirname /usr/bin/env /usr/bin/fd /usr/bin/gawk /usr/bin/gh /usr/bin/jq /usr/bin/patch /usr/bin/rg /usr/bin/shellcheck /usr/bin/tokei /usr/bin/tree /usr/bin/uniq /usr/bin/xargs /etc/ssl/certs /etc/passwd /etc/group /home/jailuser/ast-grep-rules

ERROR: /usr/bin/ast-grep does not exist

Usage: /usr/sbin/jk_cp -j [OPTIONS]

-h --help : this help screen
-j, --jail : the jail to copy to
-v, --verbose : show what is being copied
-f, --force : overwrite existing files
-k, --hardlink : use hardlinks if possible
-o, --owner : retain file ownership and group
-s, --setuid : retain file setuid/setgid bits

Note: if no jail is specified, the first argument is
considered to be the jail


Error running Gitleaks: Cloning the repository previously failed.


Error running semgrep: Cloning the repository previously failed.


Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review.


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.

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 (6)
apps/docs/content/components/user/link-description.ts (1)

8-8: LGTM! Consider updating the link text for consistency.

The URL update from Twitter to X is correct and aligns with the PR objectives. Well done!

For complete consistency with the rebranding, consider updating the link text from "@jrgarciadev" to "x.com/jrgarciadev". Here's a suggested change:

-        <Link href="https://x.com/jrgarciadev" size="sm" isExternal>
-          @jrgarciadev
+        <Link href="https://x.com/jrgarciadev" size="sm" isExternal>
+          x.com/jrgarciadev
         </Link>

This change would fully reflect the transition from Twitter to X in both the URL and the displayed text.

apps/docs/libs/constants.tsx (1)

3-3: Consider updating the constant name for consistency

While the value of TWITTER_USER_NAME is still correct (as it refers to the username), consider updating the constant name itself for consistency with the rebranding. For example, you could rename it to X_USER_NAME.

Here's a suggested change:

-export const TWITTER_USER_NAME = "getnextui";
+export const X_USER_NAME = "getnextui";

Don't forget to update any references to this constant throughout the codebase if you make this change.

apps/docs/components/navbar.tsx (1)

333-333: Update aria-label and verify link properties.

The icon has been correctly updated to use XIcon. However, consider the following suggestions:

  1. Update the aria-label from "Twitter" to "X" for consistency.
  2. Verify if siteConfig.links.twitter needs to be updated to reflect the new X.com domain.

Consider applying these changes:

 <Link
   isExternal
-  aria-label="Twitter"
+  aria-label="X"
   className="p-1"
   href={siteConfig.links.twitter}
   onPress={() => handlePressNavbarItem("Twitter", siteConfig.links.twitter)}
 >
   <XIcon className="text-default-600 dark:text-default-500" />
 </Link>

Also, verify if siteConfig.links.twitter and the handlePressNavbarItem parameters need to be updated to use "X" instead of "Twitter".

apps/docs/content/blog/v2.3.0.mdx (1)

Line range hint 212-217: LGTM: Calendar presets section added

The new section about Calendar presets is informative and highlights a useful feature. However, the mentioned code example is missing.

Consider adding the code example for the Calendar presets to provide a complete understanding of the feature:

<CodeDemo title="Calendar Presets" files={calendarContent.presets} />
apps/docs/components/icons/social.tsx (2)

469-469: Export updated correctly, but consider TwitterIcon usage.

The XIcon has been correctly added to the export statement. However, both TwitterIcon and XIcon are now exported. Consider if TwitterIcon should be deprecated or removed to maintain consistency with the rebranding to X.

If TwitterIcon is to be deprecated, consider adding a comment or console warning when TwitterIcon is used:

export const TwitterIcon: React.FC<IconSvgProps> = (props) => {
  console.warn('TwitterIcon is deprecated. Please use XIcon instead.');
  return XIcon(props);
};

Multiple Twitter References Found. Please Update to X.

Several Twitter mentions remain in the codebase, including constants, configurations, sponsor details, and component usages. To ensure a complete rebranding from Twitter to X, please review and update all remaining references.

  • Update constants and configuration values referencing Twitter.
  • Modify sponsor information where Twitter handles are used.
  • Replace TwitterIcon with XIcon in all components.
  • Adjust any URLs pointing to twitter.com to their corresponding X URLs.
🔗 Analysis chain

Line range hint 1-469: Verify other Twitter references in the codebase.

The XIcon has been successfully added and exported. To ensure complete rebranding from Twitter to X, it's important to check for other Twitter references throughout the codebase.

Run the following script to find potential Twitter references:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for Twitter references in the codebase

# Test: Search for 'Twitter' or 'twitter' in all files
rg -i 'twitter' --type-not svg

# Test: Search for twitter.com URLs
rg 'https?://(?:www\.)?twitter\.com'

# Test: Search for TwitterIcon usage
rg 'TwitterIcon'

Length of output: 3228

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 606f757 and 8966cd4.

📒 Files selected for processing (15)
  • .github/ISSUE_TEMPLATE/config.yml (1 hunks)
  • apps/docs/.sponsorsrc (3 hunks)
  • apps/docs/components/icons/social.tsx (2 hunks)
  • apps/docs/components/navbar.tsx (2 hunks)
  • apps/docs/config/site.ts (1 hunks)
  • apps/docs/content/blog/nextui-v2.mdx (2 hunks)
  • apps/docs/content/blog/v2.1.0.mdx (2 hunks)
  • apps/docs/content/blog/v2.2.0.mdx (1 hunks)
  • apps/docs/content/blog/v2.3.0.mdx (6 hunks)
  • apps/docs/content/components/checkbox-group/custom-styles.ts (1 hunks)
  • apps/docs/content/components/checkbox/custom-styles.ts (1 hunks)
  • apps/docs/content/components/user/link-description.ts (1 hunks)
  • apps/docs/libs/constants.tsx (2 hunks)
  • packages/components/user/stories/user.stories.tsx (1 hunks)
  • packages/core/react/README.md (1 hunks)
✅ Files skipped from review due to trivial changes (8)
  • .github/ISSUE_TEMPLATE/config.yml
  • apps/docs/.sponsorsrc
  • apps/docs/config/site.ts
  • apps/docs/content/blog/v2.1.0.mdx
  • apps/docs/content/blog/v2.2.0.mdx
  • apps/docs/content/components/checkbox-group/custom-styles.ts
  • apps/docs/content/components/checkbox/custom-styles.ts
  • packages/core/react/README.md
🧰 Additional context used
🪛 LanguageTool
apps/docs/content/blog/nextui-v2.mdx

[uncategorized] ~94-~94: Possible missing comma found.
Context: ...nents already include the use client; directive so you can import them directly in your...

(AI_HYDRA_LEO_MISSING_COMMA)

🔇 Additional comments (10)
apps/docs/libs/constants.tsx (3)

1-1: LGTM: Import statement updated correctly

The import statement has been properly updated to use XIcon instead of TwitterIcon, which aligns with the PR objective of updating Twitter references to X.


11-11: LGTM: URL updated correctly

The URL has been properly updated from "https://twitter.com/getnextui" to "https://x.com/getnextui", which aligns with the PR objective of updating Twitter links to X links. The username (getnextui) has been correctly maintained.


10-10: Icon component updated, but consider visual consistency

The icon component has been correctly updated to use XIcon. However, there are two points to consider:

  1. The color has been changed from Twitter blue (#00ACEE) to white (#ffffff). Ensure this doesn't affect visibility on different backgrounds.
  2. The icon size has been reduced from 32 to 28. Verify that this doesn't disrupt visual balance with other icons in the UI.

To check for consistency, run the following script:

✅ Verification successful

Icon component update verified

After reviewing the icon sizes and colors across the codebase, the changes to the XIcon (color changed to #ffffff and size reduced to 28) align with the visual consistency of other icons.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for icon sizes and colors in the codebase

# Search for icon size definitions
echo "Icon sizes:"
rg --type typescript --type javascript 'size=\{(\d+)\}'

# Search for icon color definitions
echo "\nIcon colors:"
rg --type typescript --type javascript 'className="[^"]*text-\[[^\]]+\]'

Length of output: 274


Script:

#!/bin/bash
# Description: Check for icon sizes and colors in the codebase

# Search for icon size definitions
echo "Icon sizes:"
rg -g '*.ts' -g '*.tsx' 'size=\{(\d+)\}'

# Search for icon color definitions
echo "\nIcon colors:"
rg -g '*.ts' -g '*.tsx' 'className="[^"]*text-\[[^\]]+\]"'

Length of output: 9170

packages/components/user/stories/user.stories.tsx (1)

61-61: LGTM: URL updated correctly.

The Twitter URL has been successfully updated to the new X domain. This change aligns with the PR objective and correctly reflects the platform's rebranding.

Let's verify if there are any other Twitter-related references in the file:

✅ Verification successful

Verified: All Twitter references updated correctly.

No remaining Twitter-related references found in the file, and only the expected .com domains are present. The change aligns with the PR objective to update URLs from Twitter to X.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining Twitter-related references in the file.

# Test: Search for 'twitter' or 'tweet' (case-insensitive). Expect: No matches.
rg -i 'twitter|tweet' packages/components/user/stories/user.stories.tsx

# Test: Search for any remaining '.com' domains. Expect: Only 'x.com' and 'github.com'.
rg '\.com' packages/components/user/stories/user.stories.tsx

Length of output: 260

apps/docs/components/navbar.tsx (1)

37-37: LGTM: Import statement updated correctly.

The import statement has been successfully updated to use XIcon instead of TwitterIcon, which aligns with the PR objective of replacing Twitter references with X.

apps/docs/content/blog/v2.3.0.mdx (4)

10-10: LGTM: Author link updated to X (formerly Twitter)

The author's link has been correctly updated from "twitter.com" to "x.com", aligning with the rebranding of Twitter to X.


Line range hint 302-341: LGTM: Removal of units creation section added

The new section about removing the units creation is well-explained and provides clear upgrade instructions. This information is crucial for users updating to the new version.


Line range hint 342-362: LGTM: Separation of errorMessage and isInvalid section added

The new section about separating errorMessage and isInvalid is well-explained and provides clear upgrade instructions. This information is crucial for users updating to the new version and understanding the new validation approach.


Line range hint 384-406: LGTM: Additional improvements and changes documented

The new items in the "Improvements" section provide valuable information about the removal of custom units creation and updates to react versions. These additions align well with the breaking changes mentioned earlier in the document.

apps/docs/components/icons/social.tsx (1)

72-81: LGTM! New XIcon component added.

The new XIcon component has been implemented correctly and consistently with other icon components. Note that the default size is set to 20, while other icons typically use 24. This might be intentional for the X logo, but it's worth considering for consistency across icons.

@dgz9 dgz9 changed the title fix(docs): replace Twitter logo/links with X logo/links fix(docs): replace twitter logo/links with x logo/links Sep 27, 2024
Copy link

vercel bot commented Sep 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextui-docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 28, 2024 5:49am
nextui-storybook-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 28, 2024 5:49am

Copy link
Member

@wingkwong wingkwong left a comment

Choose a reason for hiding this comment

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

TwitterIcon can be removed since it's not in use.

@dgz9
Copy link
Contributor Author

dgz9 commented Sep 27, 2024

TwitterIcon can be removed since it's not in use.

Will do tonight.

Do you want me to remove all references of Twitter and replace with X or just keep it at the logo and links?

@wingkwong
Copy link
Member

I mean just TwitterIcon in apps/docs/components/icons/social.tsx since you replaced it with XIcon. TwitterIcon is not in use anymore.

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 (1)
.changeset/slimy-cats-brush.md (1)

1-6: LGTM! Minor suggestion for clarity.

The changeset file accurately reflects the updates made in this PR. It correctly identifies the packages being updated and provides a clear description of the changes related to the Twitter/X rebranding.

Consider slightly modifying the description for added clarity:

- Update Twitter logo, links, and named references to X. Removed Twitter logo from social based on review feedback.
+ Update Twitter logo, links, and named references to X. Removed Twitter logo from social icons based on review feedback.

This small change specifies that the Twitter logo was removed from the social icons, which aligns more precisely with the changes made in the PR.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 8966cd4 and e258fe8.

📒 Files selected for processing (6)
  • .changeset/slimy-cats-brush.md (1 hunks)
  • .github/ISSUE_TEMPLATE/config.yml (1 hunks)
  • apps/docs/components/icons/social.tsx (2 hunks)
  • apps/docs/components/navbar.tsx (2 hunks)
  • apps/docs/libs/constants.tsx (1 hunks)
  • packages/core/react/README.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • .github/ISSUE_TEMPLATE/config.yml
  • apps/docs/components/navbar.tsx
  • apps/docs/libs/constants.tsx
  • packages/core/react/README.md
🔇 Additional comments (2)
apps/docs/components/icons/social.tsx (2)

Line range hint 61-69: LGTM! New XIcon component added correctly.

The new XIcon component is well-structured and consistent with other icon components. Note that the default size is set to 20, which differs from the typical default of 24 used in other icons. This might be intentional for the X logo, but it's worth confirming.


457-457: Export statement updated correctly.

The export statement has been properly updated to include the new XIcon and remove the TwitterIcon. This change aligns with the PR objectives and the discussed removal of unused components.

@dgz9
Copy link
Contributor Author

dgz9 commented Sep 28, 2024

I was wondering about all the references to twitter, but I left it for now.

I removed the TwitterIcon and changed a few more name references (even though it looks weird as just X).

@wingkwong
Copy link
Member

Is it ready for review or you still have further changes?

@dgz9
Copy link
Contributor Author

dgz9 commented Sep 28, 2024

Ready for review. Let me know if you want any other changes.

Copy link
Member

@wingkwong wingkwong left a comment

Choose a reason for hiding this comment

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

final round of changes

apps/docs/components/navbar.tsx Outdated Show resolved Hide resolved
.changeset/slimy-cats-brush.md Outdated Show resolved Hide resolved
@wingkwong wingkwong assigned dgz9 and unassigned wingkwong Sep 28, 2024
Copy link
Member

@wingkwong wingkwong left a comment

Choose a reason for hiding this comment

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

X icon in light theme is not visible.

image
image

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 (1)
apps/docs/components/marketing/features-grid.tsx (1)

75-77: Approve changes with a minor suggestion for consistency

The update to the LinkIcon className improves visibility in both light and dark modes, which is a good enhancement. The icon will now be black in light mode and white in dark mode, ensuring better contrast against the background.

For consistency with other components in the file, consider using the slots object for styling. You could add a new slot for the link icon and use it like this:

-<LinkIcon className="text-black dark:text-white" height={18} width={18} />
+<LinkIcon className={slots.linkIcon({class: classNames?.linkIcon})} height={18} width={18} />

Then, add the following to the styles object at the top of the file:

linkIcon: "text-black dark:text-white",

This approach would maintain consistency with the styling method used throughout the component.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 15e5912 and ca64568.

📒 Files selected for processing (2)
  • apps/docs/components/marketing/features-grid.tsx (1 hunks)
  • apps/docs/libs/constants.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/docs/libs/constants.tsx

@dgz9
Copy link
Contributor Author

dgz9 commented Sep 28, 2024

Fixed light theme icon. Also noticed the feature grid icon was not working for light more, changed that too.

@wingkwong wingkwong merged commit e308198 into nextui-org:canary Sep 29, 2024
5 of 7 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📋 Scope : Docs Related to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants