-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert User menu to
X::DropdownList
(#461)
* Refactor nav dropdown * Improve open/focus styles * Improve badge * Update tests * Test ExternalLink * Update nav.ts * Chevron test * Use `hasChevron` * Remove unnecessary styles * Revert some changes * Improve hover
- Loading branch information
Showing
13 changed files
with
230 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
<header | ||
class="z-20 mb-7 border-b border-b-color-border-faint bg-color-page-faint" | ||
> | ||
<header class="mb-7 border-b border-b-color-border-faint bg-color-page-faint"> | ||
<Header::Nav /> | ||
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<ExternalLink | ||
data-test-x-dropdown-list-item-external-link | ||
{{did-insert @registerElement}} | ||
{{on "mouseenter" @focusMouseTarget}} | ||
{{on "click" @onClick}} | ||
role={{@role}} | ||
aria-selected={{@isAriaSelected}} | ||
tabindex="-1" | ||
aria-checked={{@isAriaChecked}} | ||
@iconIsShown={{@iconIsShown}} | ||
class="x-dropdown-list-item-link {{if @isAriaSelected 'is-aria-selected'}}" | ||
...attributes | ||
> | ||
{{yield}} | ||
</ExternalLink> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import Component from "@glimmer/component"; | ||
import { XDropdownListInteractiveComponentArgs } from "./_shared"; | ||
|
||
interface XDropdownListExternalLinkComponentSignature { | ||
Element: HTMLAnchorElement; | ||
Args: XDropdownListInteractiveComponentArgs & { | ||
iconIsShown?: boolean; | ||
}; | ||
Blocks: { | ||
default: []; | ||
}; | ||
} | ||
|
||
export default class XDropdownListExternalLinkComponent extends Component<XDropdownListExternalLinkComponentSignature> {} | ||
|
||
declare module "@glint/environment-ember-loose/registry" { | ||
export default interface Registry { | ||
"x/dropdown-list/external-link": typeof XDropdownListExternalLinkComponent; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,5 +15,5 @@ | |
</div> | ||
|
||
{{#if this.animatedToolsAreShown}} | ||
<AnimatedTools class="!z-20" /> | ||
<AnimatedTools /> | ||
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.