Skip to content

Exposed the useSidebar hook from Sidebar#527

Merged
jeradrutnam merged 2 commits intowso2:mainfrom
jeradrutnam:main
Apr 27, 2026
Merged

Exposed the useSidebar hook from Sidebar#527
jeradrutnam merged 2 commits intowso2:mainfrom
jeradrutnam:main

Conversation

@jeradrutnam
Copy link
Copy Markdown
Member

This pull request makes a small but important update to the Sidebar component exports. The useSidebar hook is now exposed from the Sidebar module, making it available for use in other parts of the application.

  • Exposed the useSidebar hook from Sidebar by updating the export statement in packages/oxygen-ui/src/components/index.ts
  • Documented the change and published patch updates for @wso2/oxygen-ui, @wso2/oxygen-ui-charts-react, and @wso2/oxygen-ui-icons-react in .changeset/early-points-add.md

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 27, 2026

📝 Walkthrough

Summary

This pull request exposes the useSidebar hook from the Sidebar component module, making it available for external use.

Changes

packages/oxygen-ui/src/components/index.ts

  • Updated the export statement to include useSidebar alongside the existing Sidebar component export from the Sidebar module

Changeset

  • Added .changeset/early-points-add.md documenting a patch version bump for three packages:
    • @wso2/oxygen-ui
    • @wso2/oxygen-ui-charts-react
    • @wso2/oxygen-ui-icons-react

Impact

This change enables developers to directly import and use the useSidebar hook from the main Oxygen UI exports, improving the usability of the Sidebar component's context hook in applications.

Walkthrough

This pull request introduces a new Changeset entry marking three @wso2 packages for a patch release with the documented change "Expose useSidebar hook". The components barrel export in packages/oxygen-ui/src/components/index.ts is updated to re-export the useSidebar hook alongside the existing Sidebar component, making the hook available to consumers of the package.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description provides relevant context but lacks most sections required by the template, such as checklist items, security checks, and links to related documentation or tests. Complete the required template sections including the checklist items, security checks, and documentation/testing links to ensure compliance with repository standards.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: exposing the useSidebar hook from the Sidebar component.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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.

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)
.changeset/early-points-add.md (1)

7-8: Minor: trailing blank line after content.

Line 8 is an empty trailing line outside the changeset front matter/body. Not a functional issue, but consider trimming to keep the changeset tidy.

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

In @.changeset/early-points-add.md around lines 7 - 8, Remove the trailing blank
line at the end of the changeset body in early-points-add.md so the file ends
immediately after the content (no extra empty line); open the changeset file and
delete the empty line following the front matter/body to keep the changeset
tidy.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.changeset/early-points-add.md:
- Around line 2-4: The changeset erroneously lists packages that don't consume
or re-export the new useSidebar export; remove the two unrelated entries
'@wso2/oxygen-ui-charts-react' and '@wso2/oxygen-ui-icons-react' from
.changeset/early-points-add.md so only '@wso2/oxygen-ui' remains, ensuring the
changeset only targets the package that actually uses the new export.

---

Nitpick comments:
In @.changeset/early-points-add.md:
- Around line 7-8: Remove the trailing blank line at the end of the changeset
body in early-points-add.md so the file ends immediately after the content (no
extra empty line); open the changeset file and delete the empty line following
the front matter/body to keep the changeset tidy.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0f42b6f0-a285-46e4-bf96-a805f3e02987

📥 Commits

Reviewing files that changed from the base of the PR and between 9237802 and c26bdd3.

📒 Files selected for processing (2)
  • .changeset/early-points-add.md
  • packages/oxygen-ui/src/components/index.ts

Comment on lines +2 to +4
'@wso2/oxygen-ui': patch
'@wso2/oxygen-ui-charts-react': patch
'@wso2/oxygen-ui-icons-react': patch
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 | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check whether the charts-react and icons-react packages reference useSidebar or depend on `@wso2/oxygen-ui` in a way that warrants a coordinated bump.
fd -t f 'package.json' packages/oxygen-ui-charts-react packages/oxygen-ui-icons-react --exec cat {}
rg -nP '\buseSidebar\b' -C2 packages/oxygen-ui-charts-react packages/oxygen-ui-icons-react 2>/dev/null

Repository: wso2/oxygen-ui

Length of output: 4227


Remove unrelated packages from changeset.

The changeset includes @wso2/oxygen-ui-charts-react and @wso2/oxygen-ui-icons-react, but neither package uses useSidebar. Additionally, @wso2/oxygen-ui-icons-react has no dependency on @wso2/oxygen-ui at all, making its inclusion unjustified. Only include packages that directly consume or re-export the new export.

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

In @.changeset/early-points-add.md around lines 2 - 4, The changeset erroneously
lists packages that don't consume or re-export the new useSidebar export; remove
the two unrelated entries '@wso2/oxygen-ui-charts-react' and
'@wso2/oxygen-ui-icons-react' from .changeset/early-points-add.md so only
'@wso2/oxygen-ui' remains, ensuring the changeset only targets the package that
actually uses the new export.

@jeradrutnam jeradrutnam merged commit 5bc46e0 into wso2:main Apr 27, 2026
7 checks passed
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