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

Updated CSS Heading Color Palette #3371

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

palisadoes
Copy link
Contributor

@palisadoes palisadoes commented Jan 21, 2025

Updated CSS Heading Color Palette

Summary by CodeRabbit

  • Documentation

    • Updated Docusaurus configuration with improved path and URL handling.
    • Enhanced editing links for documentation to point to a new repository.
  • Style

    • Introduced new CSS variables for markdown header colors and underline styles.
    • Added comprehensive CSS custom properties for brand colors, typography, and UI components.
    • Implemented responsive design styles for various page sections.
  • Chores

    • Restructured documentation site configuration.
    • Updated navigation links for the 'Admin Guide'.

@palisadoes palisadoes added the ignore-sensitive-files-pr The contributor has a legitimate reason for editiing protected files label Jan 21, 2025
Copy link
Contributor

coderabbitai bot commented Jan 21, 2025

Walkthrough

This pull request introduces comprehensive configuration and styling updates for a documentation site. The changes focus on refactoring the Docusaurus configuration, updating CSS paths, and establishing a more robust design system. The modifications include resolving sidebar and CSS file paths, updating edit URLs, and introducing new CSS custom properties for consistent styling across the documentation site.

Changes

File Change Summary
docs/docusaurus.config.ts - Updated sidebarPath to use require.resolve()
- Added editUrl function for docs
- Updated blog editUrl to new GitHub path
- Modified customCss to use array of resolved paths
- Changed 'Admin Guide' navbar link to relative path
docs/src/css/custom.css - Added CSS variables for markdown header colors
- Updated header styles to use new color variables
- Added underline styles for h2, h3, and h4 headers
docs/src/css/index.css - Introduced comprehensive CSS custom properties
- Added styles for layout, typography, and UI components
- Implemented responsive design with media queries
- Defined animation and button styles

Possibly related PRs

Poem

🐰 Docusaurus config, oh so bright,
CSS variables dancing with delight,
Paths resolved, styles aligned just right,
A documentation site taking flight,
With rabbit-powered design might! 🌈


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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

Our Pull Request Approval Process

Thanks for contributing!

Testing Your Code

Remember, your PRs won't be reviewed until these criteria are met:

  1. We don't merge PRs with poor code quality.
    1. Follow coding best practices such that CodeRabbit.ai approves your PR.
  2. We don't merge PRs with failed tests.
    1. When tests fail, click on the Details link to learn more.
    2. Write sufficient tests for your changes (CodeCov Patch Test). Your testing level must be better than the target threshold of the repository
    3. Tests may fail if you edit sensitive files. Ask to add the ignore-sensitive-files-pr label if the edits are necessary.
  3. We cannot merge PRs with conflicting files. These must be fixed.

Our policies make our code better.

Reviewers

Do not assign reviewers. Our Queue Monitors will review your PR and assign them.
When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

CONTRIBUTING.md

Read our CONTRIBUTING.md file. Most importantly:

  1. PRs with issues not assigned to you will be closed by the reviewer
  2. Fix the first comment in the PR so that each issue listed automatically closes

Other

  1. 🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.
  2. Read the CONTRIBUTING.md file make

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

🧹 Nitpick comments (1)
docs/src/css/index.css (1)

93-94: Remove unnecessary positioning properties.

The left property and opacity > 1 values don't have any effect in this context.

Apply this diff:

-  left: -250px;
-  opacity: 1.3;
+  opacity: 1;

Also applies to: 101-104, 110-111

🧰 Tools
🪛 GitHub Actions: PR Workflow

[warning] Code style issues found. Run Prettier with --write to fix formatting issues.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5b4983b and 32424d3.

📒 Files selected for processing (3)
  • docs/docusaurus.config.ts (2 hunks)
  • docs/src/css/custom.css (2 hunks)
  • docs/src/css/index.css (1 hunks)
🧰 Additional context used
🪛 GitHub Actions: PR Workflow
docs/src/css/index.css

[warning] Code style issues found. Run Prettier with --write to fix formatting issues.

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyse Code With CodeQL (javascript)
🔇 Additional comments (6)
docs/docusaurus.config.ts (3)

36-39: LGTM! Well-structured edit URL configuration.

The edit URL configuration is properly structured to point to the correct repository path.


47-50: LGTM! Good separation of CSS concerns.

The separation of styles into custom.css and index.css follows good practices for maintainability.


87-87: LGTM! Improved navigation link structure.

Using a relative path for the Admin Guide href improves maintainability.

docs/src/css/custom.css (1)

129-131: LGTM! Consistent heading hierarchy styling.

The border-bottom and padding-bottom styles create a clear visual hierarchy.

Also applies to: 138-140, 144-146

docs/src/css/index.css (2)

8-37: LGTM! Well-structured CSS custom properties.

The root variables are well-organized into logical groups (brand colors, dark theme, text, UI components).

🧰 Tools
🪛 GitHub Actions: PR Workflow

[warning] Code style issues found. Run Prettier with --write to fix formatting issues.


1-593: Address Prettier formatting issues.

The pipeline reports code style issues that need to be fixed with Prettier.

Run Prettier to fix the formatting:

🧰 Tools
🪛 GitHub Actions: PR Workflow

[warning] Code style issues found. Run Prettier with --write to fix formatting issues.

Comment on lines +9 to +15
--h1-markdown: #021526;
--h2-markdown: #3a6d8c;
--h3-markdown: #474e93;
--h4-markdown: #508c9b;
--h5-markdown: #6a9ab0;
--h6-markdown: #888888;
--hx-markdown-underline: #eeeeee;
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Confirmed accessibility issues with heading colors

The current heading colors are problematic:

  • Heading colors are defined globally without theme-specific variations
  • Current colors have insufficient contrast against dark theme background (#111927)
  • Colors appear to be designed for light theme but are being applied to dark theme as well

Recommendations:

  • Define separate color variables for light and dark themes
  • Use CSS selectors like html[data-theme='dark'] to override colors for dark theme
  • Ensure contrast ratios meet WCAG standards (4.5:1 for normal text, 3:1 for large text)
🔗 Analysis chain

Consider color contrast ratios for accessibility.

While the color palette is aesthetically pleasing, ensure that all heading colors meet WCAG 2.1 contrast requirements (4.5:1 for normal text, 3:1 for large text) against the background color.

Run the following to check color contrast ratios:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Extract and analyze color values for WCAG contrast compliance
# Note: This is a basic check. Use a dedicated tool for thorough testing.

echo "Background color:"
rg -l "background-color.*#" | xargs rg "background-color.*#"

echo "\nHeading colors:"
rg "h[1-6]-markdown.*#" custom.css

Length of output: 5969


Script:

#!/bin/bash
# Search for theme-specific styles and content area backgrounds
echo "Theme and content area styles:"
rg -A 2 "html\[data-theme" docs/src/css/custom.css

echo "\nMarkdown content styles:"
rg "markdown|content.*background|main.*background" docs/src/css/custom.css

Length of output: 1205


Script:

#!/bin/bash
# Search for light theme background and any theme-specific heading color overrides
echo "Light theme and default styles:"
rg "(\[data-theme='light'\]|:root.*{)" -A 5 docs/src/css/custom.css

echo "\nAny theme-specific heading overrides:"
rg "\[data-theme.*\].*h[1-6]" docs/src/css/custom.css

Length of output: 441


Script:

#!/bin/bash
# Search for root styles and theme configurations
echo "Root styles:"
rg ":root" -A 10 docs/src/css/custom.css

echo "\nLight theme styles:"
rg "data-theme='light'" -A 5 docs/src/css/custom.css

echo "\nDefault background color:"
rg "^[[:space:]]*--ifm-background-color:" docs/src/css/custom.css

Length of output: 654

Comment on lines +397 to +398
width: 500%;
height: auto;
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix extreme width values.

Width values of 500% and 1000% seem excessive and might cause layout issues.

Consider using more reasonable values (100% or less) or using a different approach for achieving the desired layout.

Also applies to: 439-440

🧰 Tools
🪛 GitHub Actions: PR Workflow

[warning] Code style issues found. Run Prettier with --write to fix formatting issues.

Comment on lines +1 to +6
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Update the copyright notice.

The current copyright notice refers to Meta Platforms. This should be updated to reflect your organization's copyright.

Apply this diff:

-* Copyright (c) Meta Platforms, Inc. and affiliates.
+* Copyright (c) PalisadoesFoundation and contributors.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* Copyright (c) PalisadoesFoundation and contributors.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
🧰 Tools
🪛 GitHub Actions: PR Workflow

[warning] Code style issues found. Run Prettier with --write to fix formatting issues.

Copy link

codecov bot commented Jan 21, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 89.74%. Comparing base (5b4983b) to head (dc75b05).
Report is 1 commits behind head on develop-postgres.

Files with missing lines Patch % Lines
docs/docusaurus.config.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##           develop-postgres    #3371       +/-   ##
=====================================================
+ Coverage              7.95%   89.74%   +81.79%     
=====================================================
  Files                   312      335       +23     
  Lines                  8105     8613      +508     
  Branches               1801     1898       +97     
=====================================================
+ Hits                    645     7730     +7085     
+ Misses                 7393      628     -6765     
- Partials                 67      255      +188     
Flag Coverage Δ
combined 89.74% <0.00%> (?)
jest 7.95% <ø> (?)
vitest 89.74% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
docs/src/css/index.css (1)

397-398: ⚠️ Potential issue

Fix extreme width values and invalid opacity.

  1. Width values of 500% and 1000% are excessive and will cause layout issues.
  2. Opacity value of 2 is invalid (lines 210, 221, 275, 288, 400, 442).

Consider using more reasonable width values and valid opacity:

- width: 500%;
+ width: 100%;

- width: 1000%;
+ width: 100%;

- opacity: 2;
+ opacity: 1;

Also applies to: 439-440

🧹 Nitpick comments (3)
docs/src/css/index.css (3)

8-37: Consider adding documentation for CSS custom properties.

The CSS variables are well-organized but would benefit from inline documentation explaining their intended usage and acceptable values.

Add comments for each group of variables, for example:

 /* Brand colors */
 --brand: #febc59;
+/* Used for primary branding elements like logos and accents */

 /* Dark theme */
 --dark: #282c34;
 --deepdark: #20232a;
+/* Used for dark mode backgrounds and contrasting elements */

452-453: Avoid using !important in CSS rules.

Using !important makes styles harder to maintain and override. Consider increasing selector specificity instead.

Apply this diff:

- text-decoration: none !important;
- border-bottom: none;
+ text-decoration: none;
+ border-bottom: 0;

1-593: Consider architectural improvements for better maintainability.

  1. Consolidate media queries: Similar breakpoints (480px, 960px) are repeated throughout the file. Consider using a single media query per breakpoint.
  2. Use CSS variables consistently: Some color values are hardcoded (e.g., #1cbb99, #c7c7c7) instead of using the defined CSS variables.

Example of consolidated media queries:

@media only screen and (max-width: 480px) {
  /* Mobile styles */
  .HeaderHero { ... }
  .SixthPanel { ... }
  .seventh-panel { ... }
}
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 32424d3 and dc75b05.

📒 Files selected for processing (1)
  • docs/src/css/index.css (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Test Application
🔇 Additional comments (1)
docs/src/css/index.css (1)

1-6: Update the copyright notice.

The copyright notice still refers to Meta Platforms and should be updated to reflect your organization.

Comment on lines +93 to +95
left: -250px;
opacity: 1.3;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix positioning and opacity values.

  1. Using negative left positioning (left: -250px) can cause content to overflow or be hidden. Consider using CSS Grid or Flexbox for layout.
  2. Opacity values greater than 1 (opacity: 1.1, opacity: 1.3) have no effect as opacity is clamped between 0 and 1.

Apply this diff:

- left: -250px;
- opacity: 1.3;
+ opacity: 1;

- left: -250px;
- opacity: 1.1;
+ opacity: 1;

- left: -250px;
- opacity: 1.1;
+ opacity: 1;

Also applies to: 102-104, 110-112

@palisadoes palisadoes merged commit f7d28d5 into PalisadoesFoundation:develop-postgres Jan 21, 2025
17 of 19 checks passed
@palisadoes palisadoes deleted the docs branch January 21, 2025 04:12
@coderabbitai coderabbitai bot mentioned this pull request Jan 31, 2025
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ignore-sensitive-files-pr The contributor has a legitimate reason for editiing protected files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant