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

MEN-7068: add spinner for "Waiting for device" button #4383

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mineralsfree
Copy link
Collaborator

Screencast.from.2024-04-30.14-18-42.mp4

Ticket: MEN-7068
Changelog: None

@mender-test-bot
Copy link
Contributor

@mineralsfree, Let me know if you want to start the integration pipeline by mentioning me and the command "start pipeline".


my commands and options

You can trigger a pipeline on multiple prs with:

  • mentioning me and start pipeline --pr mender/127 --pr mender-connect/255

You can start a fast pipeline, disabling full integration tests with:

  • mentioning me and start pipeline --fast

You can trigger GitHub->GitLab branch sync with:

  • mentioning me and sync

You can cherry pick to a given branch or branches with:

  • mentioning me and:
 cherry-pick to:
 * 1.0.x
 * 2.0.x

@@ -174,8 +175,9 @@ export const DeviceConnectionDialog = ({ onCancel }) => {
Next
</Button>
) : (
<Button variant="contained" disabled={!onboardingComplete} onClick={onCancel}>
<Button variant="contained" disabled={!onboardingComplete} onClick={onCancel} style={{ height: '37px' }}>
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you need custom height here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

otherwise the loader increases default button height, so we want to force it

Comment on lines 178 to 180
<Button variant="contained" disabled={!onboardingComplete} onClick={onCancel} style={{ height: '37px' }}>
{onboardingComplete ? 'Close' : 'Waiting for device'}
<Loader show={!onboardingComplete} small style={{ marginTop: '-5px' }} />
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<Button variant="contained" disabled={!onboardingComplete} onClick={onCancel} style={{ height: '37px' }}>
{onboardingComplete ? 'Close' : 'Waiting for device'}
<Loader show={!onboardingComplete} small style={{ marginTop: '-5px' }} />
<Button variant="contained" disabled={!onboardingComplete} onClick={onCancel} endIcon={!onboardingComplete && <Loader show small table style={{ top: -24 }} />}>
{onboardingComplete ? 'Close' : 'Waiting for device'}

with the 24px resetting the top: -5px from the loader container and making room for the margin-top: 24px from the loader itself

Ticket: MEN-7068
Changelog: None

Signed-off-by: Mikita Pilinka <mikita.pilinka@northern.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants