sanctuarycomputer / uniswap-docs

πŸ““ Uniswap V3 docs website redesigned
https://docs.uniswap.org
0 stars 0 forks source link

feat: add navigation #30

Closed limsohee1002 closed 1 week ago

limsohee1002 commented 1 week ago

Description

Add navigation Add footer Add theme toggle

Type(s) of changes

Motivation for PR

12 #10 #9

How Has This Been Tested?

Applicable screenshots

https://www.loom.com/share/1f4a094c82a445e3b28997e7354ea265?sid=d2677004-be98-47e1-9b7e-113a50b14863

Follow-up PR

Summary by CodeRabbit

Release Notes

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
uniswap-docs-staging βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Nov 14, 2024 2:27pm
coderabbitai[bot] commented 1 week ago

Walkthrough

The changes introduced in this pull request encompass updates across multiple configuration and component files. Key modifications include the removal of specific ESLint plugins and rules, restructuring of the Docusaurus configuration with new navigation and footer components, updates to the package dependencies, and the introduction of new React components for icons and theme switching. Additionally, various CSS files have been modified to enhance styles and typography, while a new storage management class has been added for handling theme preferences.

Changes

File Change Summary
.eslintrc.json Removed "simple-import-sort" plugin and its associated rules.
docusaurus.config.js Added staticDirectories, restructured navbar and footer sections.
package.json Added dependencies: @headlessui/react, classnames, js-cookie, and dev dependency @types/js-cookie.
src/components/Icons/index.tsx Introduced new icon components: MiniUnicon, Github, X, Discord, Sun, Menu, Moon, and IconMap.
src/components/ThemeSwitch/index.tsx Added ThemeSwitch component for toggling themes.
src/components/base/Button/index.tsx Introduced TextButton, ButtonBase, and LinkBase components.
src/css/custom.css Added import for infima-overrides.css, removed font.css and types.css, added new layout classes.
src/css/font.css Updated @font-face declarations for 'Basel Grotesk' and 'Riegraf' fonts.
src/css/types.css Added new mobile variants and adjusted typography classes.
src/theme/Footer.tsx Added new Footer component with structured links.
src/theme/Navbar.tsx Added new Navbar component with logo and search functionality.
src/theme/NavbarItem.tsx Removed NavbarItem component.
src/theme/Root.tsx Updated error handling comment in Root component.
src/utils/storage.ts Added StorageManager<T> class for cookie management and theme storage.
tailwind.config.js Updated nav-h spacing value and removed mobile-nav-h.
src/css/infima-overrides.css Introduced new CSS file for style resets and defaults.

Poem

🐰 In the garden where changes bloom,
New icons dance and themes consume.
With buttons bright and navs so neat,
Our code hops high on happy feet!
So let’s cheer for the updates, hooray!
A fresh new look for every day! 🌼

[!WARNING] There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

πŸ”§ eslint > If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration. warning eslint@7.32.0: This version is no longer supported. Please see https://eslint.org/version-support for other options. warning eslint > @humanwhocodes/config-array@0.5.0: Use @eslint/config-array instead warning eslint > @humanwhocodes/config-array > @humanwhocodes/object-schema@1.2.1: Use @eslint/object-schema instead warning eslint > file-entry-cache > flat-cache > rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported warning eslint > file-entry-cache > flat-cache > rimraf > glob@7.2.3: Glob versions prior to v9 are no longer supported warning eslint > file-entry-cache > flat-cache > rimraf > glob > inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. error Error: https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz: Request failed "502 Bad Gateway" at ResponseError.ExtendableBuiltin (/opt/yarn-v1.22.22/lib/cli.js:696:66) at new ResponseError (/opt/yarn-v1.22.22/lib/cli.js:802:124) at Request. (/opt/yarn-v1.22.22/lib/cli.js:66750:16) at Request.emit (node:events:519:28) at module.exports.Request.onRequestResponse (/opt/yarn-v1.22.22/lib/cli.js:142287:10) at ClientRequest.emit (node:events:519:28) at HTTPParser.parserOnIncomingClient (node:_http_client:704:27) at HTTPParser.parserOnHeadersComplete (node:_http_common:118:17) at TLSSocket.socketOnData (node:_http_client:546:22) at TLSSocket.emit (node:events:519:28)

πŸ“œ Recent review details **Configuration used: CodeRabbit UI** **Review profile: CHILL**
πŸ“₯ Commits Reviewing files that changed from the base of the PR and between d05fa87ab6d26d166246ca178b50461ee3c0bff3 and b3cec6e971cf2d73f90e427e0af3a8929b17cf53.
πŸ“’ Files selected for processing (2) * `src/css/infima-overrides.css` (1 hunks) * `src/theme/Navbar.tsx` (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2) * src/css/infima-overrides.css * src/theme/Navbar.tsx

πŸͺ§ Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , 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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
github-actions[bot] commented 1 week ago

⚑️ Lighthouse Report

Mobile (view report)

Category Score
🟠 Performance 71
🟒 Accessibility 96
🟒 Best practices 92
🟠 SEO 85

Desktop (view report)

Category Score
🟒 Performance 98
🟒 Accessibility 96
🟠 Best practices 83
🟠 SEO 82

Lighthouse ran on https://uniswap-docs-staging-9w81z54cj-uniswap.vercel.app

github-actions[bot] commented 1 week ago

⚑️ Lighthouse Report

Mobile (view report)

Category Score
🟠 Performance 56
🟒 Accessibility 96
🟒 Best practices 92
🟠 SEO 85

Desktop (view report)

Category Score
🟒 Performance 99
🟒 Accessibility 96
🟒 Best practices 92
🟠 SEO 82

Lighthouse ran on https://uniswap-docs-staging-6797le7mt-uniswap.vercel.app

github-actions[bot] commented 1 week ago

⚑️ Lighthouse Report

Mobile (view report)

Category Score
🟠 Performance 87
🟒 Accessibility 96
🟠 Best practices 83
🟠 SEO 85

Desktop (view report)

Category Score
🟒 Performance 98
🟒 Accessibility 96
🟠 Best practices 83
🟠 SEO 82

Lighthouse ran on https://uniswap-docs-staging-5dmgprlt3-uniswap.vercel.app

limsohee1002 commented 1 week ago

Please ignore font: It seems like docusaurus is not loading the font asset. It adds italic medium weight font asset only, so it render it as italic and medium font weight right now.

github-actions[bot] commented 1 week ago

⚑️ Lighthouse Report

Mobile (view report)

Category Score
🟠 Performance 77
🟒 Accessibility 96
🟠 Best practices 83
🟠 SEO 85

Desktop (view report)

Category Score
🟒 Performance 99
🟒 Accessibility 96
🟠 Best practices 83
🟠 SEO 82

Lighthouse ran on https://uniswap-docs-staging-qz4t2m6ub-uniswap.vercel.app

limsohee1002 commented 1 week ago

@nahbee10 ready for review!

github-actions[bot] commented 1 week ago

⚑️ Lighthouse Report

Mobile (view report)

Category Score
🟠 Performance 64
🟒 Accessibility 96
🟒 Best practices 92
🟠 SEO 85

Desktop (view report)

Category Score
🟒 Performance 97
🟒 Accessibility 96
🟠 Best practices 83
🟠 SEO 82

Lighthouse ran on https://uniswap-docs-staging-2bkm7493q-uniswap.vercel.app

nahbee10 commented 1 week ago
  1. noticed that when it's first loaded, the nav bar is light but the bg is with the dark color

  2. there's extra padding on the left side of footer list items

hmm seems like both above not happening on local preview. not sure why! but this latest preview has the issue: https://uniswap-docs-staging-2bkm7493q-uniswap.vercel.app/

github-actions[bot] commented 1 week ago

⚑️ Lighthouse Report

Mobile (view report)

Category Score
🟠 Performance 80
🟒 Accessibility 96
🟠 Best practices 83
🟠 SEO 85

Desktop (view report)

Category Score
🟒 Performance 98
🟒 Accessibility 96
🟠 Best practices 83
🟠 SEO 82

Lighthouse ran on https://uniswap-docs-staging-9lxbmrb2c-uniswap.vercel.app

github-actions[bot] commented 1 week ago

⚑️ Lighthouse Report

Mobile (view report)

Category Score
🟠 Performance 55
🟒 Accessibility 96
🟒 Best practices 92
🟠 SEO 85

Desktop (view report)

Category Score
🟒 Performance 98
🟒 Accessibility 96
🟠 Best practices 83
🟠 SEO 82

Lighthouse ran on https://uniswap-docs-staging-fkw14ow78-uniswap.vercel.app

limsohee1002 commented 1 week ago

@nahbee10 it should be fixed in preview now! I couldn't see it locally, it was only on preview. I guess moving forward, we should check preview link as well!

github-actions[bot] commented 1 week ago

⚑️ Lighthouse Report

Mobile (view report)

Category Score
🟠 Performance 70
🟒 Accessibility 96
🟒 Best practices 92
🟠 SEO 85

Desktop (view report)

Category Score
🟒 Performance 98
🟒 Accessibility 96
🟠 Best practices 83
🟠 SEO 82

Lighthouse ran on https://uniswap-docs-staging-13neu3mq7-uniswap.vercel.app