-
Notifications
You must be signed in to change notification settings - Fork 80
feat(navigation, navigation-logo, navigation-user): Add navigation, navigation-logo & navigation-user components. #6873
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
Merged
anveshmekala
merged 84 commits into
master
from
anveshmekala/6531-feat-navigation-component
May 22, 2023
Merged
Changes from all commits
Commits
Show all changes
84 commits
Select commit
Hold shift + click to select a range
8bdfbc3
feat(nav,nav-logo,nav-user): Add nav, nav-logo & nav-user components.
anveshmekala b5906c1
add more 2e2 tests
anveshmekala c2b64e0
rename prop in nav and add e2e test
anveshmekala ad24c69
add demo-dom-swapper wrapper in demo files
anveshmekala d91619b
remove default decorator options
anveshmekala 991691c
Merge branch 'master' into anveshmekala/6531-feat-navigation-component
anveshmekala bf16349
update readme files
anveshmekala 199f634
Update stories
macandcheese 95d13b9
Merge branch 'anveshmekala/6531-feat-navigation-component' of https:/…
anveshmekala ffeb67e
feedback changes
anveshmekala db19d11
rename menuAction prop and fix e2e tests
anveshmekala b2f3254
remove async for common tests
anveshmekala a97cb56
test errors
anveshmekala cc8224c
restore stencil config
anveshmekala 80966ae
Merge branch 'master' into anveshmekala/6531-feat-navigation-component
anveshmekala 40793f4
update stories
anveshmekala cf105fb
clean up
anveshmekala 7a0769f
doc related changes
anveshmekala 2fecbe5
doc changes
anveshmekala 25573e1
more feedback changes
anveshmekala 675dd86
doc changes
anveshmekala 109a141
Merge branch 'master' into anveshmekala/6531-feat-navigation-component
anveshmekala 1ec3c32
Merge branch 'master' into anveshmekala/6531-feat-navigation-component
anveshmekala ef32860
Merge branch 'master' into anveshmekala/6531-feat-navigation-component
anveshmekala cef8b07
Merge branch 'master' into anveshmekala/6531-feat-navigation-component
anveshmekala b53d6ca
Merge branch 'master' into anveshmekala/6531-feat-navigation-component
anveshmekala 98fc70c
parse label from nav-user to avatar
anveshmekala 777ee50
update demo
anveshmekala ab36471
feat(nav,nav-logo,nav-user): Add nav, nav-logo & nav-user components.
anveshmekala 357fee2
add more 2e2 tests
anveshmekala 245728b
rename prop in nav and add e2e test
anveshmekala d2d0216
add demo-dom-swapper wrapper in demo files
anveshmekala 4323093
remove default decorator options
anveshmekala d07aab6
update readme files
anveshmekala 8aed351
Update stories
macandcheese 1f6e312
feedback changes
anveshmekala 98f816f
rename menuAction prop and fix e2e tests
anveshmekala 784d6c8
remove async for common tests
anveshmekala 230e102
test errors
anveshmekala a0d18b1
restore stencil config
anveshmekala a1c3700
update stories
anveshmekala 4ca74e1
clean up
anveshmekala 31515b1
doc related changes
anveshmekala 4255077
doc changes
anveshmekala 52be92c
more feedback changes
anveshmekala fbfb464
doc changes
anveshmekala 1f98e24
parse label from nav-user to avatar
anveshmekala 9343a9e
update demo
anveshmekala 13fe1c3
Merge branch 'anveshmekala/6531-feat-navigation-component' of https:/…
anveshmekala a731b90
fix screenshot tests
anveshmekala 6912e84
update common util tests to use describe
anveshmekala ad2eb87
refactor css files and remove redundancy
anveshmekala 27ddef7
Merge branch 'master' into anveshmekala/6531-feat-navigation-component
anveshmekala db51915
fix positioning issue in stories
anveshmekala 6708a1c
Merge branch 'master' into anveshmekala/6531-feat-navigation-component
anveshmekala 8b22471
remove redundant slots in nav stories
anveshmekala 2f76ede
screenshot feedback changes
anveshmekala 01ce5d0
Merge branch 'master' into anveshmekala/6531-feat-navigation-component
anveshmekala 266da9c
Pr feedback
macandcheese 856933b
Merge branch 'master' into anveshmekala/6531-feat-navigation-component
anveshmekala af705d6
feedback changes
anveshmekala 86180ad
Merge branch 'master' into anveshmekala/6531-feat-navigation-component
anveshmekala e30fa6f
change names
anveshmekala 82331d0
clean up
anveshmekala e424aea
fix tests
anveshmekala f453574
fix typo
anveshmekala 042e763
clean css
anveshmekala 27550ac
replace anchor with button in navigation-user
anveshmekala b563d75
update readme files
anveshmekala 92830f7
Merge branch 'master' into anveshmekala/6531-feat-navigation-component
anveshmekala 2c7dcd5
refactor(navigation): allow nesting secondary and tertiary navigation…
macandcheese bfaf90e
Merge branch 'master' into anveshmekala/6531-feat-navigation-component
anveshmekala 6095842
remove nav abbreviations from story files
anveshmekala bd29cf8
Merge branch 'master' into anveshmekala/6531-feat-navigation-component
anveshmekala 7b88d1a
more feedback changes
anveshmekala 680ab82
Merge branch 'master' into anveshmekala/6531-feat-navigation-component
anveshmekala c920b5f
add rel & target props to logo
anveshmekala 66da54a
fix logo slot issue in navigation
anveshmekala 58943da
change text and subText to heading & desctiption in logo
anveshmekala 58269bc
Merge branch 'master' into anveshmekala/6531-feat-navigation-component
anveshmekala 11f42a2
remove textEnabled prop from nav-logo
anveshmekala 07d01cb
fix navigation screenshot test
anveshmekala 7e462f8
remove tabindex and focus logo only if href is provided
anveshmekala 9b1ad85
update readme files
anveshmekala File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,4 +1,4 @@ | ||
# calcite-nav-menu-item | ||
# calcite-menu-item | ||
|
||
<!-- Auto Generated Below --> | ||
|
||
|
This file contains hidden or 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 hidden or 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,4 +1,4 @@ | ||
# calcite-nav-menu | ||
# calcite-menu | ||
|
||
<!-- Auto Generated Below --> | ||
|
||
|
This file contains hidden or 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,40 @@ | ||
import { html } from "../../../support/formatting"; | ||
import { accessible, focusable, hidden, reflects, renders } from "../../tests/commonTests"; | ||
|
||
describe("calcite-navigation-logo", () => { | ||
describe("renders", () => { | ||
renders("calcite-navigation-logo", { display: "inline-flex" }); | ||
}); | ||
|
||
describe("honors hidden attribute", () => { | ||
hidden("calcite-navigation-logo"); | ||
}); | ||
|
||
describe("accessible", () => { | ||
accessible("calcite-navigation-logo"); | ||
}); | ||
|
||
anveshmekala marked this conversation as resolved.
Show resolved
Hide resolved
|
||
it("reflects", () => | ||
reflects("calcite-navigation-logo", [ | ||
{ | ||
propertyName: "active", | ||
value: "true" | ||
}, | ||
{ | ||
propertyName: "href", | ||
value: "#logo" | ||
}, | ||
{ | ||
propertyName: "rel", | ||
value: "external" | ||
}, | ||
{ | ||
propertyName: "target", | ||
value: "_self" | ||
} | ||
])); | ||
|
||
describe("is focusable", () => { | ||
focusable(html`<calcite-navigation-logo href=" " heading="esri"></calcite-navigation-logo>`); | ||
}); | ||
}); |
This file contains hidden or 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,70 @@ | ||
:host { | ||
@apply inline-flex outline-none; | ||
& a { | ||
@apply flex | ||
m-0 | ||
items-center | ||
justify-center | ||
cursor-pointer | ||
transition-default | ||
focus-base | ||
no-underline; | ||
border-block-end: 2px solid transparent; | ||
} | ||
& img { | ||
@apply flex h-7 m-0; | ||
} | ||
} | ||
|
||
a:hover, | ||
a:focus { | ||
@apply bg-foreground-2; | ||
} | ||
|
||
a:focus { | ||
@apply focus-inset; | ||
} | ||
|
||
a:active { | ||
@apply bg-foreground-3; | ||
} | ||
|
||
img { | ||
padding-inline: 1rem; | ||
} | ||
|
||
img ~ .container { | ||
@apply ps-0; | ||
} | ||
|
||
:host(:active) a { | ||
@apply text-color-1; | ||
} | ||
|
||
:host([active]) a { | ||
@apply text-color-1; | ||
border-color: var(--calcite-ui-brand); | ||
--calcite-ui-icon-color: var(--calcite-ui-brand); | ||
} | ||
|
||
.container { | ||
@apply flex | ||
flex-col | ||
truncate | ||
text-start; | ||
padding-inline: 1rem; | ||
} | ||
|
||
.heading { | ||
@apply text-0 | ||
ms-0 | ||
truncate | ||
text-color-1 | ||
font-medium; | ||
margin-block-start: 2px; | ||
} | ||
|
||
.description { | ||
@apply text-color-2 truncate; | ||
font-size: var(--calcite-font-size--1); | ||
} |
This file contains hidden or 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,48 @@ | ||
import { boolean, storyFilters } from "../../../.storybook/helpers"; | ||
import { placeholderImage } from "../../../.storybook/placeholderImage"; | ||
import readme from "./readme.md"; | ||
import { html } from "../../../support/formatting"; | ||
import { text } from "@storybook/addon-knobs"; | ||
|
||
export default { | ||
title: "Components/Navigation/Navigation Logo", | ||
parameters: { | ||
notes: readme | ||
}, | ||
...storyFilters() | ||
}; | ||
|
||
export const simple = (): string => | ||
html`<calcite-navigation-logo | ||
description="${text("description", "City of AcmeCo")}" | ||
heading="${text("heading", "ArcGIS Online")}" | ||
thumbnail="${placeholderImage({ width: 50, height: 50 })}" | ||
${boolean("active", false)} | ||
/>`; | ||
|
||
export const heading_TestOnly = (): string => html`<calcite-navigation-logo heading="ArcGIS Online" />`; | ||
|
||
export const description_TestOnly = (): string => | ||
html`<calcite-navigation-logo | ||
description="City of AcmeCo" | ||
thumbnail="${placeholderImage({ width: 50, height: 50 })}" | ||
/>`; | ||
|
||
export const thumbnail_TestOnly = (): string => | ||
html`<calcite-navigation-logo thumbnail="${placeholderImage({ width: 50, height: 50 })}" />`; | ||
|
||
export const headingAndThumbnail_TestOnly = (): string => html`<calcite-navigation-logo | ||
heading="ArcGIS Online" | ||
thumbnail="${placeholderImage({ width: 50, height: 50 })}" | ||
/>`; | ||
|
||
export const descriptionAndThumbnail_TestOnly = (): string => html`<calcite-navigation-logo | ||
description="City of AcmeCo" | ||
thumbnail="${placeholderImage({ width: 50, height: 50 })}" | ||
/>`; | ||
|
||
export const All_TestOnly = (): string => html`<calcite-navigation-logo | ||
heading="ArcGIS Online" | ||
description="City of AcmeCo" | ||
thumbnail="${placeholderImage({ width: 50, height: 50 })}" | ||
/>`; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This change is related to visual regression found while debugging navigation component.