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

refactor: admin-doc to hasura docs style #3098

Conversation

bint-Eve
Copy link

@bint-Eve bint-Eve commented Dec 31, 2024

What kind of change does this PR introduce?
This PR introduces completion of first part of issue #2970

  1. Created the identical navbar for admin-doc web
  2. Light/Dark mode implementations
  3. Matching Hashura's modern look
  4. implementation of consistency of css all over the website to make it look similar to other talawa's webs
  5. Homepage header design start

Issue Number:
Fixes #2970

Did you add tests for your changes?
No, no testing need ( simple css improvements )

Snapshots/Videos:
Screenshot (117)
Screenshot (118)
Screenshot (119)

If relevant, did you update the documentation?
No, Documentation update not applicable here

Summary
This PR is a start to build a whole new doc web for talawa-admin, emphasis was given on giving the website similar look to hashura's website and to keep consistence css (color scheme, fonts and typography)all over the web

Does this PR introduce a breaking change?
No

Other information
The changes have been done for cross-browser compatibility.

Have you read the contributing guide?

Yes

Summary by CodeRabbit

  • Documentation

    • Updated Docusaurus configuration with new branding
    • Refreshed documentation site tagline and favicon
    • Updated navbar and footer with more comprehensive links
    • Implemented new color scheme and styling for documentation site
  • Style

    • Introduced extensive CSS variable updates
    • Enhanced light and dark theme color definitions
    • Improved responsive design and component styling
  • Chores

    • Simplified homepage header component
    • Removed tutorial link from homepage

Copy link
Contributor

coderabbitai bot commented Dec 31, 2024

Walkthrough

This pull request focuses on updating the Docusaurus documentation configuration and styling for the Talawa Admin documentation site. The changes include modifications to the Docusaurus configuration file, a comprehensive update to the CSS styling, and simplification of the homepage header. The updates aim to enhance the documentation's navigation, resource accessibility, and visual consistency across different themes and screen sizes.

Changes

File Change Summary
docs/docusaurus.config.ts - Updated tagline and favicon
- Restructured navbar with new links and title
- Expanded footer configuration
- Updated copyright notice
docs/src/css/custom.css - Removed previous primary color variables
- Added new CSS variables for light and dark themes
- Introduced styles for navbar, footer, and buttons
- Added media queries for responsive design
docs/src/pages/index.tsx - Simplified header component
- Removed tutorial link button

Assessment against linked issues

Objective Addressed Explanation
Update site's CSS
Create NavBar with specific links
Update homepage layout
Restore dark/light mode
Remove existing left drawer menu items Partial implementation needs verification

Possibly related issues

Possibly related PRs

Suggested labels

ignore-sensitive-files-pr

Suggested reviewers

  • palisadoes

Poem

🐰 Docusaurus springs to life anew,
With colors bright and navbar true,
CSS dancing in light and dark,
A documentation website's spark!
Talawa's guide, now crystal clear 🌟

Tip

CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command @coderabbitai generate docstrings to have CodeRabbit automatically generate docstrings for your pull request. We would love to hear your feedback on Discord.


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

🧹 Nitpick comments (5)
docs/docusaurus.config.ts (2)

56-107: Comprehensive navbar reconfiguration.

The updated navbar items effectively improve discoverability of resources. Ensure external links open in a new tab only where necessary (e.g., third-party websites) to maintain consistent user experience.


108-112: Color mode toggles are beneficial.

disableSwitch: false and respectPrefersColorScheme: false allow manual toggling. If you’d like to detect user preference by default, consider setting respectPrefersColorScheme: true.

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

49-50: Typographical fix for “Dak mode css”.

A minor but noticeable typo exists in the comment “/* Dak mode css /”. Change it to “/ Dark mode css */” for clarity.

-/* Dak mode css */
+/* Dark mode css */

51-62: Dark mode variable overrides.

Ensure the updated background and text colors meet accessibility guidelines (e.g., contrast ratio). Consider running an automated contrast check to confirm compliance.


389-397: Heading color usage.

You’re using --secondary-blue-900 for headings. Verify that primary text color remains distinct and consistent, especially in mobile view.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between fa78eda and 2b9b8b6.

⛔ Files ignored due to path filters (12)
  • docs/static/img/icons/facebook.svg is excluded by !**/*.svg
  • docs/static/img/icons/favicon_palisadoes.ico is excluded by !**/*.ico
  • docs/static/img/icons/github-dark.svg is excluded by !**/*.svg
  • docs/static/img/icons/github.svg is excluded by !**/*.svg
  • docs/static/img/icons/instagram.svg is excluded by !**/*.svg
  • docs/static/img/icons/opportunities.svg is excluded by !**/*.svg
  • docs/static/img/icons/slack.svg is excluded by !**/*.svg
  • docs/static/img/icons/source.svg is excluded by !**/*.svg
  • docs/static/img/icons/team.svg is excluded by !**/*.svg
  • docs/static/img/icons/twitter.svg is excluded by !**/*.svg
  • docs/static/img/icons/youtube-white.svg is excluded by !**/*.svg
  • docs/static/img/icons/youtube.svg is excluded by !**/*.svg
📒 Files selected for processing (3)
  • docs/docusaurus.config.ts (2 hunks)
  • docs/src/css/custom.css (1 hunks)
  • docs/src/pages/index.tsx (1 hunks)
🔇 Additional comments (8)
docs/src/pages/index.tsx (1)

13-13: Ensure consistent layout alignment with new styles.

You removed the hero hero--primary classes but retained styles.heroBanner. Verify that the banner’s spacing and styling are consistent with the newly introduced design scheme throughout the documentation website.

docs/docusaurus.config.ts (4)

9-10: Tagline and favicon updates look good.

Changing the tagline to “Complete guides and references for building with Talawa” and updating the favicon are aligned with the PR's objective to strengthen branding and clarity.


48-55: Confirm theming references.

You have introduced an expanded themeConfig at lines 48-55. Verify that custom CSS variables declared in custom.css are recognized during build.


113-168: Footer structure successfully expanded.

The multi-column approach with Community, Social Media, and Development sections enhances readability. Ensure all external links are valid and remain up-to-date.


169-172: Prism theme usage looks correct.

Using GitHub and Dracula themes is a standard approach. Confirm the code blocks render correctly in both themes.

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

9-16: New color variables align with the Hasura-like design approach.

The introduction of --secondary-blue-900 and other neutral tones reflects the modern style. Confirm that these variables do not conflict with any existing CSS or Infima defaults.


94-107: Menu styling is concise.

The .menu selectors, link line-height, and uppercase transformations achieve a clean, minimalistic look. No obvious concerns.


78-83: Highlight code line style changes.

Adjusting .docusaurus-highlight-code-line to use rgb(72, 77, 91) is consistent. Double-check that you haven't inadvertently masked any syntax highlighting tokens in certain themes.

@palisadoes
Copy link
Contributor

This PR needs to be closed.

The source and target PR branches are the same. This means that our reviewers will not be able to checkout the changes and test on their systems using this methodology which will cause a rejection error:

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Please follow these steps:

  1. Create a new branch with a different name in your local repository
    1. Make sure the branch name is named differently from the required target branch in the PR
    2. Use the git checkout -b command to do this.
  2. Resubmit your PR

Closing

@palisadoes palisadoes closed this Dec 31, 2024
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.

2 participants