Uh oh!
There was an error while loading. Please reload this page.
[Accounts] Use KDS Buttons - #3891
Conversation
d7e44a5 to
d76f6d3CompareUh oh!
There was an error while loading. Please reload this page.
d76f6d3 to
9920f1aCompare401dd6b to
295bde7Compare| </VBtn> | ||
| <KButton | ||
| primary | ||
| class="w-100" |
There was a problem hiding this comment.
Definitely nothing blocking and can also be a matter of personal style - if that'd be helpful in future work, when there is a one-line style, it may be simpler to use and read :style="{ width: '100%' }" rather than defining a new class which is quite commonly used syntax in LE's codebases.
MisRob
left a comment
There was a problem hiding this comment.
Thank you @AlexVelezLl, all is looking good to me and I also manually tested that I can use updated links and buttons as expected. Also thanks for the helpful description of the compatibility of the previous and new approach, it helped me to understand the decisions you made in the code.
bjester
commented
Apr 18, 2023
Thanks for reviewing this @MisRob ! |
Summary
Description of the change(s) you made
Use KDS KButton or KRouterLink components instead of Vuetify's VBtn in accounts app.
Manual verification steps performed
Screenshots
A couple of remarkable changes are the replacement of raised buttons for link buttons in favor of consistency with other sections (We could keep the raised buttons if it makes more sense):
References
Addresses #3148
Comments
A difference between using VBtn with KButton, is that in VBtn you can specify a
largebutton, which is not in KButton, so the buttons will look a bit smaller:Another difference is that
KButtondoes not support any prop to make the element Block instead of inline-block, so if we want the button to fill the full width we need to add classes to set the width: 100%.Pitfalls of replacing
ActionLinkwith KDS components:ActionLinkcomponent is that by default it has the:title=“text”attribute in the span element which is not in theKRouterLinkorKExternalLinkcomponent (which for example enables a native browser popup in Chrome), although we could pass the span with that attribute as slot if necessary.KRouterLinkdoes not support theopenInNewTabfunctionality, something we can have with theActionLinkcomponent in conjunction with the:toprop (InKExternalLinkit is supported but not inKRouterLink).ActionLinkprops that control thetruncateandnotranslateclasses are not supported in eitherKRouterLinkorKExternalLink, although they can be achieved by passing the span as slot.Contributor's Checklist
Studio-specifc:
notranslateclass been added to elements that shouldn't be translated by Google Chrome's automatic translation feature (e.g. icons, user-generated text)pages,components, andlayoutsdirectories as described in the docsTesting:
Reviewer's Checklist
This section is for reviewers to fill out.
yarnandpip)