-
Notifications
You must be signed in to change notification settings - Fork 83
Implemented: header minimal as a functional component(#592) #593
base: develop
Are you sure you want to change the base?
Implemented: header minimal as a functional component(#592) #593
Conversation
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.
Changes looks good to me, @Fifciu can you check once.
<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) |
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.
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
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.
In the future we should use minimal header in checkout as well as an eCommerce best practice.
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.
Ok, for now we can register the ALogo
component in the Minimal
layout.
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.
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.
Related Issues
The header-minimal has no state management required so we define it as a functional component in place of it.
Closes #592
Short Description and Why It's Useful
Screenshots of Visual Changes before/after (If There Are Any)
IMPORTANT NOTICE - Remember to update
CHANGELOG.md
with description of your changeContribution and Currently Important Rules Acceptance