-
Notifications
You must be signed in to change notification settings - Fork 274
docs(ui5-shellbar): adjust samples to UXC guidelines #11340
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
base: main
Are you sure you want to change the base?
Conversation
a8b3d5e
to
8874d89
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the ShellBar samples to align with the new UXC guidelines by replacing deprecated APIs and improving the sample components.
- Updated basic samples to use the new ui5-shellbar-search component for search functionality.
- Removed deprecated attributes and components in advanced samples and replaced them with the new user menu components.
- Updated corresponding main.js files to import new components and handle search scopes accordingly.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
packages/website/docs/_samples/fiori/ShellBar/Basic/sample.html | Replaced ui5-input with ui5-shellbar-search to update the search field API. |
packages/website/docs/_samples/fiori/ShellBar/Basic/main.js | Imported ui5-shellbar-search to support the updated basic sample. |
packages/website/docs/_samples/fiori/ShellBar/Advanced/sample.html | Removed deprecated attributes and updated the search field and user menu integration. |
packages/website/docs/_samples/fiori/ShellBar/Advanced/main.js | Removed deprecated imports and added new ones, including handling dynamic search scope changes. |
<ui5-user-menu-item icon="action-settings" text="Setting" data-id="setting"></ui5-user-menu-item> | ||
<ui5-user-menu-item icon="official-service" text="Legal Information"> | ||
<ui5-user-menu-item text="Terms of Use" data-id="terms-of-use"></ui5-user-menu-item> | ||
<ui5-user-menu-item text="Private Policy" data-id="privacy-policy"></ui5-user-menu-item> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider renaming "Private Policy" to "Privacy Policy" to align with standard terminology.
<ui5-user-menu-item text="Private Policy" data-id="privacy-policy"></ui5-user-menu-item> | |
<ui5-user-menu-item text="Privacy Policy" data-id="privacy-policy"></ui5-user-menu-item> |
Copilot uses AI. Check for mistakes.
item.remove(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider using a more efficient method such as setting searchScope.innerHTML to an empty string if supported, to remove all search items and improve maintainability.
searchScope.items.forEach(item => { | |
item.remove(); | |
}); | |
searchScope.innerHTML = ""; |
Copilot uses AI. Check for mistakes.
Updated the Shellbar samples to follow UXC guidelines. Removed APIs that will be deprecated.