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

revamp homepage and docs styles #1442

Merged
merged 6 commits into from
Jul 10, 2024
Merged

revamp homepage and docs styles #1442

merged 6 commits into from
Jul 10, 2024

Conversation

SutuSebastian
Copy link
Collaborator

@SutuSebastian SutuSebastian commented Jul 9, 2024

Changes

General

  • fix navbar version badge style
  • fix navbar icons tooltip + open external links in new tab

Homepage

  • align container max-width to the docs max-width to avoid content movement flicker

Docs

  • rework sidebar
    • rework NEW badge
  • restyle table-of-contents
  • remove top banner (too long -> no news)
  • fixed too much X padding on mobile
  • fix footer X and bottom padding

Results

Before

Screenshot 2024-07-09 at 15 46 50 Screenshot 2024-07-09 at 15 46 58

After

Screenshot 2024-07-09 at 15 47 02 Screenshot 2024-07-09 at 15 47 06

Summary by CodeRabbit

  • Bug Fixes

    • Adjusted various styling classes across multiple components for improved layout and responsiveness.
  • Refactor

    • Simplified and restructured components including DocsNavbar, DocsSidebar, and various sections in the homepage for better maintainability and readability.
  • Chores

    • Removed unused imports and commented out unused components to clean up the codebase.

@SutuSebastian SutuSebastian added 📚 documentation Improvements or additions to documentation 🚀 enhancement New feature or request labels Jul 9, 2024
@SutuSebastian SutuSebastian self-assigned this Jul 9, 2024
Copy link

vercel bot commented Jul 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
flowbite-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 9, 2024 1:33pm
flowbite-react-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 9, 2024 1:33pm

Copy link

changeset-bot bot commented Jul 9, 2024

⚠️ No Changeset found

Latest commit: 47cb684

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented Jul 9, 2024

Warning

Rate limit exceeded

@SutuSebastian has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 16 minutes and 20 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between 825c6e8 and 47cb684.

Walkthrough

The recent updates involve minor UI adjustments and refactoring across multiple components in a React web application, primarily focusing on tweaking styling classes for better layout responsiveness. Key changes include the removal or modification of padding and margin classes, visibility class adjustments, and the removal of unnecessary sidebar imports and components. No significant modifications to the logic of functionality were applied.

Changes

File(s) Change Summary
apps/web/app/docs/[[...slug]]/page.tsx Adjusted padding, margin, text size, and visibility properties.
apps/web/app/docs/layout.tsx Removed imports, commented out <Banner />, restructured Sidebar component and its subcomponents.
apps/web/app/page.tsx Commented out <Banner /> component in the HomePage function.
apps/web/components/.../components-section.tsx Modified padding styling of a div element.
apps/web/components/.../contributors-section.tsx Adjusted padding values in the ContributorsSection component.
apps/web/components/.../dark-mode-section/dark-mode-section.tsx Changed padding values within the section component.
apps/web/components/.../featured-section.tsx Removed px-20 from a div element's styling class.
apps/web/components/.../figma-section.tsx Removed padding class px-20 from a div element.
apps/web/components/.../hero-section/hero-section.tsx Adjusted grid columns and flex display for responsiveness.
apps/web/components/.../home-navbar.tsx Removed padding for extra-large screens in HomeNavbar.
apps/web/components/.../main-footer.tsx Removed px-20 class from a div element's styling.
apps/web/components/.../react-section.tsx Adjusted padding within a div element in the ReactSection component.
apps/web/components/.../social-proof-section.tsx Replaced lg:px-20 with lg:py-24 in a div element's styling.
apps/web/components/.../tailwind-section.tsx Removed lg:px-20 from a div element's styling.
apps/web/components/navbar.tsx Updated CSS class from lg:flex to xl:flex, affecting visibility.
apps/web/data/docs-sidebar.ts Removed href property from DocsSidebarSection interface and associated array objects.

Poem

In the land of code so bright and clear,
Style adjustments bring cheer,
Padding shifts and margins sway,
Components retouched in a graceful way.
Sidebars slimmed to navigate,
With every change, we innovate,
The rabbit's whiskers twitch in glee,
Celebrating code that's bug-free!
🐇✨


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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 2d4d4ce and fbefe8d.

Files selected for processing (16)
  • apps/web/app/docs/[[...slug]]/page.tsx (2 hunks)
  • apps/web/app/docs/layout.tsx (6 hunks)
  • apps/web/app/page.tsx (1 hunks)
  • apps/web/components/homepage/components-section.tsx (1 hunks)
  • apps/web/components/homepage/contributors-section.tsx (1 hunks)
  • apps/web/components/homepage/dark-mode-section/dark-mode-section.tsx (1 hunks)
  • apps/web/components/homepage/featured-section.tsx (1 hunks)
  • apps/web/components/homepage/figma-section.tsx (1 hunks)
  • apps/web/components/homepage/hero-section/hero-section.tsx (2 hunks)
  • apps/web/components/homepage/home-navbar.tsx (1 hunks)
  • apps/web/components/homepage/main-footer.tsx (1 hunks)
  • apps/web/components/homepage/react-section.tsx (1 hunks)
  • apps/web/components/homepage/social-proof-section.tsx (1 hunks)
  • apps/web/components/homepage/tailwind-section.tsx (1 hunks)
  • apps/web/components/navbar.tsx (1 hunks)
  • apps/web/data/docs-sidebar.ts (5 hunks)
Files skipped from review due to trivial changes (9)
  • apps/web/app/page.tsx
  • apps/web/components/homepage/components-section.tsx
  • apps/web/components/homepage/contributors-section.tsx
  • apps/web/components/homepage/dark-mode-section/dark-mode-section.tsx
  • apps/web/components/homepage/featured-section.tsx
  • apps/web/components/homepage/home-navbar.tsx
  • apps/web/components/homepage/main-footer.tsx
  • apps/web/components/homepage/social-proof-section.tsx
  • apps/web/components/navbar.tsx
Additional context used
GitHub Check: 🕵 Lint
apps/web/app/docs/layout.tsx

[warning] 35-35:
Classname 'max-w-8xl' is not a Tailwind CSS class!


[warning] 48-48:
Classname 'max-w-8xl' is not a Tailwind CSS class!


[warning] 175-175:
Classname 'text-primary-700' is not a Tailwind CSS class!


[warning] 175-175:
Classname 'hover:text-primary-700' is not a Tailwind CSS class!


[warning] 175-175:
Classname 'dark:text-primary-500' is not a Tailwind CSS class!

Additional comments not posted (14)
apps/web/components/homepage/hero-section/hero-section.tsx (2)

11-11: Verify responsiveness with the updated grid class.

The grid layout now switches to two columns at the lg breakpoint instead of md. Ensure that this change improves the layout on medium-sized screens.


39-39: Verify visual impact with the updated visibility class.

The div now becomes flex only at the lg breakpoint instead of md. Ensure that this change does not negatively affect the layout on medium-sized screens.

apps/web/data/docs-sidebar.ts (1)

3-3: LGTM! Verify removal of href references.

The href property has been removed from the DocsSidebarSection interface. Ensure that all references to href in DocsSidebarSection are removed.

apps/web/components/homepage/tailwind-section.tsx (1)

7-7: Verify visual impact with the updated padding classes.

The padding on large screens has been increased to lg:py-24. Ensure that this change enhances the layout without causing any issues.

apps/web/components/homepage/react-section.tsx (1)

18-18: Verify visual impact with the updated padding classes.

The padding on large screens has been increased to lg:py-24. Ensure that this change enhances the layout without causing any issues.

apps/web/app/docs/layout.tsx (5)

3-3: LGTM! Import statements updated correctly.

The unused imports have been removed, and the necessary imports are retained.


33-33: Verify the intention behind commenting out the Banner component.

The Banner component has been commented out. Ensure this is intentional and does not affect the layout.


50-52: Verify the correctness of the updated styling classes.

Ensure that the updated styling classes are correct and consistent with the design.


108-129: Verify the correctness of the updated structure and styling.

Ensure that the updated structure and styling of the DocsSidebar component are correct and consistent with the design.


142-194: Verify the correctness of the updated structure and styling.

Ensure that the updated structure and styling of the SidebarSection, SidebarItem, SidebarLink, and NewBadge components are correct and consistent with the design.

Tools
GitHub Check: 🕵 Lint

[warning] 175-175:
Classname 'text-primary-700' is not a Tailwind CSS class!


[warning] 175-175:
Classname 'hover:text-primary-700' is not a Tailwind CSS class!


[warning] 175-175:
Classname 'dark:text-primary-500' is not a Tailwind CSS class!

apps/web/app/docs/[[...slug]]/page.tsx (3)

58-58: Verify the correctness of the updated layout and structure.

Ensure that the updated layout and structure of the DocPage component are correct and consistent with the design.


Line range hint 92-92:
Verify the correctness of the updated structure and styling.

Ensure that the updated structure and styling of the ContentLayout component are correct and consistent with the design.


252-255: Verify the correctness of the updated structure and styling.

Ensure that the updated structure and styling of the ToC component are correct and consistent with the design.

apps/web/components/homepage/figma-section.tsx (1)

6-6: Verify the correctness of the updated layout and structure.

Ensure that the updated layout and structure of the FigmaSection component are correct and consistent with the design.

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between fbefe8d and a68961d.

Files selected for processing (1)
  • apps/web/components/homepage/social-proof-section.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • apps/web/components/homepage/social-proof-section.tsx

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a68961d and 825c6e8.

Files selected for processing (1)
  • apps/web/components/navbar.tsx (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • apps/web/components/navbar.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 documentation Improvements or additions to documentation 🚀 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant