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

feat: Dark mode for mkdocs #802

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

carlspring
Copy link
Owner

@carlspring carlspring commented May 20, 2024

Pull Request Description

This pull request closes #708 .

Acceptance Test

  • Building the code with gradle clean build still works.

Questions

  • Does this pull request break backward compatibility?

  • Does this pull request require other pull requests to be merged first?

    • Yes, please see #...
    • No
  • Does this require an update of the documentation?

    • Yes, please see [provide details here]
    • No

Summary by CodeRabbit

  • Documentation

    • Commented out license text in Apache 2.0 and a line in the main documentation index.
    • Updated MIT license text inclusion method.
    • Adjusted theme settings, plugin configurations, markdown extensions, social links, and navigation structure in mkdocs.yml.
  • Chores

    • Upgraded image version in docker-compose.yml to squidfunk/mkdocs-material:9.
    • Updated various dependencies in requirements.txt.

Comment on lines +7 to +11
[//]: # (```)

[//]: # (--8<-- "../LICENSE.Apache-2.0.md")

[//]: # (```)
Copy link
Owner Author

Choose a reason for hiding this comment

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

@steve-todorov : Temporarily broken.

Comment on lines +6 to +11

[//]: # (```)

[//]: # (--8<-- "../LICENSE.MIT.md")

[//]: # (```)
Copy link
Owner Author

Choose a reason for hiding this comment

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

@steve-todorov : Temporarily broken.

Comment on lines +52 to +53

[//]: # ( --8<-- "../src/test/resources/amazon-test-sample.properties")
Copy link
Owner Author

Choose a reason for hiding this comment

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

@steve-todorov : Temporarily broken.

Comment on lines +68 to +70
# - mdx_gh_links
# - mdx_include:
# base_path: ./content
Copy link
Owner Author

Choose a reason for hiding this comment

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

@steve-todorov : These no longer seem to work.

# This dependency is necessary for older mkdocs versions.
# TODO: Remove when upgrading mkdocs.
jinja2<3.1.0
#jinja2<3.1.0
Copy link
Owner Author

Choose a reason for hiding this comment

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

@steve-todorov : Not sure if we need this.

@carlspring
Copy link
Owner Author

@coderabbitai review

Copy link

coderabbitai bot commented Jun 11, 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 bot commented Jun 11, 2024

Walkthrough

This update primarily focuses on enhancing the documentation setup and dependencies. Key changes include the implementation of dark mode for mkdocs, updates to documentation files, and upgrades to dependencies and Docker images. These changes aim to improve the user experience and maintain compatibility with the latest tools and libraries.

Changes

Files/Groups Change Summary
.../contributing/legal/license-Apache-2.0.md Commented out the license text using Markdown comment syntax.
.../contributing/legal/license-MIT.md Modified the way the external file is included in the license text.
docs/content/index.md Commented out a line that includes a properties file path in the documentation.
docs/docker-compose.yml Updated image version from squidfunk/mkdocs-material:5.5.9-custom to squidfunk/mkdocs-material:9.
docs/mkdocs.yml Adjusted theme's palette toggles, features list, plugins configurations, markdown extensions, and navigation structure.
docs/requirements.txt Updated various dependencies and commented out jinja2<3.1.0.

Assessment against linked issues

Objective (Issue #708) Addressed Explanation
Set up dark mode for mkdocs

Poem

In the docs, a change took flight,
Dark mode now brings delight.
Dependencies fresh, all in line,
Mkdocs shines, truly divine.
With updates clear and bright,
Our work now feels so light.


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Outside diff range and nitpick comments (2)
docs/requirements.txt (1)

14-14: Consider removing or updating the commented-out dependency.

It's generally a good practice to clean up commented-out code if it's no longer needed, or update the comment to reflect why it's still there.

docs/content/index.md (1)

Line range hint 3-6: Check for potential typos or repeated words as flagged by LanguageTool.

While these might be false positives, it's good practice to review them to ensure clarity and professionalism in documentation.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 30fe5fd and 0b1f88f.

Files selected for processing (6)
  • docs/content/contributing/legal/license-Apache-2.0.md (1 hunks)
  • docs/content/contributing/legal/license-MIT.md (1 hunks)
  • docs/content/index.md (1 hunks)
  • docs/docker-compose.yml (2 hunks)
  • docs/mkdocs.yml (6 hunks)
  • docs/requirements.txt (1 hunks)
Files skipped from review due to trivial changes (3)
  • docs/content/contributing/legal/license-Apache-2.0.md
  • docs/content/contributing/legal/license-MIT.md
  • docs/docker-compose.yml
Additional context used
LanguageTool
docs/content/index.md

[duplication] ~41-~41: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Context: ...you will get 403 Forbidden errors. 4. Select Attach an existing policies directly 5. Select AmazonS3FullAccess policy and `Create...


[style] ~43-~43: Using many exclamation marks might seem excessive (in this case: 3 exclamation marks for a text that’s 680 characters long) (EN_EXCESSIVE_EXCLAMATION)
Context: ...t access key` - you will need them later! ### Example === "1. Configure" C...

Markdownlint
docs/content/index.md

1-1: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces


5-5: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces


6-6: Expected: 0 or 2; Actual: 4 (MD009, no-trailing-spaces)
Trailing spaces


22-22: Expected: 0 or 2; Actual: 4 (MD009, no-trailing-spaces)
Trailing spaces


28-28: Expected: 0 or 2; Actual: 4 (MD009, no-trailing-spaces)
Trailing spaces


33-33: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


74-74: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


75-75: Unused link or image reference definition: "<--# links -->" (MD053, link-image-reference-definitions)
Link and image reference definitions should be needed

Additional comments not posted (3)
docs/requirements.txt (1)

1-11: Ensure all dependency versions are compatible with each other and with the project.

docs/mkdocs.yml (2)

118-121: Ensure the social links are updated and correct.

This update helps maintain the relevance and accuracy of the contact information.


17-31: Verify the new dark mode toggle configuration.

Ensure that the toggle behaves as expected across different browsers and devices.

Verification successful

The dark mode configuration is present in the mkdocs.yml file, as confirmed by the script output. The configuration includes the media, scheme, toggle icon, and toggle name settings for dark mode.

  • : The dark mode toggle configuration is correctly set in the mkdocs.yml file. Please manually verify the toggle functionality in the MkDocs site to ensure it behaves as expected across different browsers and devices.
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the dark mode toggle works correctly.
# Test: Manually check the toggle in the MkDocs site.
echo "Please manually verify the dark mode toggle in the MkDocs site."

Length of output: 136



Script:

#!/bin/bash
# Description: Verify the presence of dark mode configuration in mkdocs.yml
# Check for the dark mode palette settings in the mkdocs.yml file
grep -A 5 'media: "(prefers-color-scheme: dark)"' docs/mkdocs.yml

Length of output: 230

Comment on lines +52 to +53

[//]: # ( --8<-- "../src/test/resources/amazon-test-sample.properties")
Copy link

Choose a reason for hiding this comment

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

Clarify the reason for commenting out the properties file path.

It's important to document why certain code segments are commented out to maintain clarity for other developers.

Comment on lines +59 to +70
# - markdownextradata: {}
- minify:
minify_html: true

markdown_extensions:
- admonition
- attr_list
- footnotes
- meta
- mdx_gh_links
- mdx_include:
base_path: ./content
# - mdx_gh_links
# - mdx_include:
# base_path: ./content
Copy link

Choose a reason for hiding this comment

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

Review the commented-out plugins to ensure they are no longer needed.

If these plugins are commented out for a reason, such as compatibility issues, please document it clearly. If they are no longer needed, consider removing them to clean up the configuration file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set up dark mode for mkdocs
1 participant