-
Notifications
You must be signed in to change notification settings - Fork 11
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
Migrate existing buttons to vuetify #379
base: devel
Are you sure you want to change the base?
Migrate existing buttons to vuetify #379
Conversation
Co-authored-by gabrielademoraes <[email protected]>
Co-authored-by: guilhermesiqueira <[email protected]>
Hi @gabrielademoraes! Thanks for you contribution. That's quite a lot of changes here. There are many little things to address here, though. I've added some comments, but most of them are one of these categories:
Call me again once you fix this (or if you need help). |
First, thanks for the feedback but I still have some doubts... I'm having trouble to see the comments you added, so, could you give some examples, please ? |
@@ -44,7 +44,7 @@ | |||
<p class="text-danger" v-if="errors.has('form-register.password_confirmation')">{{ errors.first('form-register.password_confirmation') }}</p> | |||
</div> | |||
<div class="text-center"> | |||
<button type="submit" :disabled="disableRegisterButton()" class="btn btn-primary falko-button" id="">Register</button> | |||
<v-btn type="submit" :disabled="disableRegisterButton()" class="primary falko-button white--text" id="" color="#86B1B1">Register</v-btn> |
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.
It's not good to hardcode this color. Use variables instead.
type="button" | ||
class="primary falko-button white--text" | ||
id="addButton" | ||
color="#86B1B1" |
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.
Same here
v-bind:class="buttonClass()" | ||
v-bind:disabled="!this.isGitHubAuthenticated" | ||
v-on:click="getRepos()" | ||
v-bind:data-toggle="buttonDataToggle()" |
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.
Replace all this v-bing:something
to the short version :something
.
Ex:
:disabled="!this.isGitHubAuthenticated"
> | ||
Close | ||
</button> | ||
<v-btn type="button" :disabled="disableImportButton()" class="primary falko-button white--text" color="#86B1B1" v-on:click="importGithubProjects" data-dismiss="modal"> |
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.
Indent this block
<v-btn type="button" :disabled="disableImportButton()" class="primary falko-button white--text" color="#86B1B1" v-on:click="importGithubProjects" data-dismiss="modal"> | |
<v-btn | |
type="button" | |
:disabled="disableImportButton()" | |
class="primary falko-button white--text" | |
color="#86B1B1" | |
v-on:click="importGithubProjects" | |
data-dismiss="modal" | |
>``` |
<v-btn type="button" :disabled="disableImportButton()" class="primary falko-button white--text" color="#86B1B1" v-on:click="importGithubProjects" data-dismiss="modal"> | ||
Import | ||
</v-btn> | ||
<v-btn type="button" class="secondary falko-button white--text" color="#868e96" v-on:click="clean" data-dismiss="modal"> |
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.
Indent this too
src/components/Issues/AddIssue.vue
Outdated
@@ -1,19 +1,19 @@ | |||
<template> | |||
<div class=""> | |||
<div class="text-center"> | |||
<button type="button" class="btn btn-info btn-md falko-button" id="addButton" data-toggle="modal" data-target="#addIssueModal"> | |||
<v-btn type="button" class="info falko-button white--text" id="addButton" color="#86B1B1" data-toggle="modal" data-target="#addIssueModal"> |
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.
Don't hardcode colors
src/components/Issues/EditIssue.vue
Outdated
@@ -43,8 +43,9 @@ | |||
</div> | |||
</div> | |||
<div class="modal-footer"> | |||
<button type="button" :disabled="errors.has('name') || errors.has('body')" class="btn btn-info btn-md falko-button" v-on:click="editIssue(), setAssignees()" data-dismiss="modal">Save</button> | |||
<button type="button" class="btn btn-info btn-md falko-button-grey" data-dismiss="modal">Close</button> | |||
<v-btn type="button" :disabled="errors.has('name') || errors.has('body')" class="info btn-md falko-button" |
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.
Fix this indentation
@gabrielademoraes can you see them now? |
Yes... thanks! We will fix it as soon as possible! |
We guess all the changes you requested were done. |
@@ -115,4 +115,20 @@ export default { | |||
font-size: 14px; | |||
padding-top: 1px; | |||
} | |||
|
|||
.button-test { |
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.
Should this really be here?
font-weight: bold; | ||
} | ||
|
||
#closeButton { |
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.
The code for this id is basically the same of the id above it. If you want the same style in several places, create a css class and added it, instead of Ids.
color: #ffffff; | ||
} | ||
|
||
#loginButton { |
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.
I see that you repeated this css code in several places. You're still defining the button colors hardcoded, which is not good for maintainability.
Think about this scenario:
- You have repeated this hardcoded color through the whole code.
- Now you want to change the color of all buttons.
- You'll have to update EVERY css file to update the colors.
- This isn't a maintainable approach.
Let's think about this other scenario:
- You've defined a primary color on the Vuetify config file (you can find instructions here)
- You've used the class
primary
to set all the buttons to the primary color defined previously. Ex:
<v-btn color="primary">
...
</v-btn>
- Now you want to change the color of all buttons.
- The only thing you need to do is update the color in the Vuetify config file. Ex:
export default new Vuetify({
theme: {
themes: {
light: {
primary: colors.red, // A new color
},
},
},
No more hardcoded colors, @MatheusRich. We were able to encapsulate the entire application with Vuetify and now it was possible to use "tags" to the colors. |
Proposed Changes
It was done the migration of the accessible buttons to vuetify. #376
Type of Changes
What type of change this Pull Request brings to Falko?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. If you're confused about any of the following topics, ask us. We're here to help you!