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

Added Profile selection and a Standby Clock #1829

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

makers-cave
Copy link

Discard the previous pull requests. rebased the source with v2.2.0 and merged my changes

@makers-cave
Copy link
Author

The Pull Request contains a new profile selections screen. Users can click the printer name and available profiles, created in OctoPi will be populated. Users can click on profile and hit the select button to switch the profile. The action will disconnect the current connection and re-connect with a new profile. A check is made for an ideal printer i.e. the profile selection screen will only populate when the printer is not doing any print job.

A clock is added to the stand-by screen with some animation to save the screen.

@UnchartedBull
Copy link
Owner

I'll have a look at this soon :) Thanks for rebasing!

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.

Thanks for the PR. There are some major changes that need to be addressed before this can be merged. The three main things are:

  • Duplicate css code
  • Please try adhering to the TypeScript Style Guide: https://google.github.io/styleguide/tsguide.html (or use Prettier to format your code)
  • No screenshots attached. If you create a UI PR please attach them to make the review easier

I haven't run the code yet, so I can't comment on the UI and the current remarks are just from a quick brushover. Once those have been addressed we can do a full review and after that this can be merged.

Thank you for your contribution! In the future please separate different features into different Pull Requests though, this makes the review process a lot faster & easier :)

<img src="assets/fr.svg" class="level_icon" />
</div>
</div>
<span class="homing-text" *ngIf="isHomingNeeded">Homing is needed before starting leveling.</span>
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="homing-text" *ngIf="isHomingNeeded">Homing is needed before starting leveling.</span>
<span class="homing-text" *ngIf="isHomingNeeded">Homing is necessary before leveling.</span>

What do you think about this?

width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.85);
// backdrop-filter: blur(8px);
Copy link
Owner

Choose a reason for hiding this comment

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

please remove comment

Comment on lines +56 to +61
&__sub-heading {
font-size: 2.3vw;
font-weight: 500;
padding: 2vh 0 1vh;
}

Copy link
Owner

Choose a reason for hiding this comment

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

please remove all classes that aren't used in bed-leveling.component.html from this file.

Comment on lines +13 to +17
public fadeOutAnimation = false;
public isHomingNeeded = true;
private currentProfile: PrinterProfile;
private axisOffset: number = 15;
@Output() closeFunction = new EventEmitter<void>();
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
public fadeOutAnimation = false;
public isHomingNeeded = true;
private currentProfile: PrinterProfile;
private axisOffset: number = 15;
@Output() closeFunction = new EventEmitter<void>();
public fadeOutAnimation = false;
public isHomingNeeded = true;
private currentProfile: PrinterProfile;
private axisOffset: number = 15;
@Output() closeFunction = new EventEmitter<void>();

Copy link
Owner

Choose a reason for hiding this comment

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

axisOffset also should be configurable. But i can do that if you like.

Comment on lines +19 to +26
profileService.getProfiles().subscribe((profiles) =>{
for( let profile of profiles){
if (profile.current) {
this.currentProfile = profile;
break;
}
};
});
Copy link
Owner

Choose a reason for hiding this comment

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

This should be part of ngOnInit rather than the constructor

@@ -111,3 +133,131 @@ app-custom-actions {
opacity: 1;
}
}

@import url("https://fonts.googleapis.com/css?family=Exo:400,700");
Copy link
Owner

Choose a reason for hiding this comment

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

Do we really need another font here?

@@ -17,13 +17,37 @@ export class StandbyComponent implements OnInit, OnDestroy {
public showConnectionError = false;
private displaySleepTimeout: ReturnType<typeof setTimeout>;
private connectErrorTimeout: ReturnType<typeof setTimeout>;

title = 'clock-greets';
Copy link
Owner

Choose a reason for hiding this comment

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

this isn't used anywhere

Comment on lines +21 to +23
time;
hours;
msg;
Copy link
Owner

Choose a reason for hiding this comment

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

please add access modifiers and type here

Comment on lines +30 to +33
setInterval(() => {
this.time = new Date();
this.decide();
}, 1000);
Copy link
Owner

Choose a reason for hiding this comment

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

this interval is never cancelled and 10s timeout probably will be sufficient.

Comment on lines +1 to +4
<svg viewBox="0 0 100 100" y="0" x="0" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path stroke-miterlimit="10" stroke-width="3.5" stroke="#f5f6fa" fill="none" d="M84.84 90H15.16A5.16 5.16 0 0 1 10 84.84V15.16A5.16 5.16 0 0 1 15.16 10h69.68A5.16 5.16 0 0 1 90 15.16v69.68A5.16 5.16 0 0 1 84.84 90z" style="stroke:#f5f6fa" ></path>
<circle fill="#f5f6fa" r="8.504" cy="67.006" cx="32.992" style="fill:#f5f6fa;animation-play-state:paused" ></circle>
</svg>
Copy link
Owner

Choose a reason for hiding this comment

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

Did you create those icons yourself? If not please make sure to link them according to the LICENSE.

@stale
Copy link

stale bot commented Jun 9, 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 Jun 9, 2021
@UnchartedBull UnchartedBull added enhancement New feature or request and removed stale Stale issue labels Jun 9, 2021
@UnchartedBull
Copy link
Owner

Hi!

I don't want to pressure you into anything, just curious, whether you want to continue working on this PR? If not I would take this over and pull a few features into main in separate PRs. Just let me know if you aren't fine with that.

Thanks!

@makers-cave
Copy link
Author

makers-cave commented Jun 9, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants