Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Cristiano Rastelli <cristiano.rastelli@hashicorp.com>
  • Loading branch information
alex-ju and didoo committed Sep 20, 2023
1 parent fcf1f81 commit c244fcd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/components/addon/components/hds/side-nav/index.js
Expand Up @@ -12,6 +12,8 @@ import { registerDestructor } from '@ember/destroyable';
export default class HdsSideNavComponent extends Component {
@tracked isResponsive = this.args.isResponsive ?? true;
@tracked isMinimized = this.args.isMinimized ?? false;
// we want this new feature to be opt-in so we don't introduce a breaking change
// we may review this decision in the future, if more products have adopted it as their preferred configuration
@tracked isCollapsible = this.args.isCollapsible ?? false;
@tracked isAnimating = false;
@tracked isDesktop = true;
Expand Down
Expand Up @@ -20,12 +20,12 @@ This is the full-fledged component (responsive and animated).
<em>Notice: even if the `@isResponsive` parameter is set to false, some JavaScript is executed anyway in the background, and event listeners are attached to some DOM elements (even if this functionality is not used).</em>
</C.Property>
<C.Property @name="isCollapsible" @type="boolean" @default="false">
Controls whether the SideNav is collapsible on large viewports. When this argument and `isResponsive` are set to `true` a toggle button will permanently be rendered to collapse and expand the SideNav.
Controls whether the SideNav can be collapsed by the user on large viewports. When this argument and `isResponsive` are set to `true` a toggle button will permanently be rendered to collapse and expand the SideNav.
<br>
<em>Notice: if `@isResponsive` is set to false this argument has no effects.</em>
</C.Property>
<C.Property @name="isMinimized" @type="boolean" @default="false">
Controls if the `SideNav` is rendered collapsed or expanded when initialized. This allows an application to preserve the collapsed/expanded state across sessions.
Controls if the `SideNav` is rendered collapsed or expanded when initialized. This allows an application to preserve the collapsed/expanded state across sessions. The logic required to preserve the state at the application level is left to the consumers.
</C.Property>
<C.Property @name="hasA11yRefocus" @type="boolean" @default="true">
Controls whether a "navigator narrator" and a "skip link" are added to the navigation (provided by the [`ember-a11y-refocus` Ember addon](https://github.com/ember-a11y/ember-a11y-refocus)). It can be programmatically turned off by passing `false`. Warning: if it is set to false, then it will fail Bypass Blocks, [Success Criteria 2.4.1](https://www.w3.org/WAI/WCAG21/Understanding/bypass-blocks.html). Since this component appears on every page, the application will not be considered conformant.
Expand Down

0 comments on commit c244fcd

Please sign in to comment.