Skip to content

Conversation

@jfox-box
Copy link
Contributor

@jfox-box jfox-box commented Sep 2, 2025

Summary by CodeRabbit

  • Chores

    • Relaxed version constraints for two blueprint packages to allow compatible updates and receive upstream fixes; no public API changes.
  • Style

    • Added modal design tokens and spacing variables to align modal appearance with the design system for several modal types (temporary until component migration).

@jfox-box jfox-box requested a review from a team as a code owner September 2, 2025 21:16
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 2, 2025

Walkthrough

I pity the fool — updated package.json dependency and peerDependency specifiers for @box/blueprint-web (12.43.0 → ^12.64.2) and @box/blueprint-web-assets (4.61.5 → ^4.65.0); added CSS custom properties (modal tokens) to src/elements/common/modal.scss for several modal selectors. No exported/public API changes.

Changes

Cohort / File(s) Summary
Dependency spec updates
package.json
Replaced exact version pins with caret ranges in dependencies and peerDependencies: @box/blueprint-web 12.43.0 → ^12.64.2; @box/blueprint-web-assets 4.61.5 → ^4.65.0.
Modal CSS tokens
src/elements/common/modal.scss
Inserted a block of CSS custom properties (design tokens) for .be-modal-create-folder .be-modal-dialog-content, .be-modal-rename .be-modal-dialog-content, .be-modal-share .be-modal-dialog-content, and .be-modal-delete .be-modal-dialog-content (overlay/background, sizes, paddings, border-radius, title/body/footer tokens) as temporary tokens mirroring Blueprint's modal variables.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

ready-to-merge

Suggested reviewers

  • tjuanitas
  • jpan-box
  • greg-in-a-box

Poem

I pity the fool who pins a version tight,
Carets march in and set dependencies right.
Modal tokens land, styled crisp and bold,
Ship it smooth, no surprises left untold.
Ho! Merge it now — that's worth its weight in gold.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP (Model Context Protocol) integration is disabled
  • Jira integration is disabled
  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a4865a6 and d2c287e.

📒 Files selected for processing (1)
  • src/elements/common/modal.scss (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/elements/common/modal.scss
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: lint_test_build
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Summary
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch upgrade-blueprint-web-2025-09

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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

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

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit 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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP (Model Context Protocol) integration is disabled
  • Jira integration is disabled
  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 468d6c1 and c11fd32.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (1)
  • package.json (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: tjuanitas
PR: box/box-ui-elements#4224
File: package.json:296-297
Timestamp: 2025-08-12T18:04:17.698Z
Learning: In the box-ui-elements project, the team is comfortable with raising peerDependency minimum versions when upgrading blueprint-web packages, even if it's a breaking change for consumers.
📚 Learning: 2025-08-12T18:04:17.698Z
Learnt from: tjuanitas
PR: box/box-ui-elements#4224
File: package.json:296-297
Timestamp: 2025-08-12T18:04:17.698Z
Learning: In the box-ui-elements project, the team is comfortable with raising peerDependency minimum versions when upgrading blueprint-web packages, even if it's a breaking change for consumers.

Applied to files:

  • package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: lint_test_build
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Summary
🔇 Additional comments (1)
package.json (1)

296-297: Peer minima bump is fine by team norms—ship it, fool!

Raising peerDependency floors to ^12.64.2 / ^4.65.0 matches our prior guidance. Just call out the bump in release notes so consumers aren’t surprised.

Confirm Storybook and a smoke build still render core components (Buttons, Inputs, Tokens) without style regressions under the new Blueprint versions.

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 (4)
src/elements/common/modal.scss (4)

43-47: Call your source shot, sucka — pin the Blueprint version/path in the comment.

Add the exact blueprint file and version these tokens came from to avoid drift during future upgrades.

Apply this diff to enrich the comment:

     /*
-        These tokens are pasted from blueprint modal.module.scss.
+        These tokens are pasted from blueprint modal.module.scss.
+        Source: @box/blueprint-web v12.64.2 (packages/blueprint-web/src/components/modal/modal.module.scss)
         We need these because we use a custom modal component instead of the Blueprint modal root component.
         This should be removed once we can fully migrate to the Blueprint component.
     */

48-81: Scope so the whole crew benefits — make overlay consume the token too.

Defining tokens on .be-modal-dialog-content won’t reach .be-modal-*overlay siblings. Wire the overlay background to the new var with a safe fallback.

Apply this diff outside the changed block to consume the token:

 .be-modal-wrapper-overlay {
     position: fixed;
     inset: 0;
-    background-color: $darker-black;
+    /* Prefer modal token; fall back to legacy color */
+    background-color: var(--modal-overlay-background, #000c);
 }
 
 .be-modal-dialog-overlay {
     @extend .be-modal-wrapper-overlay;
 
     position: absolute;
 }

Verification:

  • Open any of the affected modals and confirm the overlay color matches Blueprint expectations. If your theming defines --overlay-modal-overlay, you should see it applied; otherwise it should look unchanged.

57-57: Use the token you declare, fool — hook up border radius.

You define --modal-border-radius but still use a hard-coded radius later. Use the token to stay in sync with Blueprint.

Apply this diff outside the changed block:

 .be-modal-create-folder .be-modal-dialog-content,
 .be-modal-rename .be-modal-dialog-content,
 .be-modal-share .be-modal-dialog-content,
 .be-modal-delete .be-modal-dialog-content {
     padding: 0;
-    border-radius: var(--radius-4);
+    border-radius: var(--modal-border-radius, var(--radius-4));
 }
 
 .be-modal-dialog-content {
@@
-    padding: 25px;
-    border-radius: $bdl-border-radius-size;
+    padding: 25px;
+    border-radius: var(--modal-border-radius, $bdl-border-radius-size);

69-73: Let the tokens drive spacing — ditch the hard-coded padding.

Title/body padding tokens are defined but unused. Wire them up with fallbacks to avoid style drift.

Apply this diff outside the changed block:

 .be-modal-dialog-content {
@@
-    padding: 25px;
+    /* Use body padding token; keep legacy fallback for safety */
+    padding: var(--modal-body-padding, 25px);
 }

Optionally, if you have a title region selector, apply var(--modal-title-padding, ) there too.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP (Model Context Protocol) integration is disabled
  • Jira integration is disabled
  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c11fd32 and a4865a6.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (2)
  • package.json (2 hunks)
  • src/elements/common/modal.scss (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: tjuanitas
PR: box/box-ui-elements#4224
File: package.json:296-297
Timestamp: 2025-08-12T18:04:17.698Z
Learning: In the box-ui-elements project, the team is comfortable with raising peerDependency minimum versions when upgrading blueprint-web packages, even if it's a breaking change for consumers.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: lint_test_build
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Summary
🔇 Additional comments (1)
src/elements/common/modal.scss (1)

48-81: Good shim to align with Blueprint tokens.

This local token map unblocks the upgrade while you migrate to the Blueprint modal root. Clean and scoped.

@jfox-box jfox-box force-pushed the upgrade-blueprint-web-2025-09 branch from a4865a6 to d2c287e Compare September 2, 2025 23:13
@mergify mergify bot merged commit ac48f93 into master Sep 3, 2025
11 checks passed
@mergify mergify bot deleted the upgrade-blueprint-web-2025-09 branch September 3, 2025 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants