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

[WEB-4100] New Footer component for refreshed nav #2374

Merged
merged 3 commits into from
Jan 9, 2025

Conversation

jamiehenson
Copy link
Member

@jamiehenson jamiehenson commented Jan 9, 2025

This pull request involves significant changes to the footer component and the removal of YAML data files related to the footer menu. The changes include the complete removal of several components and the addition of a new footer implementation.

Review link: https://ably-docs-web-4100-foot-yfmz2j.herokuapp.com/

Removal of old footer components and YAML data:

Addition of new footer implementation:

Dependency updates:

  • package.json: Updated the @ably/ui dependency version from 15.1.9 to 15.1.14.

Configuration updates:

  • gatsby-config.ts: Removed the gatsby-source-filesystem configuration for the yaml-page-furniture data source.

Summary by CodeRabbit

Release Notes

  • Removed Components

    • Completely removed the previous Footer implementation, including related components and data files
    • Deleted footer menu configurations and documentation
  • New Features

    • Introduced a new Footer component with updated design and structure
    • Integrated social media links and status indicator
  • Dependency Updates

    • Upgraded @ably/ui package from version 15.1.9 to 15.1.14
  • Configuration Changes

    • Removed Gatsby filesystem source plugin for YAML page furniture
    • Updated layout to incorporate new Footer component

Copy link

coderabbitai bot commented Jan 9, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The pull request involves a comprehensive refactoring of the footer components and related configurations. Multiple files related to the footer have been removed, including YAML configuration files, React components for footer navigation, and associated utility files. A new Footer component has been introduced in the src/components/Layout/Footer.tsx file, which provides a simplified and updated footer design. The changes also include updates to the Gatsby configuration and package dependencies.

Changes

File Change Summary
data/yaml/page-furniture/README.md Deleted documentation for Sidebar component
data/yaml/page-furniture/footerBottomMenu.yaml Removed footer bottom menu configuration
data/yaml/page-furniture/footerMenu.yaml Removed footer menu configuration
gatsby-config.ts Removed gatsby-source-filesystem plugin configuration for YAML page furniture
package.json Updated @ably/ui dependency from 15.1.9 to 15.1.14
src/components/Footer/* Completely removed multiple footer-related components and files
src/components/Layout/Footer.tsx Added new Footer component with updated design
src/components/Layout/Layout.tsx Updated Footer import and rendering location
src/components/index.ts Removed Footer export

Assessment against linked issues

Objective Addressed Explanation
Implement new header and footer for docs [WEB-4100]

Poem

🐰 A footer's tale, once complex and grand,
Simplified now by a rabbit's hand
Old links fade, new design takes flight
Minimalist magic, a digital delight!
Hop, hop, hooray for change so bright! 🌟

Finishing Touches

  • 📝 Generate Docstrings

🪧 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.

Sorry, something went wrong.

@ably-ci ably-ci temporarily deployed to ably-docs-web-4100-foot-yfmz2j January 9, 2025 14:09 Inactive
@jamiehenson
Copy link
Member Author

@coderabbitai review

Copy link

coderabbitai bot commented Jan 9, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@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

🧹 Nitpick comments (1)
src/components/Layout/Footer.tsx (1)

53-67: Consider extracting link rendering logic.

The link rendering logic could be extracted into a separate component for better reusability and maintainability.

+const FooterLinkSet: React.FC<{ links: Array<{ label: string; link: string }> }> = ({ links }) => (
+  <div className="flex gap-20">
+    {links.map((link) => (
+      <a
+        key={link.label}
+        href={link.link}
+        className="ui-text-menu4 text-neutral-900 hover:text-neutral-1300 dark:text-neutral-400 dark:hover:text-neutral-000 transition-colors"
+      >
+        {link.label}
+      </a>
+    ))}
+  </div>
+);

 <div className="flex justify-between w-full flex-col lg:flex-row px-24 lg:px-0 my-24 gap-24">
-  {[leftFooterLinks, rightFooterLinks].map((links, index) => (
-    <div key={`link-set-${index}`} className="flex gap-20">
-      {links.map((link) => (
-        <a
-          key={link.label}
-          href={link.link}
-          className="ui-text-menu4 text-neutral-900 hover:text-neutral-1300 dark:text-neutral-400 dark:hover:text-neutral-000 transition-colors"
-        >
-          {link.label}
-        </a>
-      ))}
-    </div>
-  ))}
+  <FooterLinkSet links={leftFooterLinks} />
+  <FooterLinkSet links={rightFooterLinks} />
 </div>
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 146ad0f and d2e43bd.

⛔ Files ignored due to path filters (2)
  • src/components/Footer/FooterTopNav/images/ably-logo.png is excluded by !**/*.png
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (19)
  • data/yaml/page-furniture/README.md (0 hunks)
  • data/yaml/page-furniture/footerBottomMenu.yaml (0 hunks)
  • data/yaml/page-furniture/footerMenu.yaml (0 hunks)
  • gatsby-config.ts (0 hunks)
  • package.json (1 hunks)
  • src/components/Footer/Footer.tsx (0 hunks)
  • src/components/Footer/FooterBottomNav.tsx (0 hunks)
  • src/components/Footer/FooterTopNav.tsx (0 hunks)
  • src/components/Footer/FooterTopNav/FooterLogo.tsx (0 hunks)
  • src/components/Footer/FooterTopNav/FooterMenu/FooterMenu.tsx (0 hunks)
  • src/components/Footer/FooterTopNav/FooterMenu/FooterMenuContainer.tsx (0 hunks)
  • src/components/Footer/FooterTopNav/FooterSocial/FooterSocialMenu.tsx (0 hunks)
  • src/components/Footer/FooterTopNav/FooterSocial/FooterSocialMenuIcons.tsx (0 hunks)
  • src/components/Footer/FooterTopNav/FooterStatus.tsx (0 hunks)
  • src/components/Footer/data.ts (0 hunks)
  • src/components/Footer/index.ts (0 hunks)
  • src/components/Layout/Footer.tsx (1 hunks)
  • src/components/Layout/Layout.tsx (2 hunks)
  • src/components/index.ts (0 hunks)
💤 Files with no reviewable changes (16)
  • src/components/index.ts
  • src/components/Footer/FooterTopNav/FooterSocial/FooterSocialMenuIcons.tsx
  • data/yaml/page-furniture/footerBottomMenu.yaml
  • src/components/Footer/index.ts
  • src/components/Footer/data.ts
  • data/yaml/page-furniture/footerMenu.yaml
  • src/components/Footer/FooterTopNav/FooterLogo.tsx
  • src/components/Footer/FooterTopNav/FooterSocial/FooterSocialMenu.tsx
  • src/components/Footer/FooterTopNav/FooterStatus.tsx
  • src/components/Footer/FooterTopNav.tsx
  • src/components/Footer/FooterBottomNav.tsx
  • gatsby-config.ts
  • src/components/Footer/Footer.tsx
  • data/yaml/page-furniture/README.md
  • src/components/Footer/FooterTopNav/FooterMenu/FooterMenu.tsx
  • src/components/Footer/FooterTopNav/FooterMenu/FooterMenuContainer.tsx
🔇 Additional comments (3)
src/components/Layout/Layout.tsx (1)

12-12: LGTM! Footer integration looks good.

The changes correctly integrate the new Footer component within the layout structure. The placement inside the Container component ensures consistent margins and spacing.

Also applies to: 30-30

src/components/Layout/Footer.tsx (1)

12-17: Review duplicate privacy link.

The 'Cookies' link points to the same URL as 'Privacy' ('/privacy'). Should this be a separate page for cookie policy?

package.json (1)

42-42: Verify @ably/ui version compatibility.

The update from 15.1.9 to 15.1.14 is a patch version change. Please ensure all used components are compatible with this version.

Run this script to check for any breaking changes or deprecation notices:

✅ Verification successful

@ably/ui version update is safe to proceed

The codebase uses stable core components and utilities from @ably/ui that are unlikely to have breaking changes in a patch version update (15.1.9 to 15.1.14). The main usage includes Icon, Badge, Accordion, and core utilities which are fundamental components of the library.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for breaking changes in @ably/ui between versions

# Get the changelog or release notes
gh release view v15.1.14 --repo ably/ably-ui

# Check for any issues related to these versions
gh issue list --repo ably/ably-ui --search "15.1.9..15.1.14 in:title,body"

Length of output: 141


Script:

#!/bin/bash
# Find all files importing from @ably/ui and show the import statements
rg --type js --type jsx --type ts --type tsx "from ['|\"]@ably/ui['\"]|from ['|\"]@ably/ui/.+['|\"]" -B 0 -A 0

# Find actual usage of components from @ably/ui
ast-grep --pattern 'import { $$$ } from "@ably/ui"'

Length of output: 202


Script:

#!/bin/bash
# Find all imports from @ably/ui with any pattern
rg "from ['\"]@ably/ui" --type-add 'frontend:*.{js,jsx,ts,tsx}' --type frontend

# Find files containing @ably/ui string to catch any other usage patterns
rg "@ably/ui" --type-add 'frontend:*.{js,jsx,ts,tsx}' --type frontend

Length of output: 13983

@jamiehenson jamiehenson temporarily deployed to ably-docs-web-4100-foot-yfmz2j January 9, 2025 14:25 Inactive
@jamiehenson jamiehenson temporarily deployed to ably-docs-web-4100-foot-yfmz2j January 9, 2025 14:30 Inactive
@jamiehenson jamiehenson requested review from kennethkalmer and a team January 9, 2025 14:38
Copy link
Member

@matt423 matt423 left a comment

Choose a reason for hiding this comment

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

+83 −350
👏

LGTM, matches the design as expected. We could benefit from an added test(s) but not a strong concern, but maybe one to add further along in the redesign effort.

Copy link
Member

@kennethkalmer kennethkalmer left a comment

Choose a reason for hiding this comment

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

@jamiehenson
Copy link
Member Author

jamiehenson commented Jan 9, 2025

Couldn't have said it better myself @kennethkalmer

@jamiehenson jamiehenson temporarily deployed to ably-docs-web-4100-foot-yfmz2j January 9, 2025 16:56 Inactive
@jamiehenson jamiehenson merged commit 706720f into web-4082-docs-nav-redesign Jan 9, 2025
5 checks passed
@jamiehenson jamiehenson deleted the web-4100-footer branch January 9, 2025 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants