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

FEN-168 Make logo sx props customizable #233

Merged
merged 2 commits into from
Mar 19, 2025

Conversation

tsl-ps2
Copy link
Collaborator

@tsl-ps2 tsl-ps2 commented Mar 7, 2025

As a Developer, on the Agent Portal,I would like to Implement the design system, In order to ensure consistency, maintainability, and scalability in our UI components across the application..

Summary by CodeRabbit

  • New Features

    • Enhanced logo styling in navigation components with a new LogoProps customization option, allowing for flexible visual adjustments that improve design consistency and support better branding across the interface.
    • Added LogoProps to Header, NavMini, NavVertical, and NavigationLayout components for improved configurability.
  • Chores

    • Updated version to 1.0.25 in the package.json file and changelog for the @baseapp-frontend/components package.
    • Introduced a new type alias PartialLogoProps to enhance the flexibility of logo properties.

Copy link

changeset-bot bot commented Mar 7, 2025

⚠️ No Changeset found

Latest commit: 9e4d435

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

coderabbitai bot commented Mar 7, 2025

Walkthrough

The pull request introduces a new optional property, LogoProps, to several navigation components, including Header, NavMini, NavVertical, and NavigationLayout. This prop allows additional properties to be passed to the Logo component, enhancing its configurability and dynamic styling capabilities. The changes encompass updates to component implementation files, type definitions, and import statements across the affected modules.

Changes

File(s) Change Summary
packages/.../Header/index.tsx, packages/.../NavMini/index.tsx, packages/.../NavVertical/index.tsx, packages/.../NavigationLayout/index.tsx Introduced LogoProps prop in the component signatures and spread its values into the Logo component. In NavigationLayout, LogoProps is passed to child components.
packages/.../Header/types.ts, packages/.../NavMini/types.ts, packages/.../NavVertical/types.ts, packages/.../NavigationLayout/types.ts Added new optional property LogoProps?: PartialLogoProps to component interfaces and updated import statements to include PartialLogoProps.
packages/components/CHANGELOG.md Added version 1.0.25 to the changelog, noting the introduction of LogoProps.
packages/components/package.json Updated version from 1.0.24 to 1.0.25.
packages/design-system/components/web/logos/Logo/types.ts Added new type alias PartialLogoProps to omit ref and children from LogoProps.

Sequence Diagram(s)

sequenceDiagram
    participant NL as NavigationLayout
    participant H as Header
    participant NM as NavMini
    participant NV as NavVertical
    participant L as Logo

    NL->>H: Pass LogoProps
    NL->>NM: Pass LogoProps
    NL->>NV: Pass LogoProps
    H->>L: Spread LogoProps
    NM->>L: Spread LogoProps
    NV->>L: Spread LogoProps
Loading

Suggested labels

needs review

Suggested reviewers

  • priscilladeroode
  • anicioalexandre
  • deboracosilveira

Poem

I hopped into the code today,
Adding props in a clever way.
With LogoProps, our logos gleam,
Like moonlit carrots in a dream.
I’m a rabbit full of cheer—hop on, my friend, and toast a beer!
🥕🐇

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.

packages/components/modules/navigations/web/Header/index.tsx

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: Cannot read config file: /packages/components/.eslintrc.js
Error: Cannot find module '@baseapp-frontend/config/.eslintrc-with-restricted-paths.js'
Require stack:

  • /packages/components/.eslintrc.js
  • /node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/cli-engine/cli-engine.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/eslint/eslint.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/eslint/index.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/cli.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/bin/eslint.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15)
    at Module._load (node:internal/modules/cjs/loader:1074:27)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
    at Module.require (node:internal/modules/cjs/loader:1339:12)
    at require (node:internal/modules/helpers:135:16)
    at Object. (/packages/components/.eslintrc.js:1:18)
    at Module._compile (node:internal/modules/cjs/loader:1546:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
    at Module.load (node:internal/modules/cjs/loader:1317:32)
packages/components/modules/navigations/web/Header/types.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: Cannot read config file: /packages/components/.eslintrc.js
Error: Cannot find module '@baseapp-frontend/config/.eslintrc-with-restricted-paths.js'
Require stack:

  • /packages/components/.eslintrc.js
  • /node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/cli-engine/cli-engine.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/eslint/eslint.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/eslint/index.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/cli.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/bin/eslint.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15)
    at Module._load (node:internal/modules/cjs/loader:1074:27)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
    at Module.require (node:internal/modules/cjs/loader:1339:12)
    at require (node:internal/modules/helpers:135:16)
    at Object. (/packages/components/.eslintrc.js:1:18)
    at Module._compile (node:internal/modules/cjs/loader:1546:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
    at Module.load (node:internal/modules/cjs/loader:1317:32)
packages/components/modules/navigations/web/NavMini/types.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: Cannot read config file: /packages/components/.eslintrc.js
Error: Cannot find module '@baseapp-frontend/config/.eslintrc-with-restricted-paths.js'
Require stack:

  • /packages/components/.eslintrc.js
  • /node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/cli-engine/cli-engine.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/eslint/eslint.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/eslint/index.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/cli.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/bin/eslint.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15)
    at Module._load (node:internal/modules/cjs/loader:1074:27)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
    at Module.require (node:internal/modules/cjs/loader:1339:12)
    at require (node:internal/modules/helpers:135:16)
    at Object. (/packages/components/.eslintrc.js:1:18)
    at Module._compile (node:internal/modules/cjs/loader:1546:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
    at Module.load (node:internal/modules/cjs/loader:1317:32)
  • 6 others

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9e4d435 and cdd9f60.

📒 Files selected for processing (11)
  • packages/components/CHANGELOG.md (1 hunks)
  • packages/components/modules/navigations/web/Header/index.tsx (2 hunks)
  • packages/components/modules/navigations/web/Header/types.ts (2 hunks)
  • packages/components/modules/navigations/web/NavMini/index.tsx (2 hunks)
  • packages/components/modules/navigations/web/NavMini/types.ts (2 hunks)
  • packages/components/modules/navigations/web/NavVertical/index.tsx (2 hunks)
  • packages/components/modules/navigations/web/NavVertical/types.ts (2 hunks)
  • packages/components/modules/navigations/web/NavigationLayout/index.tsx (7 hunks)
  • packages/components/modules/navigations/web/NavigationLayout/types.ts (2 hunks)
  • packages/components/package.json (1 hunks)
  • packages/design-system/components/web/logos/Logo/types.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (11)
  • packages/components/package.json
  • packages/components/modules/navigations/web/Header/types.ts
  • packages/components/CHANGELOG.md
  • packages/components/modules/navigations/web/NavVertical/types.ts
  • packages/design-system/components/web/logos/Logo/types.ts
  • packages/components/modules/navigations/web/Header/index.tsx
  • packages/components/modules/navigations/web/NavigationLayout/types.ts
  • packages/components/modules/navigations/web/NavigationLayout/index.tsx
  • packages/components/modules/navigations/web/NavVertical/index.tsx
  • packages/components/modules/navigations/web/NavMini/types.ts
  • packages/components/modules/navigations/web/NavMini/index.tsx
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Component Test Packages

🪧 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.
  • @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 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.

@tsl-ps2
Copy link
Collaborator Author

tsl-ps2 commented Mar 7, 2025

For FEN, we would like to use a non-quadratic logo above the menu. I therefore "forwarded" the sx prop of Logo so that we can set the logo width to fit-content instead of 40 on the template.

@tsl-ps2 tsl-ps2 force-pushed the FEN-168-make-logo-customizable branch from d3a115d to 162a327 Compare March 12, 2025 09:58
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: 0

🧹 Nitpick comments (1)
packages/components/CHANGELOG.md (1)

3-8: Clarify the Changelog Entry for LogoProps Customization

The new version section for 1.0.18 is correctly placed and formatted. However, to directly tie the changelog note to the PR objectives, consider expanding the description. Specifically, mention that the forwarded LogoProps now allow overriding the default sx properties of the logo component. This clarification can help future maintainers and users to immediately understand that the customization is targeting the logo’s style/options, aligning with FEN-168.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d3a115d and 162a327.

📒 Files selected for processing (10)
  • packages/components/CHANGELOG.md (1 hunks)
  • packages/components/modules/navigations/web/Header/index.tsx (2 hunks)
  • packages/components/modules/navigations/web/Header/types.ts (2 hunks)
  • packages/components/modules/navigations/web/NavMini/index.tsx (2 hunks)
  • packages/components/modules/navigations/web/NavMini/types.ts (2 hunks)
  • packages/components/modules/navigations/web/NavVertical/index.tsx (2 hunks)
  • packages/components/modules/navigations/web/NavVertical/types.ts (1 hunks)
  • packages/components/modules/navigations/web/NavigationLayout/index.tsx (7 hunks)
  • packages/components/modules/navigations/web/NavigationLayout/types.ts (1 hunks)
  • packages/components/package.json (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/components/package.json
🚧 Files skipped from review as they are similar to previous changes (8)
  • packages/components/modules/navigations/web/NavMini/types.ts
  • packages/components/modules/navigations/web/Header/index.tsx
  • packages/components/modules/navigations/web/NavigationLayout/types.ts
  • packages/components/modules/navigations/web/NavMini/index.tsx
  • packages/components/modules/navigations/web/Header/types.ts
  • packages/components/modules/navigations/web/NavVertical/index.tsx
  • packages/components/modules/navigations/web/NavigationLayout/index.tsx
  • packages/components/modules/navigations/web/NavVertical/types.ts
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Build and Lint Packages
  • GitHub Check: Component Test Packages

@anicioalexandre anicioalexandre added the needs changes PR was reviewed, and changes are required. label Mar 12, 2025
@tsl-ps2 tsl-ps2 force-pushed the FEN-168-make-logo-customizable branch from 9e4d435 to cdd9f60 Compare March 19, 2025 13:05
@anicioalexandre anicioalexandre merged commit c851380 into master Mar 19, 2025
7 of 8 checks passed
@anicioalexandre anicioalexandre deleted the FEN-168-make-logo-customizable branch March 19, 2025 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs changes PR was reviewed, and changes are required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants