Skip to content
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

refactor: refactor code in Gcodefiles.vue #910

Merged
merged 16 commits into from
Jul 10, 2022

Conversation

dw-0
Copy link
Member

@dw-0 dw-0 commented Jun 16, 2022

This PR improves the overall code of the Gcodefiles.vue file.

  • img-tags were missing an alt attribute which the IDE complained with a warning about, they now have that attribute with a proper description
  • slot was marked as deprecated by the IDE on v-progress-circular and v-icon. referring to the vuetify docs, those elements don't have a slot atttribute. the vue-load-image component in turn requires those slots with specific names to function properly. the solution was to simply wrap divs with the proper slot attributes around v-progress-circular and v-icon
  • readability of the code regarding preheat() was improved. several conditions were considered as redundant. the control mixin was imported to make use of the doSend() method making the code even easier to read and maintain
  • weak IDE warnings of Argument type {filename: string, permissions: string, modified: Date} is not assignable to parameter type FileStateGcodefile were fixed with proper type definitions
  • the item object in contextMenu and dialogRenameFile was redefined as item: this.dialogFile. getting rid of the previously mentioned warnings and redundant code
  • making use of the disabled property of v-tooltip and checking for existence of a big thumbnail there helps us getting rid of duplicated template code

Signed-off-by: Dominik Willner th33xitus@gmail.com

dw-0 added 7 commits June 16, 2022 10:00
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
…IDE warnings

Signed-off-by: Dominik Willner <th33xitus@gmail.com>
removes redundant conditionals and simplifies the code

Signed-off-by: Dominik Willner <th33xitus@gmail.com>
`Argument type {filename: string, permissions: string, modified: Date} is not assignable to parameter type FileStateGcodefile`

Signed-off-by: Dominik Willner <th33xitus@gmail.com>
use an already declared interface as value instead of defining the full item object over again.

Signed-off-by: Dominik Willner <th33xitus@gmail.com>
use the `disabled` prop of v-tooltip to check for the existence of a big thumbnail

saves duplicated template code

Signed-off-by: Dominik Willner <th33xitus@gmail.com>
@dw-0 dw-0 changed the title chore(Gcodefiles.vue): improve code refactor: refactor code in Gcodefiles.vue Jul 2, 2022
@dw-0 dw-0 marked this pull request as ready for review July 2, 2022 18:14
@dw-0 dw-0 requested a review from meteyou July 2, 2022 18:14
@github-actions
Copy link
Contributor

github-actions bot commented Jul 3, 2022

Language file analysis report:

File Missing Keys Unused Keys

@dw-0 dw-0 force-pushed the tweak-gcodefiles branch 2 times, most recently from 22eb4d6 to 06d4f7b Compare July 3, 2022 08:59
dw-0 and others added 9 commits July 3, 2022 11:00
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
…iles getter

Signed-off-by: Stefan Dej <meteyou@gmail.com>
Signed-off-by: Stefan Dej <meteyou@gmail.com>
Signed-off-by: Stefan Dej <meteyou@gmail.com>
Signed-off-by: Stefan Dej <meteyou@gmail.com>
Signed-off-by: Stefan Dej <meteyou@gmail.com>
@meteyou meteyou merged commit d1c1b07 into mainsail-crew:develop Jul 10, 2022
@dw-0 dw-0 deleted the tweak-gcodefiles branch July 10, 2022 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants