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

Display print success #2084

Merged
merged 28 commits into from
Aug 29, 2021

Conversation

Seculo9112
Copy link
Contributor

@Seculo9112 Seculo9112 commented Jul 23, 2021

Displays print success or thumbnail in file menu

Closes #1339.

@jneilliii
Copy link
Contributor

@UnchartedBull sorry for the manual build action slipping in on this PR. You might find it useful, I use it to make the deb files since electron complains about packaging on my windows. It builds, packages, and uploads as an artifact to the action run.

Copy link
Owner

@UnchartedBull UnchartedBull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR looks good, just some minor adjustments. Please also remove the .vs folder and all it's contents from this PR (feel free to add it to the .gitignore if you want to keep them locally).

Also do the included svg icons get used at all? As far as I can see they're not used anymore, but you're now using fontawesome (really nice btw.).

And I guess the last thing: If you want to create future PRs (especially for UI stuff) it would be super neat to include a screenshot if possible, as this makes reviewing a lot easier.

Once again thanks for your contribution! Once the few remarks have been addressed this can be merged and included in the next release:`)

@@ -68,7 +68,13 @@
[matRippleUnbounded]="false"
class="files__object"
>
<img src="assets/object.svg" class="files__icon" />
<div class="files__icon_wrapper {{file.successfull}}">
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use ngClass for the file.successfull? https://angular.io/api/common/NgClass

[icon]="['fas', file.successfullIcon]"
class="custom-actions__action-icon"
></fa-icon>
<img src={{file.thumbnail}} class="files__icon" />
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<img src={{file.thumbnail}} class="files__icon" />
<img [src]="file.thumbnail" class="files__icon" />

@@ -78,7 +84,7 @@
{{ file.printTime }}<span class="files__info-unit" i18n="@@files-h">h</span>
</span>
</div>
<span class="files__name">
<span class="files__name" >
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<span class="files__name" >
<span class="files__name">

Comment on lines 63 to 71
successfull: fileOrFolder.prints != null ? fileOrFolder.prints.last.success ? 'files__object_success' : 'files__object_failed' : 'files__object_unknown',
successfullIcon: fileOrFolder.prints != null ? fileOrFolder.prints.last.success ? 'check-circle' : 'minus-circle' : 'circle',
thumbnail: fileOrFolder.thumbnail ? this.configService.getApiURL(fileOrFolder.thumbnail, false) : 'assets/object.svg',
printTime: this.conversionService.convertSecondsToHours(
fileOrFolder.gcodeAnalysis.estimatedPrintTime,
),
filamentWeight: this.conversionService.convertFilamentLengthToWeight(
_.sumBy(_.values(fileOrFolder.gcodeAnalysis.filament), tool => tool.length),
),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to be indented one tab less.

@UnchartedBull
Copy link
Owner

@jneilliii the manual build file is actually a nice addition! Thanks for including that!

@UnchartedBull UnchartedBull added this to the v2.3.0 milestone Jul 28, 2021
@jneilliii
Copy link
Contributor

@UnchartedBull I think this one is good to go now with requested changes.

image

@UnchartedBull
Copy link
Owner

Ok pipeline is green now and code looks good as well, so this can be merged.

I did some experimenting and I kinda like the coloured bars on the left side (similar to how notifications look like). I don't want to hijack anything here, but I thought, that it might be a good idea to post this here for discussion. Please let me know what you think. I have the version with the bars ready on my local dev system, so there won't be any coding effort difference between the two of them.

Screenshot 2021-08-11 at 13 11 27

@UnchartedBull UnchartedBull dismissed their stale review August 11, 2021 11:15

code looks good now

@jneilliii
Copy link
Contributor

jneilliii commented Aug 11, 2021

I've experienced this issue before from an accessibility stand point @UnchartedBull color alone is not good enough for those people that have color blindness, specifically red/green. I personally would say to stick with the icons, but this is your project and totally up to you.

@Seculo9112
Copy link
Contributor Author

Seculo9112 commented Aug 11, 2021 via email

@UnchartedBull
Copy link
Owner

Yeah color blindness is a good point. The main issue i see with the icons is that they could be hard to see on smaller screens (3.5"). I think the bars would be easier in that case.

I'd like to go with the color bars for now and if any issues occur switch back to the icons (good thing, that git keeps all the history :D). Thanks for your contribution once again! This will be released with the next release.

@jneilliii
Copy link
Contributor

Maybe if it were a configurable option between the two? I know from the discussion on Discord, one of the users that was involved does have color blindness.

@stale
Copy link

stale bot commented Aug 28, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Stale issue label Aug 28, 2021
@UnchartedBull UnchartedBull merged commit 7739806 into UnchartedBull:main Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Marking of files
4 participants