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

fix: Allow cancelling updates in manage page #1536

Merged
merged 9 commits into from
Dec 30, 2023

Conversation

codinesh
Copy link
Contributor

Fixes #1533 by adding a Cancel button next to 'Update All' in manage page.

Cancel button is disabled by default, when no updates are not initialized.
image

Once update all is triggered and in progress, Cancel button will be enabled, and will stop the updates on click.
image

Hello @anasereijo, I couldn't find the link to Figma, to make the button width match with designs. Will be happy to take that change, please help me with Figma link and access.

@codinesh
Copy link
Contributor Author

Hello @BLKKKBVSIK, can you please review this as well, when you get chance. Thanks.

@codinesh
Copy link
Contributor Author

@spydon, @BLKKKBVSIK please review this when you get time..

@spydon spydon changed the title Code changes to allow cancelling updates in manage page fix: Allow cancelling updates in manage page Dec 28, 2023
Copy link
Collaborator

@spydon spydon left a comment

Choose a reason for hiding this comment

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

Not sure why the mocks are failing, can you try running melos generate?

Comment on lines 309 to 311
onPressed: updatesModel.refreshableSnapNames.isNotEmpty &&
!updatesModel.state.isLoading &&
updatesModel.activeChangeId != null
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would move this out to a variable with a good name so that the code gets more readability

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for suggestion, made the change to extract a variable.

Ran melos generate, and it fixed the missing mock definition. Thanks.

packages/app_center/lib/src/snapd/updates_model.dart Outdated Show resolved Hide resolved
@BLKKKBVSIK
Copy link
Collaborator

Few tests aren't passing, once this will be resolved, LGTM

@codinesh
Copy link
Contributor Author

Few tests aren't passing, once this will be resolved, LGTM

@BLKKKBVSIK, thanks for review, fixed the tests now. Please have a look when you get chance.

@codinesh codinesh requested a review from spydon December 29, 2023 18:21
Copy link
Collaborator

@spydon spydon left a comment

Choose a reason for hiding this comment

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

Lgtm!

@codinesh
Copy link
Contributor Author

Lgtm!

thanks for review @spydon.

@BLKKKBVSIK please let me know if there is any thing I can do for this PR to be merged..

@BLKKKBVSIK BLKKKBVSIK merged commit 4a14e5a into ubuntu:main Dec 30, 2023
8 checks passed
@codinesh codinesh deleted the managepage-cancel-updates branch December 30, 2023 13:16
@anasereijo
Copy link
Collaborator

Hey @codinesh thanks for working on this 🙌

One thing to amend is that the cancel button should be hidden until the 'Update all' is trigged, as it can be misleading for the users to have a cancel button without context.

Hello @anasereijo, I couldn't find the link to Figma, to make the button width match with designs.

The width of the button is dependent on the text length, with a padding of 16px on both sides. Not 100% if this is what we have on Yaru, so please double-check.

Cheers!

@codinesh
Copy link
Contributor Author

codinesh commented Jan 2, 2024

One thing to amend is that the cancel button should be hidden until the 'Update all' is trigged, as it can be misleading for the users to have a cancel button without context.

Hello @anasereijo, Thanks for suggestions, I will take up the change to hide Cancel button while not processing updates.

ashuntu pushed a commit to ashuntu/app-center that referenced this pull request Feb 28, 2024
fix: Allow cancelling updates in manage page
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.

manage: users can't cancel updates
4 participants