-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move canister button from sidebar to profile popover (#5435)
# Motivation move canister to less accessible and visible location. # Changes - [X] Canisters button is removed from the sidebar - [X] Canisters button added to profile popover - [X] clickCanisters function is moved AccountMenu <img width="1727" alt="Screenshot 2024-09-11 at 15 23 17" src="https://github.com/user-attachments/assets/81ec8932-c81e-4743-9ca2-3d46d653000c"> # Tests Tests are updated to use the clickCanisters from AccountMenuPo # Todos - [x] Add entry to changelog (if necessary). Need opinions to learn what we add to changlog and what we don't --------- Co-authored-by: “Cosku <“[email protected]”>
- Loading branch information
1 parent
40dff2f
commit 016b7d9
Showing
12 changed files
with
91 additions
and
28 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
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,23 @@ | ||
<script lang="ts"> | ||
import { i18n } from "$lib/stores/i18n"; | ||
import { IconExplore } from "@dfinity/gix-components"; | ||
import { canistersPathStore } from "$lib/derived/paths.derived"; | ||
</script> | ||
|
||
<a data-tid="canisters-button" href={$canistersPathStore} class="text"> | ||
<IconExplore /> | ||
{$i18n.navigation.canisters} | ||
</a> | ||
|
||
<style lang="scss"> | ||
@use "../../themes/mixins/account-menu"; | ||
a { | ||
@include account-menu.button; | ||
text-decoration: none; | ||
&:hover { | ||
text-decoration: underline; | ||
} | ||
} | ||
</style> |
Binary file modified
BIN
-2.11 KB
(99%)
...design.spec.ts-Design-Signed-in-My-Tokens-wide-screen-1-Google-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.14 KB
(98%)
...shots/design.spec.ts-Design-Signed-in-My-Tokens-wide-screen-1-firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,32 @@ | ||
import { BasePageObject } from "$tests/page-objects/base.page-object"; | ||
import type { PageObjectElement } from "$tests/types/page-object.types"; | ||
import { isNullish } from "@dfinity/utils"; | ||
|
||
export class LinkPo extends BasePageObject { | ||
private static readonly DEFAULT_TID = "link-component"; | ||
|
||
static under({ | ||
element, | ||
testId, | ||
}: { | ||
element: PageObjectElement; | ||
testId?: string; | ||
}): LinkPo { | ||
if (isNullish(testId)) { | ||
return new LinkPo(element.byTestId(LinkPo.DEFAULT_TID)); | ||
} | ||
return new LinkPo(element.byTestId(testId)); | ||
} | ||
|
||
getHref(): Promise<string> { | ||
return this.root.getAttribute("href"); | ||
} | ||
|
||
async click(): Promise<void> { | ||
return this.root.click(); | ||
} | ||
|
||
async getAttribute(attributeName: string): Promise<string> { | ||
return this.root.getAttribute(attributeName); | ||
} | ||
} |
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