Skip to content

fix: arrow button, center logo responsive, hide aztec handbook#49

Merged
0xLeopoldo merged 4 commits intodevfrom
fix/qa
Jul 8, 2025
Merged

fix: arrow button, center logo responsive, hide aztec handbook#49
0xLeopoldo merged 4 commits intodevfrom
fix/qa

Conversation

@0xLeopoldo
Copy link
Copy Markdown
Contributor

@0xLeopoldo 0xLeopoldo commented Jul 8, 2025

fixes:

  • arrow button responsive
  • center logo responsive
  • hide aztec handbook
Grabacion.de.pantalla.2025-07-08.a.la.s.10.39.48.a.m.mov
Captura de pantalla 2025-07-08 a la(s) 10 45 18 a  m Captura de pantalla 2025-07-08 a la(s) 10 45 52 a  m

ISSUE #CHA-338 https://linear.app/defi-wonderland/issue/CHA-338/ui-fixes

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Updated handbook section to display a default non-clickable card alongside a single handbook card for improved visual consistency.
  • Style

    • Refined navbar logo and pagination label styles for better responsiveness and alignment across devices.
    • Introduced a new CSS style for default handbook cards to visually distinguish them.
    • Enhanced footer spacing and alignment on smaller screens for improved layout.
  • Chores

    • Removed the "Disclaimer" button and external handbook dropdown from the navbar.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jul 8, 2025

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

Name Status Preview Comments Updated (UTC)
handbook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 8, 2025 3:31pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jul 8, 2025

📝 Walkthrough

Walkthrough

This change comments out two previously active navbar items in the Docusaurus theme configuration: a custom HTML "Disclaimer" button and an external "Aztec" handbook dropdown, effectively removing them from the navbar without deleting their code. The indentation of the prism block in the configuration is also adjusted. In the global CSS, the navbar logo and pagination label styles are updated for improved responsiveness and alignment, including adjustments to logo height and pagination label layout on smaller screens. In the HandbookSection React component, the rendering logic is modified to display a default non-clickable card alongside a single handbook, with corresponding CSS for the new card variant.

Assessment against linked issues

Objective Addressed Explanation
Background responsive adjustments (CHA-338)
Center logo in Wonderland responsive layout (CHA-338)
Arrow buttons responsive (CHA-338) Pagination label styling updated for responsiveness.
Hide Aztec handbook (for now) (CHA-338) Aztec handbook dropdown commented out in navbar config.

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes were identified. All code modifications align with the objectives specified in the linked issue CHA-338.

Possibly related PRs


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1dd79b5 and 2d7fac2.

📒 Files selected for processing (1)
  • packages/common-config/static/common/styles/global.css (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/common-config/static/common/styles/global.css
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this 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.

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
Copy Markdown
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 (2)
sites/wonderland/src/components/HandbookSection/index.tsx (2)

2-2: Remove unnecessary React import

React is already available in the scope and doesn't need to be explicitly imported in modern React applications. The ReactNode import is sufficient.

-import React, { ReactNode } from "react";
+import { ReactNode } from "react";

43-97: Consider simplifying the conditional rendering logic

While the current logic works, it could be simplified by using a more functional approach that reduces code duplication.

      <div className={styles.handbooksCards}>
-        {handbooks.length === 1 ? (
-          <>
-            {/* First handbook card */}
-            <a
-              key={handbooks[0].title}
-              href={handbooks[0].href}
-              target="_blank"
-              className={styles.handbooksCard}
-            >
-              {handbooks[0].color && (
-                <div
-                  className={styles.colorOverlay}
-                  style={{ backgroundColor: handbooks[0].color }}
-                ></div>
-              )}
-              <img
-                src={handbooks[0].image}
-                alt={`${handbooks[0].title} ICON`}
-                className={styles.handbooksCardIcon}
-              />
-            </a>
-
-            {/* Default handbook card (not a link) */}
-            <div className={styles.handbooksCardDefault}>
-              <img
-                src="/img/default-handbook.svg"
-                alt="Default handbook ICON"
-                className={styles.handbooksCardIcon}
-              />
-            </div>
-          </>
-        ) : (
-          handbooks.map((handbook) => {
-            return (
-              <a
-                key={handbook.title}
-                href={handbook.href}
-                target="_blank"
-                className={styles.handbooksCard}
-              >
-                {handbook.color && (
-                  <div
-                    className={styles.colorOverlay}
-                    style={{ backgroundColor: handbook.color }}
-                  ></div>
-                )}
-                <img
-                  src={handbook.image}
-                  alt={`${handbook.title} ICON`}
-                  className={styles.handbooksCardIcon}
-                />
-              </a>
-            );
-          })
-        )}
+        {handbooks.map((handbook) => (
+          <a
+            key={handbook.title}
+            href={handbook.href}
+            target="_blank"
+            className={styles.handbooksCard}
+          >
+            {handbook.color && (
+              <div
+                className={styles.colorOverlay}
+                style={{ backgroundColor: handbook.color }}
+              ></div>
+            )}
+            <img
+              src={handbook.image}
+              alt={`${handbook.title} ICON`}
+              className={styles.handbooksCardIcon}
+            />
+          </a>
+        ))}
+        
+        {handbooks.length === 1 && (
+          <div className={styles.handbooksCardDefault}>
+            <img
+              src="/img/default-handbook.svg"
+              alt="Default handbook ICON"
+              className={styles.handbooksCardIcon}
+            />
+          </div>
+        )}
      </div>
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between ae734a9 and 6dbb533.

⛔ Files ignored due to path filters (1)
  • sites/wonderland/static/img/default-handbook.svg is excluded by !**/*.svg
📒 Files selected for processing (4)
  • packages/common-config/preset/commonDocusaurusConfig.ts (3 hunks)
  • packages/common-config/static/common/styles/global.css (3 hunks)
  • sites/wonderland/src/components/HandbookSection/index.tsx (2 hunks)
  • sites/wonderland/src/components/HandbookSection/styles.module.css (3 hunks)
🧰 Additional context used
🧠 Learnings (2)
packages/common-config/preset/commonDocusaurusConfig.ts (1)
Learnt from: th0rOdinson
PR: defi-wonderland/handbook#46
File: sites/template/docusaurus.config.ts:70-70
Timestamp: 2025-07-03T21:13:49.173Z
Learning: In the defi-wonderland/handbook repository, when using webpack-merge to merge configurations in Docusaurus config files, the commonConfig is typed as Partial<Config> and localConfig is typed as Config. This means that merge(commonConfig, localConfig) maintains type safety without needing explicit type assertions, as TypeScript properly handles the merge of a partial configuration with a full configuration.
sites/wonderland/src/components/HandbookSection/index.tsx (2)
Learnt from: th0rOdinson
PR: defi-wonderland/handbook#46
File: sites/template/docusaurus.config.ts:70-70
Timestamp: 2025-07-03T21:13:49.173Z
Learning: In the defi-wonderland/handbook repository, when using webpack-merge to merge configurations in Docusaurus config files, the commonConfig is typed as Partial<Config> and localConfig is typed as Config. This means that merge(commonConfig, localConfig) maintains type safety without needing explicit type assertions, as TypeScript properly handles the merge of a partial configuration with a full configuration.
Learnt from: th0rOdinson
PR: defi-wonderland/handbook#46
File: scripts/src/create-handbook.ts:0-0
Timestamp: 2025-07-03T19:07:42.089Z
Learning: In the defi-wonderland/handbook repository, the `sites/template` directory is a repository structure that's guaranteed to have a package.json file, so validation checks for package.json existence are not needed in the create-handbook script.
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test
🔇 Additional comments (12)
packages/common-config/preset/commonDocusaurusConfig.ts (3)

39-44: LGTM - Clean temporary removal of disclaimer button

The disclaimer button is properly commented out rather than deleted, making it easy to restore if needed.


60-65: LGTM - Aztec handbook successfully hidden as per PR objectives

The Aztec handbook dropdown item is properly commented out, achieving the "hide aztec handbook" objective mentioned in the PR.


87-92: LGTM - Indentation formatting improved

The prism configuration block is now properly indented and more readable.

sites/wonderland/src/components/HandbookSection/styles.module.css (3)

34-38: LGTM - Improved CSS formatting for readability

The font-family declarations are now formatted consistently across multiple lines, enhancing code readability without changing functionality.

Also applies to: 57-61


104-121: LGTM - New default card style supports updated component logic

The .handbooksCardDefault class appropriately duplicates .handbooksCard styling while omitting the background image, which aligns with the new rendering logic in the component that shows a default non-clickable card alongside the single handbook.


126-128: LGTM - Box-shadow formatting improved

The multi-line box-shadow declaration improves readability while maintaining the same visual effect.

packages/common-config/static/common/styles/global.css (3)

409-411: LGTM - Responsive logo sizing with smooth transitions

The logo height adjustment to 32px on tablets/small screens with a smooth transition enhances the responsive design as mentioned in the PR objectives.


418-422: LGTM - Further logo optimization for mobile devices

The additional height reduction to 28px on screens under 600px ensures optimal logo sizing across all device sizes.


1114-1137: LGTM - Enhanced pagination responsiveness

The pagination label styling updates include proper flexbox alignment, responsive font sizes, and appropriate breakpoints that improve the overall user experience across different screen sizes.

sites/wonderland/src/components/HandbookSection/index.tsx (3)

4-9: LGTM - Excellent TypeScript typing addition

The explicit typing for the handbooks array improves type safety and code documentation, making the expected structure clear for future developers.


15-20: LGTM - Aztec handbook successfully hidden

The Aztec handbook is properly commented out, achieving the PR objective while preserving the code for potential future restoration.


43-97: Default handbook image confirmed
The file default-handbook.svg is present at sites/wonderland/static/img/default-handbook.svg, so the hardcoded /img/default-handbook.svg reference is valid.

Comment thread sites/wonderland/src/components/HandbookSection/index.tsx Outdated
Comment thread sites/wonderland/src/components/HandbookSection/index.tsx Outdated
Comment thread sites/wonderland/src/components/HandbookSection/index.tsx Outdated
Copy link
Copy Markdown
Contributor

@th0rOdinson th0rOdinson left a comment

Choose a reason for hiding this comment

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

Looks amazing! Just a few comments sir 💯

Comment thread packages/common-config/preset/commonDocusaurusConfig.ts
Comment thread sites/wonderland/src/components/HandbookSection/index.tsx
Comment thread packages/common-config/static/common/styles/global.css
@0xLeopoldo 0xLeopoldo merged commit 9f34aa5 into dev Jul 8, 2025
3 of 4 checks passed
@0xLeopoldo 0xLeopoldo deleted the fix/qa branch July 8, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants