Skip to content

feat(blueprint-web): Bump blueprint web and other shared features version#4505

Open
tjiang-box wants to merge 5 commits intobox:masterfrom
tjiang-box:bump-blueprint-web
Open

feat(blueprint-web): Bump blueprint web and other shared features version#4505
tjiang-box wants to merge 5 commits intobox:masterfrom
tjiang-box:bump-blueprint-web

Conversation

@tjiang-box
Copy link
Copy Markdown
Collaborator

@tjiang-box tjiang-box commented Apr 15, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Corrected button icon positioning in action menus and sidebar headers for improved UI consistency.
  • Improvements

    • Sidebar AI actions now reflect request-in-progress status.
    • Updated Box-related dependencies and added a new content-field package to dependency lists.
  • Tests

    • Added mocks for markdown-related libraries and adjusted unit test expectations for filter handling and float option mapping.
  • Chores

    • Included the new package in translation and test transform configurations.

@tjiang-box tjiang-box requested review from a team as code owners April 15, 2026 20:41
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e1dc1c7d-0277-46e8-b5cd-4d44ef23fcd1

📥 Commits

Reviewing files that changed from the base of the PR and between 25bef99 and ecaf221.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (1)
  • scripts/i18n.config.js
✅ Files skipped from review due to trivial changes (1)
  • scripts/i18n.config.js

Walkthrough

This PR updates many @box/* dependency versions and adds @box/content-field; adds Jest mocks for react-markdown and remark-gfm and updates Jest transform allowlist; changes two Button props from icon to endIcon; updates metadata filter tests; and passes hasRequestInProgress to the AI sidebar clear button.

Changes

Cohort / File(s) Summary
Dependencies & Jest config
package.json, scripts/jest/jest.config.js
Bumped multiple @box/* devDependencies and peerDependencies; added @box/content-field@^1.40.23; added @box/content-field to Jest transform allowlist; mapped react-markdown and remark-gfm to local mocks.
Jest Mocks
scripts/jest/mocks/reactMarkdownMock.js, scripts/jest/mocks/remarkGfmMock.js
Added CommonJS-compatible mocks: ReactMarkdown renders a wrapper div with children; remarkGfm returns a no-op transformer.
Button icon prop changes
src/elements/common/sub-header/BulkItemActionMenu.tsx, src/elements/common/sub-header/SubHeaderRight.tsx
Replaced icon={...} with endIcon={...} on two buttons (adjusts icon placement).
Tests
src/elements/content-explorer/__tests__/MetadataViewContainer.test.tsx
Updated expected "All Filters" label from All Filters 2 to All Filters 4; changed float filter mapping expectations from 'range' to 'between' and added type assertions in test inputs.
AI sidebar prop
src/elements/content-sidebar/BoxAISidebarContent.tsx
Passed hasRequestInProgress={hasRequestInProgress} into ClearConversationButton.
i18n
scripts/i18n.config.js
Added @box/content-field to translationDependencies.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

ready-to-merge

Suggested reviewers

  • jpan-box
  • tjuanitas
  • reneshen0328

Poem

🐰 I hopped through package lanes so wide,
Bumped boxes, added mocks to hide,
Swapped icons to the button’s rear,
Tests now hum a clearer cheer,
Chat button knows when work’s inside.

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description contains only boilerplate template text about merge queue procedures with no actual description of the changes being made. Provide a meaningful description of the changes: what dependencies were updated, why they were updated, and any migration notes or testing guidance for reviewers.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly summarizes the main change: bumping Blueprint Web and related shared feature versions, which aligns with the dependency updates in package.json and related configuration changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands and usage tips.

role="button"
aria-label={formatMessage(messages.bulkItemActionMenuAriaLabel)}
icon={Ellipsis}
endIcon={Ellipsis}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

blueprint button component now deprecated icon prop. instead, it uses startIcon and endIcon props

});

expect(screen.getByRole('button', { name: 'All Filters 2' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'All Filters 4' })).toBeInTheDocument();
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Comment thread package.json
"@box/copy-input": "^1.39.41",
"@box/combobox-with-api": "^1.42.22",
"@box/copy-input": "^1.40.21",
"@box/content-field": "^1.40.23",
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

content-field is listed as peer dependency in metadata view

Comment on lines 14 to +16
'^uuid$': require.resolve('uuid'),
'^react-markdown$': '<rootDir>/scripts/jest/mocks/reactMarkdownMock.js',
'^remark-gfm$': '<rootDir>/scripts/jest/mocks/remarkGfmMock.js',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

did the solution for uuid work for these two dependencies? I assume these are needed after upgrading content answers?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

the solution for uuid doesn't work fully for react-markdown and remark-gfm. it does resolve the file path issue but the ESM syntax such as export, import... still couldn't be handled.

Yes, these are needed after bumping box-ai-content-answers.

Another way is to add all packages in the chain such as react-markdown, devlop, unified and etc into transformIgnorePatterns. Since we are not testing the actual implementation of those packages, we can just mock the two packages that box-ai-content-answers directly imports.

testPathIgnorePatterns: ['stories.test.js$', 'stories.test.tsx$', 'stories.test.d.ts'],
transformIgnorePatterns: [
'node_modules/(?!(@box/react-virtualized/dist/es|@box/cldr-data|@box/blueprint-web|@box/blueprint-web-assets|@box/metadata-editor|@box/box-ai-content-answers|@box/box-ai-agent-selector|@box/item-icon|@box/combobox-with-api|@box/tree|@box/metadata-filter|@box/metadata-view|@box/types|@box/box-item-type-selector|@box/unified-share-modal|@box/user-selector|@box/copy-input)/)',
'node_modules/(?!(@box/react-virtualized/dist/es|@box/cldr-data|@box/blueprint-web|@box/blueprint-web-assets|@box/metadata-editor|@box/box-ai-content-answers|@box/box-ai-agent-selector|@box/item-icon|@box/combobox-with-api|@box/tree|@box/metadata-filter|@box/metadata-view|@box/content-field|@box/types|@box/box-item-type-selector|@box/unified-share-modal|@box/user-selector|@box/copy-input)/)',
Copy link
Copy Markdown
Contributor

@tjuanitas tjuanitas Apr 16, 2026

Choose a reason for hiding this comment

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

can you add content-field to scripts/i18n.config.js?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

oh good callout! tyty!

Comment thread package.json
"@box/box-ai-agent-selector": "^0.53.0",
"@box/box-ai-content-answers": "^0.139.0",
"@box/box-item-type-selector": "^0.73.1",
"@box/blueprint-web": "^14.0.2",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@coderabbitai can you compare the diff of the this file and make sure the dependency versions match up?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@tjuanitas Here's a full comparison of all @box/* packages between devDependencies and peerDependencies in package.json:

Package devDependencies peerDependencies Match?
@box/blueprint-web ^14.0.2 ^14.0.2
@box/blueprint-web-assets ^4.111.17 ^4.111.17
@box/box-ai-agent-selector ^1.39.21 ^1.39.21
@box/box-ai-content-answers ^1.43.22 ^1.43.22
@box/box-item-type-selector ^1.39.21 ^1.39.21
@box/cldr-data ^34.2.0 >=34.2.0 ⚠️ different range (pre-existing)
@box/combobox-with-api ^1.42.22 ^1.42.22
@box/copy-input ^1.40.21 ^1.40.21
@box/content-field (new) ^1.40.23 ^1.40.23
@box/item-icon ^2.32.14 ^2.32.14
@box/metadata-editor ^1.61.5 ^1.61.5
@box/metadata-filter ^1.80.23 ^1.80.23
@box/metadata-view ^1.53.26 ^1.53.26
@box/react-virtualized ^9.22.3-rc-box.10 ^9.22.3-rc-box.10
@box/types ^2.1.8 ^2.1.8
@box/unified-share-modal ^2.12.4 ^2.12.4
@box/user-selector ^1.74.22 ^1.74.22
@box/frontend ^11.0.1 (not in peer) ✅ build-tool only
@box/languages ^1.0.0 (not in peer) ✅ i18n-tool only

All versions match. The only difference is the pre-existing @box/cldr-data range (^34.2.0 in dev vs >=34.2.0 in peer), which is intentionally more permissive for consumers and was not introduced by this PR. Everything looks good! ✅


🧠 Learnings used
Learnt from: tjuanitas
Repo: box/box-ui-elements PR: 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.

Learnt from: tjuanitas
Repo: box/box-ui-elements PR: 4483
File: package.json:272-272
Timestamp: 2026-03-24T20:24:15.392Z
Learning: In the box-ui-elements project, `semantic-release` is only run in the internal Jenkins pipeline and is not consumed by end-users of the package. Therefore, engine version mismatches for `semantic-release` in `package.json` are acceptable and should not be flagged as issues.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks dude

Copy link
Copy Markdown
Contributor

@jfox-box jfox-box left a comment

Choose a reason for hiding this comment

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

Nice work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants