-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update application header #211
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<script setup lang="ts"> | ||
import { ref } from 'vue'; | ||
import { useI18n } from 'vue-i18n'; | ||
import { useRouter } from 'vue-router'; | ||
|
||
import { Button, Menu } from '@/lib/primevue'; | ||
import { storeToRefs } from 'pinia'; | ||
import { useAuthNStore } from '@/store'; | ||
|
||
import { type Ref } from 'vue'; | ||
import { RouteName } from '@/utils/enums/application'; | ||
|
||
// Store | ||
const { getIsAuthenticated, getProfile } = storeToRefs(useAuthNStore()); | ||
|
||
// State | ||
const { t } = useI18n(); | ||
const items = ref([ | ||
{ | ||
label: t('headerMenu.logout'), | ||
icon: 'pi pi-sign-out', | ||
command: () => { | ||
router.push({ name: RouteName.OIDC_LOGOUT }); | ||
} | ||
} | ||
]); | ||
const menu: Ref<Menu | undefined> = ref(undefined); | ||
|
||
// Actions | ||
const router = useRouter(); | ||
|
||
const toggle = (event: any) => { | ||
menu.value?.toggle(event); | ||
}; | ||
</script> | ||
|
||
<template> | ||
<div | ||
v-if="getIsAuthenticated" | ||
class="card flex justify-content-center" | ||
> | ||
<Button | ||
id="menu-toggle" | ||
type="button" | ||
text | ||
class="font-bold text-lg" | ||
aria-haspopup="true" | ||
aria-controls="overlay-menu" | ||
@click="toggle" | ||
> | ||
{{ getProfile?.name }} | ||
<font-awesome-icon | ||
icon="fa-solid fa-bars" | ||
class="ml-2 app-primary-color no-click" | ||
/> | ||
</Button> | ||
<Menu | ||
id="overlay-menu" | ||
ref="menu" | ||
:model="items" | ||
:popup="true" | ||
/> | ||
</div> | ||
</template> | ||
|
||
<style lang="css" scoped> | ||
.no-click { | ||
pointer-events: none; | ||
} | ||
</style> |
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
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.
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.
It looks like the header height is noticeably larger than the GCPE style bars we see on the official site and Design Guide. Best I can find after some scanning is a
min-height: 65px
implicitly from their documentation example, but wasn't able to derive or find a canonical height measurement for the header element.Ref: https://designsystem.gov.bc.ca/react-components/?path=/docs/components-header-header--docs#controls
I am wondering if the p-2 and pb-0 classes are causing unintended side effects on the bar height. That being said, as there doesn't seem to be a formal prescription on what a header height should precisely be, @Subin1Doo would you be able to make a determination on what the PCNS' header height should be?
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.
it's set to 54px in the Figma's design guide document
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.
There doesn't seem to be a set standard. https://www2.gov.bc.ca/gov/content/home uses 60px for the logo so I'm going to conform to that.