-
Notifications
You must be signed in to change notification settings - Fork 3
Feature/improve settings navigation #617
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: master
Are you sure you want to change the base?
Conversation
4507a48 to
e77b342
Compare
add engine arg to anchor and item for transitions
Improve icon and links flexibility of OSS::Layout::Sidebar::Item
Add disableAutoActive option to OSS::Anchor
| {{/if}} | ||
|
|
||
| <div class="oss-sidebar-item__label"> | ||
| <div class={{concat "oss-sidebar-item__label" (unless @icon " oss-sidebar-item__label--no-icon")}}> |
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.
Label no-icon class ignores icon named block usage
Medium Severity
The oss-sidebar-item__label--no-icon class is applied based solely on @icon being falsy via (unless @icon ...), but this doesn't account for when an icon is rendered via the named block. When using <:icon> without providing @icon (a valid pattern used in sidebar.hbs for the home logo), the label incorrectly receives the --no-icon class with extra left padding, even though an icon is visually present.
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.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| const route = this.args.routePrefix ? this.args.routePrefix + '.' + this.args.link : this.args.link; | ||
| try { | ||
| return Boolean(this.router.urlFor(this.args.link)); | ||
| return Boolean(this.router.urlFor(route)); |
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.
LinkTo route mismatch between validation and navigation
High Severity
The isInternalRoute getter validates whether routePrefix + '.' + link exists as a route, but the template passes only @link (without the prefix) to <LinkTo @route={{@link}}>. When routePrefix="display" and link="index", the component validates that "display.index" exists, but then creates a link that navigates to "index" instead. This causes navigation to the wrong route or a route error.
Additional Locations (1)
| export const BasicUsage = DefaultUsageTemplate.bind({}); | ||
| BasicUsage.args = { | ||
| link: 'https://www.upfluence.com', | ||
| disableAutoActive: false, |
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.
Storybook args defined but not used in template
Low Severity
The disableAutoActive property is defined in argTypes and added to BasicUsage.args, but the story template at line 71 does not pass @disableAutoActive={{this.disableAutoActive}} or @routePrefix={{this.routePrefix}} to the component. This creates non-functional Storybook controls that appear in the UI but have no effect when changed, which is confusing for developers using Storybook to explore the component's API.
Additional Locations (1)
| control: { | ||
| type: 'boolean' | ||
| } | ||
| }, |
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.
Storybook argType defined but never used in story
Low Severity
The disableAutoActive argType is added to the sidebar item stories configuration, but it's not included in defaultArgs and the template doesn't pass it to the component. This creates a non-functional Storybook control that users can interact with but has no visible effect.
What does this PR do?
Related to: #
What are the observable changes?
Good PR checklist
Note
Medium Risk
Moderate risk: changes affect navigation/active-state behavior in
LinkToplus sidebar expand/collapse UX, which could alter routing and visual state across the app; covered by updated integration tests.Overview
Improves
OSS::Anchorto better support app/engine routing by adding optionalroutePrefixhandling for internal route detection and wiring@current-whenvia a newdisableAutoActiveflag to control Ember’s automatic active class.Extends
OSS::Layout::Sidebarwith aheadernamed block and analwaysExpandedmode that forces the expanded state and hides the expand/collapse toggle; sidebar items/groups now pass through the new anchor routing args, and item rendering/styling is adjusted for icon-less items. Storybook examples and integration tests are updated/added to cover these behaviors.Written by Cursor Bugbot for commit 7a85ce9. This will update automatically on new commits. Configure here.