-
Notifications
You must be signed in to change notification settings - Fork 270
[Remove Vuetify from Studio] Informative pages in Accounts #5635
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
base: unstable
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| <template> | ||
|
|
||
| <div class="message-layout-wrapper"> | ||
| <StudioPage | ||
| :centered="true" | ||
| :marginTop="0" | ||
| > | ||
| <div class="message-layout-content"> | ||
| <h1 class="message-header"> | ||
| {{ header }} | ||
| </h1> | ||
| <p | ||
| v-if="text" | ||
| class="message-text" | ||
| > | ||
| {{ text }} | ||
| </p> | ||
| <div class="message-slot-container"> | ||
| <slot></slot> | ||
| </div> | ||
| <div class="link-container"> | ||
| <slot name="back"> | ||
| <KRouterLink | ||
| :to="{ name: 'Main' }" | ||
| :text="$tr('backToLogin')" | ||
| :appearance="basic - link" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. blocking: Invalid attribute syntax - Should be: appearance="basic-link"(No colon, plain string attribute)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @rtibbles, I understood what you mentioned. I was facing an issue where binding the value as a string causes the link to appear covered with the link color. I tried removing the appearance prop since This has been confusing, as the issue only appears when using
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting - I'm not seeing anything in the styles for your new component that would cause this - if you inspect the link itself, and look at the CSS inspector, are you able to see where this background colour is coming from?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hey @rtibbles , After spending some time debugging this is the conclusion that I came to regarding the issue. Why this happens: Why this issue was not experienced before:
I may be missing something. If you also think this is an issue, I do have an approach in mind that i'd like to share.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you look at the KRouterLink documentation page, you can see that when it is rendered as a basic-link, it does not have this styling: https://design-system.learningequality.org/krouterlink something is going awry if this is the case.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Oh yes, my earlier conclusion about it being primarily caused by I now suspect the issue is on the Studio side, as @MisRob also mentioned that this can happen in some cases. One fix I found that seems like a win-win and does not affect behavior is to add
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@rtibbles like you suggested, while inspecting the CSS I noticed that Vue Router automatically adds classes such as
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for looking into it more @AadarshM07. It sounds that the KDS adjustments you found out supports hypothesis that it may be a Vuetify style that's causing the problem, but we don't yet know how exactly what's happening on Studio side right? With my suggestion I meant if you could track the root cause in Studio (and post reference to related styles). Then the decision on how to proceed will be clearer (adjusting KDS is possible in some cases, but doing so prematurely would lead to adding style that, after Vuetify is removed, wouldn't be needed).
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And the screenshot is good information - it's just not clear to me where those styles are coming from exactly in the codebase - and that's what I'm trying to get at.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @MisRob , Thanks for the input, I understood the mission. Also, I have an event over the next two days, so I may be a bit slow to respond, but I will look into this and update you right after |
||
| /> | ||
| </slot> | ||
| </div> | ||
| </div> | ||
| </StudioPage> | ||
| </div> | ||
|
|
||
| </template> | ||
|
|
||
|
|
||
| <script> | ||
| import StudioPage from '../../shared/views/StudioPage'; | ||
| export default { | ||
| name: 'StudioMessageLayout', | ||
| components: { | ||
| StudioPage, | ||
| }, | ||
| props: { | ||
| header: { | ||
| type: String, | ||
| required: true, | ||
| }, | ||
| text: { | ||
| type: String, | ||
| required: false, | ||
| default: '', | ||
| }, | ||
| }, | ||
| $trs: { | ||
| backToLogin: 'Continue to sign-in page', | ||
| }, | ||
| }; | ||
| </script> | ||
|
|
||
|
|
||
| <style scoped> | ||
| .message-layout-wrapper { | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| min-height: 100vh; | ||
| } | ||
| .message-layout-content { | ||
| display: flex; | ||
| flex-direction: column; | ||
| max-width: 900px; | ||
| padding-top: 80px; | ||
| padding-bottom: 48px; | ||
| text-align: center; | ||
| } | ||
| .message-header { | ||
| margin-bottom: 6px; | ||
| font-size: 24px; | ||
| font-weight: bold; | ||
| } | ||
| .message-text { | ||
| margin-top: 4px; | ||
| margin-bottom: 20px; | ||
| font-size: 16px; | ||
| } | ||
| .message-slot-container { | ||
| max-width: 400px; | ||
| margin: 24px auto 0; | ||
| text-align: center; | ||
| } | ||
| .link-container { | ||
| margin-top: 24px; | ||
| } | ||
| </style> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| <template> | ||
|
|
||
| <MessageLayout :header="$tr('accountDeletedTitle')"> | ||
| <StudioMessageLayout :header="$tr('accountDeletedTitle')"> | ||
| <template #back> | ||
| <KRouterLink | ||
| :to="{ name: 'Main' }" | ||
|
|
@@ -9,19 +9,19 @@ | |
| appearance="raised-button" | ||
| /> | ||
| </template> | ||
| </MessageLayout> | ||
| </StudioMessageLayout> | ||
|
|
||
| </template> | ||
|
|
||
|
|
||
| <script> | ||
| import MessageLayout from '../../components/MessageLayout'; | ||
| import StudioMessageLayout from '../../components/MessageLayout'; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. blocking: Wrong import path - this still imports from Should be: import StudioMessageLayout from '../../components/StudioMessageLayout';This defeats the purpose of this PR for
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry about that, my mistake |
||
| export default { | ||
| name: 'AccountDeleted', | ||
| components: { | ||
| MessageLayout, | ||
| StudioMessageLayout, | ||
| }, | ||
| $trs: { | ||
| accountDeletedTitle: 'Account successfully deleted', | ||
|
|
||



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.
blocking: The acceptance criteria in issue #5631 state:
This new component has no unit tests. Consider adding tests for:
headerproptextpropbackslot overrideThere 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.
Thanks for the input, I will work on this 👍