Skip to content

feat: Upgrade cozy-ui and cozy-ui-plus in cozy-search and cozy-sharing#2968

Merged
JF-Cozy merged 1 commit intomasterfrom
feat/uiOther
Mar 24, 2026
Merged

feat: Upgrade cozy-ui and cozy-ui-plus in cozy-search and cozy-sharing#2968
JF-Cozy merged 1 commit intomasterfrom
feat/uiOther

Conversation

@JF-Cozy
Copy link
Copy Markdown
Contributor

@JF-Cozy JF-Cozy commented Mar 24, 2026

BREAKING CHANGE: You must have cozy-ui >= 138.1.0 and cozy-ui-plus >= 6.0.0

Summary by CodeRabbit

  • New Features

    • Enhanced sharing banners with responsive mobile support for improved experience on small screens
  • Refactor

    • Updated message and assistant step UI wrappers and component structure for more consistent visuals and maintainability
    • Replaced banner implementation with alert-driven layout to simplify actions and improve responsiveness
  • Chores

    • Updated package dependencies to newer compatible versions and cleaned up unused dev dependencies

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 24, 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: df3bfa83-606c-4730-9ebe-c5a05c0311c1

📥 Commits

Reviewing files that changed from the base of the PR and between 91455a0 and dca3fe8.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (7)
  • packages/cozy-search/package.json
  • packages/cozy-search/src/components/CreateAssistantSteps/ApiKeyStep.jsx
  • packages/cozy-search/src/components/Messages/UserMessage.jsx
  • packages/cozy-sharing/package.json
  • packages/cozy-sharing/src/components/SharingBanner/components/PublicBanner.jsx
  • packages/cozy-sharing/src/components/SharingBanner/components/PublicBanner.spec.jsx
  • packages/cozy-sharing/src/styles/publicBanner.styl
✅ Files skipped from review due to trivial changes (1)
  • packages/cozy-sharing/src/components/SharingBanner/components/PublicBanner.spec.jsx
🚧 Files skipped from review as they are similar to previous changes (5)
  • packages/cozy-search/src/components/CreateAssistantSteps/ApiKeyStep.jsx
  • packages/cozy-search/src/components/Messages/UserMessage.jsx
  • packages/cozy-search/package.json
  • packages/cozy-sharing/src/components/SharingBanner/components/PublicBanner.jsx
  • packages/cozy-sharing/package.json

Walkthrough

This PR bumps cozy-ui versions and cozy-ui-plus peer minimums in multiple packages, removes cozy-bar from cozy-search, replaces several Card/Banner wrappers with Box/Alert components (moving class-based styles into Box props and Alert actions), adds responsive Alert behavior via useBreakpoints, updates a test to include BreakpointsProvider, and adjusts related Stylus rules for public banner markup. No exported public API signatures were changed.

Possibly related PRs

Suggested reviewers

  • doubleface
  • rezk2ll
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: upgrading cozy-ui and cozy-ui-plus across the two specified packages (cozy-search and cozy-sharing).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/uiOther

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.

Copy link
Copy Markdown

@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

🧹 Nitpick comments (1)
packages/cozy-sharing/src/components/SharingBanner/components/PublicBanner.jsx (1)

116-154: Add PropTypes for SharingBannerByLink.

SharingBannerByLink receives the onClose prop but lacks PropTypes definition. For consistency with SharingBannerCozyToCozy (lines 155-160) and to document the component's API, consider adding PropTypes.

📝 Proposed PropTypes for SharingBannerByLink
 }
 SharingBannerCozyToCozy.propTypes = {
   sharing: PropTypes.object.isRequired,
   isSharingShortcutCreated: PropTypes.bool.isRequired,
   addSharingLink: PropTypes.string.isRequired,
   onClose: PropTypes.func.isRequired
 }
+SharingBannerByLink.propTypes = {
+  onClose: PropTypes.func.isRequired
+}
 export { SharingBannerCozyToCozy, SharingBannerByLink }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/cozy-sharing/src/components/SharingBanner/components/PublicBanner.jsx`
around lines 116 - 154, Add PropTypes for the SharingBannerByLink component by
importing PropTypes and declaring SharingBannerByLink.propTypes = { onClose:
PropTypes.func.isRequired } (or .func if optional) immediately after the
SharingBannerByLink function, matching the pattern used by
SharingBannerCozyToCozy; ensure the PropTypes import is added if missing and use
the same required/optional choice as the similar component to keep API
documentation consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@packages/cozy-sharing/src/components/SharingBanner/components/PublicBanner.jsx`:
- Around line 71-74: In PublicBanner.jsx the Alert component is being passed a
raw CSS variable via the color prop (color="var(--defaultBackgroundColor)"),
which is unsupported; replace the color prop with one of the semantic values
(primary, secondary, success, error, warning, info) or remove the color prop and
apply your custom CSS variable via the Alert's sx prop (e.g., sx={{
backgroundColor: 'var(--defaultBackgroundColor)' }}) so styling is applied
correctly while keeping the existing square and block={isMobile} props intact.

---

Nitpick comments:
In
`@packages/cozy-sharing/src/components/SharingBanner/components/PublicBanner.jsx`:
- Around line 116-154: Add PropTypes for the SharingBannerByLink component by
importing PropTypes and declaring SharingBannerByLink.propTypes = { onClose:
PropTypes.func.isRequired } (or .func if optional) immediately after the
SharingBannerByLink function, matching the pattern used by
SharingBannerCozyToCozy; ensure the PropTypes import is added if missing and use
the same required/optional choice as the similar component to keep API
documentation consistent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8bce00de-93c5-4c73-a69e-e4ed117454e5

📥 Commits

Reviewing files that changed from the base of the PR and between 4c152ef and 91455a0.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (6)
  • packages/cozy-search/package.json
  • packages/cozy-search/src/components/CreateAssistantSteps/ApiKeyStep.jsx
  • packages/cozy-search/src/components/Messages/UserMessage.jsx
  • packages/cozy-sharing/package.json
  • packages/cozy-sharing/src/components/SharingBanner/components/PublicBanner.jsx
  • packages/cozy-sharing/src/components/SharingBanner/components/PublicBanner.spec.jsx

Comment on lines +71 to +74
<Alert
color="var(--defaultBackgroundColor)"
square
block={isMobile}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

cozy-ui Alert component color prop documentation

💡 Result:

The Cozy UI Alert component supports a color prop that changes the alert's color scheme. Possible values are: primary, secondary, success, error, warning, info. This is stated in the official Cozy UI guidelines documentation. Cozy UI defines corresponding semantic theme colors (e.g., --successColor, --errorColor, --warningColor, --infoColor) used for theming components like alerts. The styleguide mentions alert-specific z-index values ($alert-index), confirming the existence of alert components. The React components documentation is hosted at https://cozy.github.io/cozy-ui/react/ (referenced in the GitHub repo), which serves as the styleguidist for viewing component props and examples, though direct text snippets were not captured in search results. Cozy UI is based on Material-UI v4, where the Alert component natively supports a color prop with these exact values.

Citations:


Replace color="var(--defaultBackgroundColor)" with a supported semantic color value.

The Alert component only accepts semantic color values: primary, secondary, success, error, warning, or info. Passing a CSS variable string will not apply the expected styling. Use one of the supported values or apply custom styling via the sx prop if a custom color is needed.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/cozy-sharing/src/components/SharingBanner/components/PublicBanner.jsx`
around lines 71 - 74, In PublicBanner.jsx the Alert component is being passed a
raw CSS variable via the color prop (color="var(--defaultBackgroundColor)"),
which is unsupported; replace the color prop with one of the semantic values
(primary, secondary, success, error, warning, info) or remove the color prop and
apply your custom CSS variable via the Alert's sx prop (e.g., sx={{
backgroundColor: 'var(--defaultBackgroundColor)' }}) so styling is applied
correctly while keeping the existing square and block={isMobile} props intact.

BREAKING CHANGE: You must have `cozy-ui >= 138.1.0 and cozy-ui-plus >= 6.0.0`
@JF-Cozy JF-Cozy merged commit f5fd252 into master Mar 24, 2026
3 checks passed
@JF-Cozy JF-Cozy deleted the feat/uiOther branch March 24, 2026 14:16
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.

2 participants