Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Implemented: header minimal as a functional component(#592) #593

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added
- Added `VueObserveVisibility` and `VueLazyload` dependency
- Implemented: header minimal as a functional component(#592)

## [1.0.4] - 04.01.2020

Expand Down
8 changes: 5 additions & 3 deletions components/organisms/o-header-minimal.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<template>
<template functional>
<div class="o-header-minimal">
<ALogo />
</div>
</template>

<script>
import ALogo from 'theme/components/atoms/a-logo';
import Vue from 'vue'

Vue.component('ALogo', ALogo)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is o-header-minimal component used in more than 1 place? If no, it might be better to import and register ALogo component in the parent. Ofc, not register globally but in components section

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future we should use minimal header in checkout as well as an eCommerce best practice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, for now we can register the ALogo component in the Minimal layout.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future, we will handle the ALogo registration in all the components wherever the minimal header is used.
Also, if we are thinking of registering the SFUI library globally, then I think there will be no need to register the ALogo component even in the parent component.


export default {
name: 'OHeaderMinimal',
components: { ALogo }
name: 'OHeaderMinimal'
};
</script>

Expand Down