[Accounts] Use KDS Buttons#3891
Merged
bjester merged 2 commits intolearningequality:unstablefrom Apr 18, 2023
Merged
Conversation
d7e44a5 to
d76f6d3
Compare
AlexVelezLl
commented
Dec 19, 2022
contentcuration/contentcuration/frontend/accounts/pages/accountDeleted/AccountDeleted.vue
Show resolved
Hide resolved
d76f6d3 to
9920f1a
Compare
401dd6b to
295bde7
Compare
MisRob
reviewed
Apr 18, 2023
| </VBtn> | ||
| <KButton | ||
| primary | ||
| class="w-100" |
Member
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
approved these changes
Apr 18, 2023
Member
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.
Member
|
Thanks for reviewing this @MisRob ! |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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)