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-3426] Modernize docs to latest Ably-UI Standards #2251

Merged
merged 5 commits into from
Dec 5, 2024

Conversation

aralovelace
Copy link
Contributor

@aralovelace aralovelace commented Aug 28, 2024

Description

This PR bumps ably-ui to the latest version (15.1.0 at the time of writing), and with it solves various conflicts and regressions that come about via breaking changes introduced in later versions of ably-ui.

Review

Instructions on how to review the PR.

Copilot Summary

This pull request includes a variety of updates and improvements across multiple files, focusing on dependency updates, configuration changes, and some refactoring of components and styles. The most important changes are summarized below:

Dependency and Configuration Updates:

  • Updated Node.js version from 18.12.0 to 20.13.1 in .circleci/config.yml, .tool-versions, and package.json. [1] [2] [3]
  • Updated @ably/ui dependency from version 11.0.0 to 15.1.0 in package.json.
  • Replaced classnames with clsx in package.json.
  • Added @tailwindcss/container-queries and updated tailwindcss to version 3.3.6 in package.json. [1] [2]

Codebase Refactoring:

  • Removed the ablySocial section from the footer and refactored related components (Footer.tsx, FooterTopNav.tsx, FooterSocialMenu.tsx). [1] [2] [3] [4] [5]
  • Updated import paths for syntax-highlighter and syntax-highlighter-registry in setupTests.js.

Style and Component Updates:

  • Changed button classes from ui-btn to ui-button-primary and ui-btn-secondary to ui-button-secondary in multiple components (InArticleOptions.tsx, how-to.mdx). [1] [2]
  • Updated DropdownButton.tsx to add h-full class and bold the dropdown title. [1] [2]
  • Refactored ContentLink.tsx and Title.tsx to use ui-text-p2 and ui-text-h4 classes respectively. [1] [2]

Documentation and Metadata Updates:

  • Corrected a typo in channels.yaml and updated the Twitter handle format. [1] [2]
  • Updated Discord server link in README.md.

These changes collectively improve the project's dependencies, simplify the codebase, and enhance the overall consistency and readability of the code.

Summary by CodeRabbit

  • New Features

    • Updated to use Node.js version 20.13.1 for improved compatibility.
    • Introduced FeatureLink component to replace CallToAction for enhanced call-to-action functionality.
    • Added new utility class names for buttons and links throughout the application.
  • Bug Fixes

    • Removed deprecated social media configuration, streamlining footer links.
  • Documentation

    • Improved clarity and consistency in how-to documentation for better user guidance.
  • Style

    • Updated multiple component styles to align with a new design system, including button and text styles.
    • Adjusted CSS imports and removed unused styles for better performance.
  • Chores

    • Updated various import paths for consistency and improved module resolution.
    • Removed unused TypeScript declarations and CSS files to clean up the codebase.
  • Tests

    • Updated test cases to reflect changes in class names and component structure.

@aralovelace aralovelace self-assigned this Aug 28, 2024
@ably-ci ably-ci temporarily deployed to ably-docs-web-3426-css--ynfyyk August 28, 2024 14:05 Inactive
@aralovelace aralovelace force-pushed the web-3426-css-changes-to-modernize-docs branch from 6fc72bd to 406c9ee Compare August 28, 2024 14:06
@aralovelace aralovelace temporarily deployed to ably-docs-next-staging August 28, 2024 14:07 Inactive
@aralovelace aralovelace temporarily deployed to ably-docs-web-3426-css--ynfyyk August 28, 2024 14:07 Inactive
@aralovelace aralovelace changed the title Web 3426 css changes to modernize docs [WEB-3426] Modernize docs to latest Ably-UI Standards Aug 28, 2024
@aralovelace aralovelace temporarily deployed to ably-docs-next-staging August 28, 2024 14:29 Inactive
@aralovelace aralovelace temporarily deployed to ably-docs-web-3426-css--ynfyyk August 28, 2024 14:29 Inactive
@aralovelace aralovelace temporarily deployed to ably-docs-next-staging August 29, 2024 10:20 Inactive
@aralovelace aralovelace temporarily deployed to ably-docs-web-3426-css--ynfyyk August 29, 2024 10:20 Inactive
@aralovelace aralovelace force-pushed the web-3426-css-changes-to-modernize-docs branch from 72498ea to adca1a8 Compare August 29, 2024 10:42
@aralovelace aralovelace temporarily deployed to ably-docs-web-3426-css--ynfyyk August 29, 2024 10:42 Inactive
@aralovelace aralovelace temporarily deployed to ably-docs-next-staging August 29, 2024 10:42 Inactive
@jamiehenson jamiehenson force-pushed the web-3426-css-changes-to-modernize-docs branch from adca1a8 to 89d9894 Compare November 4, 2024 14:44
@jamiehenson jamiehenson had a problem deploying to ably-docs-next-staging November 4, 2024 14:45 Failure
@jamiehenson jamiehenson temporarily deployed to ably-docs-next-staging November 4, 2024 14:52 Inactive
@jamiehenson jamiehenson force-pushed the web-3426-css-changes-to-modernize-docs branch from aefd249 to d3b142f Compare November 5, 2024 13:28
@jamiehenson jamiehenson temporarily deployed to ably-docs-next-staging November 5, 2024 13:28 Inactive
@jamiehenson jamiehenson temporarily deployed to ably-docs-next-staging November 5, 2024 14:33 Inactive
@jamiehenson jamiehenson temporarily deployed to ably-docs-next-staging November 5, 2024 17:28 Inactive
Copy link

coderabbitai bot commented Nov 12, 2024

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 introduces various changes across multiple components and configuration files, primarily focusing on updating the Node.js version, modifying CSS class names, and reorganizing imports. Notably, the CircleCI configuration is updated to use Node.js 20.13.1, and several components have adjusted their styling classes to align with a new design system. Additionally, some files have been deleted, including configurations for social media links and certain TypeScript declaration files. Overall, the changes aim to modernize the codebase and improve styling consistency.

Changes

File Path Change Summary
.circleci/config.yml Updated Node.js version to 20.13.1; adjusted workflow jobs based on content-update parameter.
.tool-versions Updated Node.js version from 18.12.0 to 20.13.1.
data/yaml/page-furniture/ablySocial.yaml Deleted configuration for social media links.
gatsby-browser.tsx Removed import for global CSS file.
how-tos/pub-sub/how-to.mdx Enhanced clarity and consistency in formatting; updated button class names.
jest.config.js Added prettierPath; updated transformIgnorePatterns.
package.json Updated Node.js engine requirement; modified several dependencies and versions.
setupTests.js Updated import paths for mocked modules.
src/components/Article/InArticleBanner/InArticleOptions.tsx Updated button class names for primary and secondary options.
src/components/Footer/Footer.tsx Removed ablySocial data fetching from GraphQL query.
src/components/Footer/FooterTopNav.tsx Removed ablySocialLinks prop from method signature.
src/components/Footer/FooterTopNav/FooterMenu/FooterMenu.tsx Made external property optional in FooterMenuItemType.
src/components/Footer/FooterTopNav/FooterSocial/FooterSocialMenu.tsx Removed ablySocialLinks prop; now uses imported data directly.
src/components/Footer/FooterTopNav/FooterStatus.tsx Added optional additionalCSS prop; updated type safety in useEffect.
src/components/Header/Dropdown/Button/DropdownButton.tsx Updated import path for classnames.
src/components/Header/Dropdown/Contents/ContentLink.tsx Changed class names for styling.
src/components/Header/Dropdown/Contents/Title.tsx Updated class name for <h4> element.
src/components/Header/Dropdown/DropdownMenu.tsx Removed ESLint directive for prop-types validation; added type guard.
src/components/Header/Dropdown/Summary/MaybeShowSummaryLink.tsx Changed class name for text styling.
src/components/Header/Dropdown/Summary/Summary.tsx Updated import path for classnames.
src/components/Header/Dropdown/Summary/SummaryDescription.tsx Removed inline styles; updated class name for paragraph.
src/components/Header/Dropdown/Summary/SummaryTitle.tsx Updated class name for <strong> element.
src/components/Header/HamburgerMenu/HamburgerDropdown/HamburgerDropdownFooter.tsx Changed class name for "Sign up free" link.
src/components/Header/HamburgerMenu/HamburgerDropdown/HamburgerSidebarRenderer/HamburgerSidebarDropdownButton.tsx Updated class name for <h4> element.
src/components/Header/HamburgerMenu/HamburgerDropdown/HamburgerSidebarRenderer/HamburgerSidebarDropdownContents.tsx Changed class name for <h4> element.
src/components/Header/HamburgerMenu/HamburgerDropdown/HamburgerSidebarRenderer/HamburgerSidebarDropdownSummary.tsx Updated class name for the paragraph element.
src/components/Header/HamburgerMenu/HamburgerDropdown/HamburgerSidebarRenderer/HamburgerSidebarDropdownPopulatedItem/MaybeShowHamburgerSummaryLink.tsx Changed class name for the wrapping <div>.
src/components/Header/Header.tsx Modified JSX structure and styling for navigation links.
src/components/Header/SearchBar/EmptyState.tsx Updated import path for classnames.
src/components/Header/SearchBar/KeyIcon.tsx Updated import statement for classnames.
src/components/Header/SearchBar/SearchBar.tsx Updated import path for classnames; no significant changes to logic.
src/components/Header/SearchBar/SuggestionBox.tsx Updated import path for classnames; changed class name for heading.
src/components/Header/TopMainNavIllustration/TopMainNavAblyLogo.tsx Updated import path for classnames.
src/components/Header/TopMainNavUser/DesktopSignedOut.tsx Changed class name for sign-up button.
src/components/Header/TopMainNavUser/SignedIn/SignIn.tsx Changed class name for dashboard link.
src/components/Header/TopMainNavUser/TopMainNavLink.tsx Updated external prop type to optional; changed class name.
src/components/Homepage/BodySection/BodySection.tsx Replaced CallToAction component with FeatureLink.
src/components/Homepage/BodySection/BodySectionDescription.tsx Updated class names for styling.
src/components/Homepage/BodySection/CallToAction.tsx Deleted the CallToAction component.
src/components/Homepage/BodySection/Card/FeatureCard.tsx Updated class names for heading and paragraph elements.
src/components/Homepage/BodySection/Card/HeroCard.tsx Changed class name for paragraph element.
src/components/Homepage/BodySection/Card/SdkCard.tsx Updated class names for title and content text.
src/components/HorizontalMenu/HorizontalMenu.tsx Updated import path for classnames.
src/components/LanguageButton/LanguageButton.test.tsx Updated class name in snapshots for button element.
src/components/LanguageButton/LanguageButton.tsx Updated import path for classnames; changed button class name.
src/components/Layout/Layout.tsx Updated import path for classnames; minor adjustment in className logic.
src/components/Markdown/CodeBlock.tsx Adjusted import paths for consistency; no functional changes.
src/components/Markdown/MarkdownProvider.tsx Updated class names and added optional chaining for href checks.
src/components/Menu/Label/index.tsx Updated import path for classnames.
src/components/Menu/LanguageDropdownSelector/LanguageDropdownSelector.tsx Updated styling and logic for dropdown component.
src/components/Menu/MenuItem/MenuItem.tsx Updated import path for classnames.
src/components/Menu/MenuItemButton/MenuItemButton.module.css Removed font-sans and font-light properties from .button.
src/components/Menu/MenuItemButton/MenuItemButton.tsx Updated import path for classnames.
src/components/Menu/ReactSelectStyles/control-styles.ts Removed fontFamily property from styles.
src/components/Menu/ReactSelectStyles/option-styles.ts Removed fontFamily property from styles.
src/components/Menu/styles.css Removed font-family property from .docs-menu-item; fixed syntax issue in @apply.
src/components/Notification/Notification.tsx Updated import path for classnames.
src/components/PageTitle.tsx Changed class name for <h1> element.
src/components/ProductNavigation/ProductNavigation.tsx Updated class names for active and inactive states.
src/components/ProductPage/BodySection/BodySection.tsx Replaced CallToAction component with FeatureLink.
src/components/ProductPage/BodySection/BodySectionDescription.tsx Updated class names for styling.
src/components/ProductPage/BodySection/CallToAction.tsx Deleted the CallToAction component.
src/components/ProductPage/BodySection/Card/ExampleCard.tsx Changed title element from <p> to <h4>; updated class names.
src/components/ProductPage/BodySection/Card/FeatureCard.tsx Updated layout and styling for card elements.
src/components/ProductPage/BodySection/Card/Links.tsx Added items-center class for vertical alignment.
src/components/ProductPage/BodySection/Card/QuickstartCard.tsx Updated class names for title and content.
src/components/ProductPage/BodySection/Card/TutorialCard.tsx Changed heading element from <h2> to <h4>; updated class name.
src/components/SDKInterfacePanel/SDKInterfacePanel.tsx Updated styling and logic for tooltip and interface panel.
src/components/SDKsPage/Card/index.tsx Updated class names and icons for buttons.
src/components/SDKsPage/MainSection/index.tsx Updated class names for links and paragraphs.
src/components/SDKsPage/index.tsx Updated class names for heading and paragraph elements.
src/components/Select/styles.ts Removed fontFamily and fontWeight properties from styles.
src/components/Sidebar/ExpandableIndicator.tsx Updated import path for classnames.
src/components/Sidebar/RightSidebar/RightSidebar.tsx Updated import path for classnames; no significant changes.
src/components/Sidebar/RightSidebar/RightSidebarMobile.tsx Updated class names for styling.
src/components/Sidebar/RightSidebar/RightSidebarWrapper.tsx Updated import path for classnames.
src/components/Sidebar/SectionTitle.module.css Updated font weight for .sectionTitle class.
src/components/Sidebar/SectionTitle.tsx Updated import path for classnames.
src/components/Sidebar/Sidebar.tsx Updated import path for classnames; adjusted class names for sidebar positioning.
src/components/Sidebar/SidebarHeading.test.tsx Simplified expected styles in tests for active state.
src/components/Sidebar/SidebarHeading.tsx Updated import path for classnames; modified class name logic.
src/components/Sidebar/SidebarItem/ExpandableAccordionHeading.module.css Updated font weight for .expanded span.
src/components/Sidebar/SidebarItem/ExpandableAccordionHeading.tsx Updated import path for classnames; removed isExpanded prop from Indicator.
src/components/StaticQuerySidebar/LeftSideBar.tsx Changed LeftSidebarProps from local to exported type.
src/components/StaticQuerySidebar/index.ts Updated export statements for LeftSidebarProps and LeftSideBar.
src/components/blocks/complex-functionality/Button.tsx Consolidated button variant handling; updated class names.
src/components/blocks/complex-functionality/styles.css Removed @import statement and @layer components block.
src/components/blocks/dividers/Aside.tsx Updated styling for text elements; no logic changes.
src/components/blocks/external-references/A.test.tsx Updated class name in snapshots for anchor element.
src/components/blocks/external-references/A.tsx Changed class name for Link component.
src/components/blocks/external-references/AElementHelpers/check-link-is-internal.test.ts Simplified test for internal link checking.
src/components/blocks/external-references/styles.css Deleted styles for .docs-link.
src/components/blocks/headings/H1.tsx Removed CSS import; no functional changes.
src/components/blocks/headings/H2.tsx Removed CSS import; no functional changes.
src/components/blocks/headings/H3.tsx Removed CSS import; no functional changes.
src/components/blocks/headings/H4.tsx Updated class name for <h4> element; removed CSS import.
src/components/blocks/software/Code/CodeCopyButton.tsx Removed CSS import; no functional changes.
src/components/blocks/software/Code/InlineCodeElement.tsx Changed class name for <code> element.
src/components/blocks/software/Code/MultilineCodeContent.tsx Updated import paths; no functional changes.
src/components/blocks/software/Code/index.tsx Updated import paths; no functional changes.
src/components/blocks/software/Pre.tsx Updated import path; changed link class name.
src/components/blocks/software/styles.css Removed CSS import and layer declaration; no functional changes.
src/components/blocks/table/Table.tsx Updated import path for classnames.
src/components/blocks/table/Th.tsx Updated import path for classnames.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant CircleCI
    participant NodeJS

    User->>App: Trigger build
    App->>CircleCI: Start build process
    CircleCI->>NodeJS: Use Node.js 20.13.1
    NodeJS->>CircleCI: Build completed
    CircleCI->>App: Notify build status
    App->>User: Display build results
Loading

Assessment against linked issues

Objective Addressed Explanation
Apply CSS changes to Modernize Docs Site UI (WEB-3426)

Poem

🐰 In the land of code, changes abound,
With Node 20, new styles are found.
Links now gleam with a fresh, bright hue,
A modernized site, just for you!
From buttons to banners, all in a row,
A hop, skip, and jump, let's watch it grow! 🌼


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

@jamiehenson jamiehenson temporarily deployed to ably-docs-next-staging November 12, 2024 13:47 Inactive
@jamiehenson jamiehenson force-pushed the web-3426-css-changes-to-modernize-docs branch from c4f79ea to 819bdc6 Compare November 21, 2024 17:34
@jamiehenson jamiehenson had a problem deploying to ably-docs-next-staging November 21, 2024 17:34 Failure
@jamiehenson jamiehenson force-pushed the web-3426-css-changes-to-modernize-docs branch from 819bdc6 to bd03f99 Compare November 25, 2024 11:51
@jamiehenson jamiehenson temporarily deployed to ably-docs-next-staging November 25, 2024 11:51 Inactive
@jamiehenson jamiehenson force-pushed the web-3426-css-changes-to-modernize-docs branch from bd03f99 to cc7370b Compare November 25, 2024 14:41
@jamiehenson jamiehenson temporarily deployed to ably-docs-next-staging November 25, 2024 14:41 Inactive
@jamiehenson jamiehenson temporarily deployed to ably-docs-next-staging December 2, 2024 17:19 Inactive
@jamiehenson jamiehenson force-pushed the web-3426-css-changes-to-modernize-docs branch from a359810 to 2ce0d3d Compare December 2, 2024 17:33
@jamiehenson jamiehenson temporarily deployed to ably-docs-next-staging December 3, 2024 12:54 Inactive
@jamiehenson
Copy link
Member

@coderabbitai review

Copy link

coderabbitai bot commented Dec 3, 2024

✅ 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: 4

🧹 Outside diff range and nitpick comments (9)
src/components/Footer/FooterTopNav/FooterSocial/FooterSocialMenu.tsx (2)

5-5: Consider keeping props for better component reusability.

While removing props simplifies the component, it creates tight coupling with the data file. Consider keeping the props interface with a default value from the imported data:

-export const FooterSocialMenu = () => (
+export const FooterSocialMenu = ({ links = ablySocialLinks }: { links?: Array<{ label: string; link: string }> }) => (

This approach would:

  • Maintain backward compatibility
  • Make the component more reusable
  • Facilitate easier testing
  • Allow for runtime data updates if needed

Line range hint 6-14: Implementation looks good with a minor type improvement suggestion.

The component implementation is clean and follows React best practices. Consider extracting the social link type for better type safety:

+type SocialLink = { label: string; link: string };
+
 export const FooterSocialMenu = () => (
   <>
     <p className="mt-24 ui-text-p3">Find us on:</p>
     <div className="pt-16 flex items-center">
-      {ablySocialLinks.map((social: { label: string; link: string }) => (
+      {ablySocialLinks.map((social: SocialLink) => (
         <FooterSocialMenuIcons label={social.label} link={social.link} key={social.label} />
       ))}
     </div>
   </>
 );
src/components/blocks/software/Pre.tsx (3)

Line range hint 47-106: Consider extracting SDK interface logic into a custom hook

The SDK interface handling logic is complex and could benefit from being extracted into a custom hook for better maintainability and reusability. This would also make it easier to add proper error handling and loading states.

Example implementation:

// useSDKInterface.ts
export const useSDKInterface = (altData: Record<string, any>, initialInterface = DEFAULT_PREFERRED_INTERFACE) => {
  const [selectedSDKInterface, setSelectedSDKInterface] = useState(initialInterface);
  const [previousSDKInterface, setPreviousSDKInterface] = useState('');

  useEffect(() => {
    // Move the SDK interface selection logic here
    if (altData) {
      const allRealtimeData = Object.entries(altData)
        .map(([language]) =>
          language?.includes(`${REALTIME_SDK_INTERFACE}_`) ? language.split('_', 2)[1] : '',
        )
        .filter(Boolean);

      // Add your existing logic here
    }
  }, [altData, selectedSDKInterface]);

  return {
    selectedSDKInterface,
    setSelectedSDKInterface,
    previousSDKInterface,
    setPreviousSDKInterface,
  };
};

Line range hint 189-195: Add TypeScript return types and JSDoc documentation

The utility functions would benefit from explicit return type annotations and JSDoc documentation for better maintainability and IDE support.

Example implementation:

/**
 * Removes SDK interface prefix from language string if present
 * @param language - The language string that may contain SDK interface prefix
 * @returns The cleaned language string without SDK interface prefix
 */
export const cleanIfLanguageHasSDKInterface = (language: string): string =>
  language.includes(`${REALTIME_SDK_INTERFACE}_`) || language.includes(`${REST_SDK_INTERFACE}_`)
    ? language.split('_', 2)[1]
    : language;

/**
 * Filters and transforms language list based on selected SDK interface
 * @param allLanguage - Array of all available languages
 * @param selectedSDKInterface - Currently selected SDK interface
 * @returns Array of languages that match the selected SDK interface
 */
const getLanguagesSDKInterface = (allLanguage: string[], selectedSDKInterface: string): string[] =>
  allLanguage.map((language) => (language.includes(`${selectedSDKInterface}_`) ? language : '')).filter((s) => s);

Line range hint 156-169: Enhance accessibility for info message

The info message section could benefit from improved accessibility support for screen readers.

Example implementation:

-      <aside className="mb-16 flex justify-between items-start">
+      <aside className="mb-16 flex justify-between items-start" role="alert" aria-label="Language support information">
-        <div className="mt-2">
+        <div className="mt-2" aria-hidden="true">
           <Icon name="icon-gui-info" size="1rem" />
         </div>
         <div className="ml-8 leading-normal">
           You&apos;re currently viewing the <span className="font-semibold">{languageLabel ?? pageLanguage}</span>{' '}
           docs. There either isn&apos;t a {languageLabel ?? pageLanguage} code sample for this example, or this
           feature isn&apos;t supported in {languageLabel ?? pageLanguage}. Switch language to view this example in a
           different language, or{' '}
-            <a className="ui-link" href="/docs/sdks">
+            <a className="ui-link" href="/docs/sdks" aria-label="Check SDK feature support documentation">
               check which SDKs support this feature.
             </a>
src/styles/global.css (1)

Legal disclaimer needs to be updated or removed

The codebase no longer uses Optimo webfonts - only JetBrains Mono font declarations are present, with Manrope referenced as a fallback font family. The current Optimo fonts legal disclaimer is irrelevant and should be removed or replaced with appropriate licensing information for JetBrains Mono.

  • Remove or update the Optimo webfonts legal disclaimer in src/styles/global.css
  • If needed, add appropriate licensing information for JetBrains Mono font usage
🔗 Analysis chain

Line range hint 93-108: Verify font licensing compliance

The legal disclaimer mentions restrictions for Optimo webfonts. Please verify that the new Manrope font usage complies with licensing requirements.


The previous result showed that global.css contains Optimo-related text, but we need to verify:

  1. If there are actual Optimo font declarations still in use
  2. How the Manrope font is declared and if it potentially conflicts with the Optimo disclaimer
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for any remaining references to Optimo fonts
echo "Checking for Optimo font references:"
rg -l "optimo" src/

Length of output: 124


Script:

#!/bin/bash
# Let's check the content of global.css to understand the font declarations
echo "Checking font declarations in global.css:"
rg -A 5 "@font-face" src/styles/global.css

# Also check for any Manrope font references
echo -e "\nChecking Manrope font references:"
rg "Manrope" src/styles/global.css

Length of output: 1321

tailwind.config.js (2)

34-40: Consider documenting safelist patterns

The safelist configuration is well-structured, combining both static classes and pattern matches. However, consider adding comments to explain the purpose of each pattern, especially for future maintainability.

  safelist: [
    ...ablyUIConfig.safelist,
+   // API Reference specific background colors
    ...Object.keys(apiReferenceSpecificColors).map((c) => `bg-${c}`),
+   // Highlight and notification background colors
    ...Object.keys(highlightColors).map((c) => `bg-${c}`),
+   // Standard utility classes used dynamically
    ...safelistStandard,
+   // Dynamic class patterns (docs-* and col-span-*)
    ...safelistGreedy,
  ],

Line range hint 9-24: Remove deprecated statusColors object

The comment indicates that statusColors should be removed when ably-ui 14 lands. Since this PR updates to ably-ui 15.1.0, this object should be removed.

-// Remove this when ably-ui 14 lands, along with the Status component
-const statusColors = {
-  'status-operational': '#00e80b',
-  'status-minor': '#f8c100',
-  'status-major': '#ff723f',
-  'status-critical': '#e40000',
-  'status-unknown': '#c6ced9',
-};
package.json (1)

130-130: Document prettier version constraint

The addition of prettier-2 as an alias for prettier@^2 should be documented to explain why this specific version is required.

Add a comment in the README or documentation explaining the prettier version constraint and its purpose.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between a06d055 and 35efe6e.

⛔ Files ignored due to path filters (16)
  • src/components/blocks/Html/__snapshots__/Html.test.tsx.snap is excluded by !**/*.snap
  • src/components/blocks/software/__snapshots__/Pre.test.tsx.snap is excluded by !**/*.snap
  • src/components/blocks/wrappers/__snapshots__/ConditionalChildrenLanguageDisplay.test.js.snap is excluded by !**/*.snap
  • src/components/blocks/wrappers/__snapshots__/LocalLanguageAlternatives.test.tsx.snap is excluded by !**/*.snap
  • src/external-scripts/__snapshots__/utils.test.ts.snap is excluded by !**/*.snap
  • src/fonts/museosans/300/webfont.woff is excluded by !**/*.woff
  • src/fonts/museosans/300/webfont.woff2 is excluded by !**/*.woff2
  • src/fonts/museosans/500/webfont.woff is excluded by !**/*.woff
  • src/fonts/museosans/500/webfont.woff2 is excluded by !**/*.woff2
  • src/fonts/museosans/500italic/webfont.woff is excluded by !**/*.woff
  • src/fonts/museosans/500italic/webfont.woff2 is excluded by !**/*.woff2
  • src/fonts/museosans/700/webfont.woff is excluded by !**/*.woff
  • src/fonts/museosans/700/webfont.woff2 is excluded by !**/*.woff2
  • src/fonts/museosans/900/webfont.woff is excluded by !**/*.woff
  • src/fonts/museosans/900/webfont.woff2 is excluded by !**/*.woff2
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (93)
  • data/yaml/page-furniture/ablySocial.yaml (0 hunks)
  • how-tos/pub-sub/README.md (1 hunks)
  • how-tos/pub-sub/how-to.mdx (3 hunks)
  • jest.config.js (2 hunks)
  • package.json (5 hunks)
  • src/components/Article/InArticleBanner/InArticleOptions.tsx (1 hunks)
  • src/components/ButtonWithTooltip/ButtonWithTooltip.tsx (1 hunks)
  • src/components/Footer/Footer.tsx (1 hunks)
  • src/components/Footer/FooterTopNav.tsx (1 hunks)
  • src/components/Footer/FooterTopNav/FooterMenu/FooterMenu.tsx (1 hunks)
  • src/components/Footer/FooterTopNav/FooterSocial/FooterSocialMenu.tsx (1 hunks)
  • src/components/Footer/data.ts (1 hunks)
  • src/components/Header/Dropdown/Button/DropdownButton.tsx (2 hunks)
  • src/components/Header/Dropdown/Contents/ContentLink.tsx (1 hunks)
  • src/components/Header/Dropdown/Contents/Title.tsx (1 hunks)
  • src/components/Header/Dropdown/DropdownMenu.tsx (0 hunks)
  • src/components/Header/Dropdown/Summary/Summary.tsx (1 hunks)
  • src/components/Header/Dropdown/Summary/SummaryDescription.tsx (1 hunks)
  • src/components/Header/Dropdown/Summary/SummaryTitle.tsx (1 hunks)
  • src/components/Header/HamburgerMenu/HamburgerDropdown/HamburgerDropdownFooter.tsx (1 hunks)
  • src/components/Header/HamburgerMenu/HamburgerDropdown/HamburgerSidebarRenderer/HamburgerSidebarDropdownPopulatedItem/HamburgerSidebarDropdownButton.tsx (1 hunks)
  • src/components/Header/HamburgerMenu/HamburgerDropdown/HamburgerSidebarRenderer/HamburgerSidebarDropdownPopulatedItem/HamburgerSidebarDropdownContents.tsx (1 hunks)
  • src/components/Header/HamburgerMenu/HamburgerDropdown/HamburgerSidebarRenderer/HamburgerSidebarDropdownPopulatedItem/HamburgerSidebarDropdownSummary.tsx (1 hunks)
  • src/components/Header/HamburgerMenu/HamburgerDropdown/HamburgerSidebarRenderer/HamburgerSidebarDropdownPopulatedItem/MaybeShowHamburgerSummaryLink.tsx (1 hunks)
  • src/components/Header/Header.tsx (1 hunks)
  • src/components/Header/SearchBar/EmptyState.tsx (1 hunks)
  • src/components/Header/SearchBar/KeyIcon.tsx (1 hunks)
  • src/components/Header/SearchBar/SearchBar.tsx (1 hunks)
  • src/components/Header/SearchBar/SuggestionBox.tsx (2 hunks)
  • src/components/Header/TopMainNavIllustration/TopMainNavAblyLogo.tsx (1 hunks)
  • src/components/Header/TopMainNavUser/DesktopSignedOut.tsx (1 hunks)
  • src/components/Header/TopMainNavUser/SignedIn/SignIn.tsx (1 hunks)
  • src/components/Homepage/BodySection/BodySection.tsx (2 hunks)
  • src/components/Homepage/BodySection/BodySectionDescription.tsx (1 hunks)
  • src/components/Homepage/BodySection/CallToAction.tsx (0 hunks)
  • src/components/Homepage/BodySection/Card/FeatureCard.tsx (1 hunks)
  • src/components/Homepage/BodySection/Card/HeroCard.tsx (1 hunks)
  • src/components/Homepage/BodySection/Card/SdkCard.tsx (1 hunks)
  • src/components/HorizontalMenu/HorizontalMenu.tsx (1 hunks)
  • src/components/LanguageButton/LanguageButton.test.tsx (4 hunks)
  • src/components/LanguageButton/LanguageButton.tsx (2 hunks)
  • src/components/Layout/Layout.tsx (2 hunks)
  • src/components/Markdown/MarkdownProvider.tsx (2 hunks)
  • src/components/Menu/Label/index.tsx (1 hunks)
  • src/components/Menu/MenuItem/MenuItem.tsx (1 hunks)
  • src/components/Menu/MenuItemButton/MenuItemButton.module.css (1 hunks)
  • src/components/Menu/MenuItemButton/MenuItemButton.tsx (1 hunks)
  • src/components/Notification/Notification.tsx (1 hunks)
  • src/components/PageTitle.tsx (1 hunks)
  • src/components/ProductNavigation/ProductNavigation.tsx (2 hunks)
  • src/components/ProductPage/BodySection/BodySection.tsx (2 hunks)
  • src/components/ProductPage/BodySection/BodySectionDescription.tsx (1 hunks)
  • src/components/ProductPage/BodySection/CallToAction.tsx (0 hunks)
  • src/components/ProductPage/BodySection/Card/ExampleCard.tsx (1 hunks)
  • src/components/ProductPage/BodySection/Card/FeatureCard.tsx (1 hunks)
  • src/components/ProductPage/BodySection/Card/Links.tsx (1 hunks)
  • src/components/ProductPage/BodySection/Card/QuickstartCard.tsx (1 hunks)
  • src/components/ProductPage/BodySection/Card/TutorialCard.tsx (1 hunks)
  • src/components/SDKInterfacePanel/SDKInterfacePanel.tsx (1 hunks)
  • src/components/SDKsPage/Card/index.tsx (2 hunks)
  • src/components/SDKsPage/MainSection/index.tsx (2 hunks)
  • src/components/SDKsPage/index.tsx (1 hunks)
  • src/components/Select/styles.ts (0 hunks)
  • src/components/Sidebar/ExpandableIndicator.tsx (1 hunks)
  • src/components/Sidebar/RightSidebar/RightSidebar.tsx (1 hunks)
  • src/components/Sidebar/RightSidebar/RightSidebarMobile.tsx (1 hunks)
  • src/components/Sidebar/RightSidebar/RightSidebarWrapper.tsx (1 hunks)
  • src/components/Sidebar/SectionTitle.tsx (1 hunks)
  • src/components/Sidebar/Sidebar.tsx (2 hunks)
  • src/components/Sidebar/SidebarHeading.tsx (3 hunks)
  • src/components/Sidebar/SidebarItem/ExpandableAccordionHeading.tsx (2 hunks)
  • src/components/blocks/complex-functionality/Button.tsx (1 hunks)
  • src/components/blocks/dividers/Aside.tsx (2 hunks)
  • src/components/blocks/external-references/A.test.tsx (1 hunks)
  • src/components/blocks/external-references/A.tsx (1 hunks)
  • src/components/blocks/external-references/styles.css (0 hunks)
  • src/components/blocks/headings/H4.tsx (1 hunks)
  • src/components/blocks/software/Code/InlineCodeElement.tsx (1 hunks)
  • src/components/blocks/software/Code/MultilineCodeContent.tsx (2 hunks)
  • src/components/blocks/software/Pre.tsx (2 hunks)
  • src/components/blocks/table/Table.tsx (1 hunks)
  • src/components/blocks/table/Th.tsx (1 hunks)
  • src/components/blocks/typography/P/index.tsx (1 hunks)
  • src/components/blocks/wrappers/CopyLink.tsx (2 hunks)
  • src/pages/api/control-api.tsx (2 hunks)
  • src/styles/fonts.js (1 hunks)
  • src/styles/global.css (2 hunks)
  • src/types/ably-ui-core-images/ably-ui-icon-loading.d.ts (0 hunks)
  • src/types/ably-ui-core-images/ably-ui-logo-loading.d.ts (0 hunks)
  • src/types/ably-ui-core-links/index.d.ts (0 hunks)
  • src/types/ably-ui-core-scripts/index.d.ts (0 hunks)
  • tailwind.config.js (1 hunks)
  • tsconfig.json (1 hunks)
💤 Files with no reviewable changes (10)
  • data/yaml/page-furniture/ablySocial.yaml
  • src/components/blocks/external-references/styles.css
  • src/types/ably-ui-core-images/ably-ui-logo-loading.d.ts
  • src/components/Homepage/BodySection/CallToAction.tsx
  • src/types/ably-ui-core-images/ably-ui-icon-loading.d.ts
  • src/components/Select/styles.ts
  • src/types/ably-ui-core-links/index.d.ts
  • src/components/ProductPage/BodySection/CallToAction.tsx
  • src/components/Header/Dropdown/DropdownMenu.tsx
  • src/types/ably-ui-core-scripts/index.d.ts
✅ Files skipped from review due to trivial changes (2)
  • how-tos/pub-sub/README.md
  • src/components/Header/SearchBar/SearchBar.tsx
🚧 Files skipped from review as they are similar to previous changes (73)
  • src/components/Header/TopMainNavUser/DesktopSignedOut.tsx
  • src/components/Header/TopMainNavIllustration/TopMainNavAblyLogo.tsx
  • src/components/Header/Dropdown/Summary/SummaryDescription.tsx
  • src/components/Header/Dropdown/Button/DropdownButton.tsx
  • src/components/Footer/data.ts
  • src/components/HorizontalMenu/HorizontalMenu.tsx
  • src/components/Header/HamburgerMenu/HamburgerDropdown/HamburgerSidebarRenderer/HamburgerSidebarDropdownPopulatedItem/HamburgerSidebarDropdownSummary.tsx
  • src/components/Header/Dropdown/Contents/Title.tsx
  • src/components/Footer/FooterTopNav/FooterMenu/FooterMenu.tsx
  • src/components/Menu/MenuItemButton/MenuItemButton.module.css
  • src/components/ProductPage/BodySection/Card/TutorialCard.tsx
  • src/components/Article/InArticleBanner/InArticleOptions.tsx
  • src/components/Menu/MenuItemButton/MenuItemButton.tsx
  • src/components/LanguageButton/LanguageButton.tsx
  • src/components/Homepage/BodySection/Card/SdkCard.tsx
  • src/components/Menu/Label/index.tsx
  • src/components/blocks/software/Code/InlineCodeElement.tsx
  • src/components/Sidebar/SidebarItem/ExpandableAccordionHeading.tsx
  • src/components/Header/Dropdown/Summary/SummaryTitle.tsx
  • src/components/Sidebar/ExpandableIndicator.tsx
  • src/components/Sidebar/SectionTitle.tsx
  • tsconfig.json
  • src/components/PageTitle.tsx
  • src/components/SDKsPage/MainSection/index.tsx
  • src/components/Header/Dropdown/Summary/Summary.tsx
  • src/components/Header/Dropdown/Contents/ContentLink.tsx
  • src/components/Header/HamburgerMenu/HamburgerDropdown/HamburgerSidebarRenderer/HamburgerSidebarDropdownPopulatedItem/HamburgerSidebarDropdownContents.tsx
  • src/components/Homepage/BodySection/Card/HeroCard.tsx
  • src/components/Header/TopMainNavUser/SignedIn/SignIn.tsx
  • src/components/Header/HamburgerMenu/HamburgerDropdown/HamburgerSidebarRenderer/HamburgerSidebarDropdownPopulatedItem/HamburgerSidebarDropdownButton.tsx
  • src/components/blocks/headings/H4.tsx
  • src/components/Sidebar/RightSidebar/RightSidebarMobile.tsx
  • src/components/blocks/external-references/A.test.tsx
  • src/components/blocks/external-references/A.tsx
  • src/components/Header/HamburgerMenu/HamburgerDropdown/HamburgerDropdownFooter.tsx
  • src/components/Menu/MenuItem/MenuItem.tsx
  • src/components/ProductPage/BodySection/Card/QuickstartCard.tsx
  • src/components/blocks/dividers/Aside.tsx
  • src/components/ProductPage/BodySection/BodySectionDescription.tsx
  • src/components/Homepage/BodySection/BodySectionDescription.tsx
  • src/components/Header/Header.tsx
  • src/components/blocks/typography/P/index.tsx
  • src/components/Header/SearchBar/SuggestionBox.tsx
  • src/components/blocks/table/Th.tsx
  • src/components/Header/SearchBar/KeyIcon.tsx
  • src/components/Footer/Footer.tsx
  • src/components/Header/HamburgerMenu/HamburgerDropdown/HamburgerSidebarRenderer/HamburgerSidebarDropdownPopulatedItem/MaybeShowHamburgerSummaryLink.tsx
  • src/components/Markdown/MarkdownProvider.tsx
  • src/components/LanguageButton/LanguageButton.test.tsx
  • src/components/blocks/wrappers/CopyLink.tsx
  • src/components/ProductPage/BodySection/Card/Links.tsx
  • src/components/SDKsPage/index.tsx
  • src/components/Footer/FooterTopNav.tsx
  • src/pages/api/control-api.tsx
  • src/components/ProductNavigation/ProductNavigation.tsx
  • src/components/SDKInterfacePanel/SDKInterfacePanel.tsx
  • src/components/ProductPage/BodySection/Card/FeatureCard.tsx
  • src/components/Sidebar/Sidebar.tsx
  • src/components/Sidebar/RightSidebar/RightSidebarWrapper.tsx
  • src/components/Layout/Layout.tsx
  • src/components/Sidebar/RightSidebar/RightSidebar.tsx
  • src/components/ButtonWithTooltip/ButtonWithTooltip.tsx
  • src/components/ProductPage/BodySection/BodySection.tsx
  • src/components/blocks/table/Table.tsx
  • src/components/Sidebar/SidebarHeading.tsx
  • src/components/ProductPage/BodySection/Card/ExampleCard.tsx
  • src/components/SDKsPage/Card/index.tsx
  • src/components/Notification/Notification.tsx
  • jest.config.js
  • src/components/Header/SearchBar/EmptyState.tsx
  • src/components/blocks/complex-functionality/Button.tsx
  • src/components/Homepage/BodySection/BodySection.tsx
  • src/components/blocks/software/Code/MultilineCodeContent.tsx
🧰 Additional context used
📓 Learnings (1)
how-tos/pub-sub/how-to.mdx (1)
Learnt from: jamiehenson
PR: ably/docs#2251
File: how-tos/pub-sub/how-to.mdx:51-51
Timestamp: 2024-12-03T12:52:14.160Z
Learning: In the 'ably/docs' repository, unless a PR specifically mentions MDX refactoring, MDX files (`*.mdx` files) should not be reviewed.
🪛 Biome (1.9.4)
src/styles/global.css

[error] 50-50: Duplicate font names are redundant and unnecessary: Segoe

Remove duplicate font names within the property

(lint/suspicious/noDuplicateFontNames)

🪛 LanguageTool
how-tos/pub-sub/how-to.mdx

[grammar] ~74-~74: The verb form ‘explain’ does not appear to fit in this context.
Context: ...ton> ## Further reading The following reading explain the concepts of pub/sub and channels in...

(SINGULAR_NOUN_VERB_AGREEMENT)

🔇 Additional comments (10)
how-tos/pub-sub/how-to.mdx (1)

Line range hint 1-78: Skipping review of MDX file

Based on previous feedback from @jamiehenson, we should not review MDX files unless a PR specifically mentions MDX refactoring. Since this PR focuses on updating the ably-ui library and modernizing docs to latest Ably-UI standards without explicitly mentioning MDX refactoring, we'll skip reviewing this file.

🧰 Tools
🪛 LanguageTool

[grammar] ~74-~74: The verb form ‘explain’ does not appear to fit in this context.
Context: ...ton> ## Further reading The following reading explain the concepts of pub/sub and channels in...

(SINGULAR_NOUN_VERB_AGREEMENT)

src/components/Homepage/BodySection/Card/FeatureCard.tsx (1)

13-14: LGTM! Consistent with UI modernization

The typography classes (ui-text-h3, ui-text-p1) align with the new design system standards.

src/components/Footer/FooterTopNav/FooterSocial/FooterSocialMenu.tsx (1)

3-3: Verify the data file structure and consider using absolute imports.

While moving social links to a separate data file is a good practice, consider using absolute imports for better maintainability.

✅ Verification successful

Import path and data structure are correctly implemented

The verification confirms that:

  • The data file exists at the correct location: src/components/Footer/data.ts
  • The ablySocialLinks export is properly structured with social media links
  • The relative import path ../../data correctly resolves to the data file
  • This is the only component importing ablySocialLinks, suggesting proper encapsulation within the Footer component
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the data file structure and exports

# Check if the data file exists and contains the expected exports
rg -A 5 "export.*ablySocialLinks" "src/components/Footer/data.ts"

# Check for any other components using this data to ensure consistency
rg "import.*ablySocialLinks" --type typescript

Length of output: 605


Script:

#!/bin/bash
# Let's try with a more reliable approach to find TypeScript files
rg "import.*ablySocialLinks" -g "*.ts" -g "*.tsx"

# Also verify the relative path resolution is correct by checking the directory structure
fd "data.ts" src/components/Footer/

Length of output: 232

src/components/blocks/software/Pre.tsx (1)

2-2: LGTM: Class name updates align with Ably-UI standards

The changes to import the cn utility and update class names from 'docs-link' to 'ui-link' are consistent with the PR's objective to modernize the UI standards.

Also applies to: 165-165

src/styles/fonts.js (1)

Line range hint 1-120: Verify font usage across components

Let's ensure all components are properly updated to handle the new font system.

✅ Verification successful

The previous search pattern might have been too restrictive. Let's broaden our search to catch different import syntaxes and direct usage of font-related properties. This will help us verify if there are any components that need to be updated with the new font system.


The previous results show that fonts are primarily used through CSS modules and global CSS, with the fonts.js being imported in index.js. Let's verify how these styles are being composed and if there are any styled-components usages that might be affected by the font changes.


Based on the collected evidence from all the searches, I can now provide a final response:

Font system changes appear to be safely contained within the styling system

The codebase follows a well-structured approach where:

  • Font definitions are centrally managed in src/styles/fonts.js
  • Styles are primarily applied through CSS modules (.module.css files)
  • The font system is exported through src/styles/index.js as a named export
  • Components use direct CSS properties rather than the font system's JavaScript exports

The changes to fonts.js don't require updates across components because:

  • No direct usage of the fonts import was found in component files
  • Font styles are applied through CSS modules with hardcoded values
  • Global font settings are handled through global.css
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for components using font definitions
echo "Components using font definitions:"
rg -l "import.*fonts'" src/

Length of output: 111


Script:

#!/bin/bash
# Let's try different search patterns to find font usage
echo "Searching for font imports and usage:"
rg -l "fonts['\"]" src/

echo -e "\nSearching for specific font styles:"
rg "font-size|font-weight|font-family" src/

echo -e "\nSearching for font weight constants:"
rg "weights\." src/

Length of output: 2591


Script:

#!/bin/bash
# Let's check how fonts are being imported and used in the codebase
echo "Checking fonts import in index.js:"
cat src/styles/index.js

echo -e "\nChecking for styled-components or CSS-in-JS usage:"
rg "styled|css`|css\(" src/

echo -e "\nChecking global CSS variables for fonts:"
rg "@font-face|:root|--.*font" src/styles/global.css

Length of output: 542

src/styles/global.css (3)

13-13: LGTM: Syntax highlighter integration

The addition of syntax-highlighter.css aligns with the modernization effort and improves code presentation consistency.


37-52: 🛠️ Refactor suggestion

Remove duplicate Segoe UI font entries

The font stack contains duplicate Segoe UI entries which should be consolidated.

    font-family:
      Manrope,
      ui-sans-serif,
      system-ui,
      -apple-system,
      BlinkMacSystemFont,
      Roboto,
      Helvetica Neue,
      Arial,
      Noto Sans,
      sans-serif,
      Apple Color Emoji,
-     Segoe UI,
-     Segoe UI Emoji,
+     Segoe UI, Segoe UI Emoji,
      Segoe UI Symbol,
      Noto Color Emoji;
🧰 Tools
🪛 Biome (1.9.4)

[error] 50-50: Duplicate font names are redundant and unnecessary: Segoe

Remove duplicate font names within the property

(lint/suspicious/noDuplicateFontNames)


54-54: Verify impact of font size reduction

The font size reduction from 17px to 16px might affect existing layouts and readability.

✅ Verification successful

Let me gather more specific information about the font size usage across these components.


Font size change is safe to proceed

The reduction from 17px to 16px is actually aligning with the existing design system, as multiple components already use 16px as their base font size. The codebase shows consistent usage of 16px, 14px, and smaller sizes (10px, 12px) for different components, with some components using relative units (rem) for better scaling. This change appears to be a standardization rather than a breaking modification.

  • Most base-level text components already use 16px
  • Components with specific requirements use either smaller sizes (14px, 12px, 10px) or relative units (rem)
  • No components were found relying on 17px as a base for calculations
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for components with specific pixel measurements that might be affected
echo "Components with pixel-based measurements:"
rg -l "(\d+)px" src/components/

Length of output: 2663


Script:

#!/bin/bash
# Search for specific font-size declarations in the codebase
echo "Font size declarations in components:"
rg "font-size:\s*\d+px" -A 1 --no-filename

# Check if there are any relative font sizes that might be affected
echo -e "\nRelative font size declarations:"
rg "font-size:\s*\d+(\.\d+)?rem" -A 1 --no-filename

# Check for any font-size CSS variables that might be using this as a base
echo -e "\nFont size CSS variables:"
rg ":root|--.*font" src/styles/

Length of output: 1050

package.json (2)

42-42: Verify @ably/ui breaking changes

The update from @ably/ui ^11.0.0 to ^15.1.0 is a major version bump that might introduce breaking changes.


16-16: Verify Node.js version compatibility with all dependencies

The Node.js version has been updated to ^20.13.1. This is a major version bump from ^18.12.0.

✅ Verification successful

Let me gather more information about the dependencies and their Node.js version requirements.


Let me check the workspace package.json file to ensure there are no conflicts.


Node.js 20.13.1 is compatible with all dependencies

After analyzing the dependencies' Node.js version requirements:

  • All Gatsby-related packages require Node.js >=18.0.0
  • Critical development tools like ESLint, TypeScript-ESLint support Node.js 20
  • Testing libraries (@testing-library/react, jest) are compatible with Node.js 20
  • No dependencies have explicit incompatibility with Node.js 20

The upgrade to Node.js 20.13.1 is safe to proceed with.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for potential compatibility issues with Node.js 20

# Check package.json for engines field in dependencies
echo "Checking dependencies for Node.js version constraints:"
jq -r '.dependencies | to_entries[] | select(.value | contains("engines"))' package.json

# Check for known compatibility issues in package-lock.json
if [ -f "package-lock.json" ]; then
  echo "Checking package-lock.json for compatibility issues:"
  jq -r '.packages | .[] | select(.engines != null) | select(.engines.node != null) | select(.engines.node | contains("20") | not)' package-lock.json
fi

Length of output: 240


Script:

#!/bin/bash
# Let's check the actual dependencies and their versions
echo "Package.json content:"
cat package.json

# Check if there's a yarn.lock file and show its content
if [ -f "yarn.lock" ]; then
    echo -e "\nChecking yarn.lock for dependency constraints:"
    cat yarn.lock | grep -A 1 "node "
fi

# List all package.json files in the project to check for workspace dependencies
echo -e "\nChecking for workspace package.json files:"
fd package.json

Length of output: 5749


Script:

#!/bin/bash
# Check the workspace package.json for any Node.js version constraints
echo "Checking how-tos/pub-sub/package.json for Node.js version constraints:"
cat how-tos/pub-sub/package.json

# Check if any dependencies explicitly require Node.js < 20
echo -e "\nChecking for dependencies that might have Node.js version constraints:"
for PKG in $(jq -r '.dependencies | keys[]' package.json); do
    npm view $PKG engines --json 2>/dev/null
done

# Check the same for dev dependencies
for PKG in $(jq -r '.devDependencies | keys[]' package.json); do
    npm view $PKG engines --json 2>/dev/null
done

Length of output: 11360

@jamiehenson jamiehenson force-pushed the web-3426-css-changes-to-modernize-docs branch from 35efe6e to 24e022a Compare December 3, 2024 13:47
@jamiehenson jamiehenson temporarily deployed to ably-docs-next-staging December 3, 2024 13:48 Inactive
@jamiehenson jamiehenson temporarily deployed to ably-docs-next-staging December 3, 2024 13:55 Inactive
@jamiehenson jamiehenson force-pushed the web-3426-css-changes-to-modernize-docs branch from 0f001e8 to cc88cc2 Compare December 3, 2024 13:58
@jamiehenson jamiehenson temporarily deployed to ably-docs-next-staging December 3, 2024 13:59 Inactive
@jamiehenson jamiehenson requested review from kennethkalmer and a team December 3, 2024 14:04
@jamiehenson jamiehenson force-pushed the web-3426-css-changes-to-modernize-docs branch from cc88cc2 to 61dabcd Compare December 3, 2024 14:16
@jamiehenson jamiehenson temporarily deployed to ably-docs-next-staging December 3, 2024 14:16 Inactive
@jamiehenson jamiehenson force-pushed the web-3426-css-changes-to-modernize-docs branch from 61dabcd to 23f86e9 Compare December 3, 2024 14:27
@jamiehenson jamiehenson temporarily deployed to ably-docs-next-staging December 3, 2024 14:28 Inactive
fix: lighten font weights on product tiles

fix: lighten font weights on parsed list item tags

fix: fix conditional left property for sidebar

fix: update font weight on inline code element

fix: make top nav menu elements occupy full height

fix: add ably ui types to local tsconfig

fix: switch TW safelist config to array over object to satisfy v3 req

chore: remove unneeded scroll-snap-margin-top

chore: how to linting getaround

fix: replace font-light with font-medium, add ui-text-p2 to table dl
@jamiehenson jamiehenson force-pushed the web-3426-css-changes-to-modernize-docs branch from 23f86e9 to 022e715 Compare December 4, 2024 11:25
@jamiehenson jamiehenson temporarily deployed to ably-docs-next-staging December 4, 2024 11:25 Inactive
@jamiehenson jamiehenson temporarily deployed to ably-docs-next-staging December 5, 2024 10:59 Inactive
@jamiehenson jamiehenson temporarily deployed to ably-docs-next-staging December 5, 2024 12:26 Inactive
@jamiehenson jamiehenson merged commit 3d102ac into main Dec 5, 2024
5 checks passed
@jamiehenson jamiehenson deleted the web-3426-css-changes-to-modernize-docs branch December 5, 2024 15:41
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.

6 participants