Skip to content

Indicate to the user that a stash save is in progress #1702

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

Closed
wants to merge 3 commits into from

Conversation

nrempel
Copy link

@nrempel nrempel commented May 28, 2023

This Pull Request fixes #1495.

It changes the following:

  • Add AsyncStash
  • Updates StashMsgComponent to use AsyncStash instead of sync::Stash
  • Introduces disabled flag on TextInputComponent
  • Change StashMsgComponent title to "Stashing..." while stash is pending and disable input

I followed the checklist:

  • I added unittests
  • I ran make check without errors
  • I tested the overall application
  • I added an appropriate item to the changelog

@@ -419,7 +432,7 @@ impl Component for TextInputComponent {
}

fn event(&mut self, ev: &Event) -> Result<EventState> {
if self.visible {
if self.visible && !self.disabled {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is pretty invasive. why do we need that? the text input for the stashing can just close IMO and does not need to learn a new state of disabled. what is the rational?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

Without disabled, it's possible to type in the field while the operation is pending.

I suppose we could close the model and continue the operation in the background. In this case, is there a pattern for handling stashing errors if they occur?

Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah that's what I think we should do, what we do in other cases already. just close the text input popup regularly and then the new popup will block any other input and visualise that the stashing is in progress

Copy link
Collaborator

Choose a reason for hiding this comment

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

for error handling use try_or_popup and find other examples for it

Copy link
Author

Choose a reason for hiding this comment

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

Thanks, I'll make that change soon 👍🏻

@xcloudplatform

This comment was marked as off-topic.

@extrawurst
Copy link
Collaborator

@nrempel are you willing to finish this up?

@nrempel
Copy link
Author

nrempel commented Dec 15, 2023

Sorry, it's been a very busy year. I may have time to finish this over the holiday break. But I'll close this for now and revive it if needed.

@nrempel nrempel closed this Dec 15, 2023
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.

Add a visual cue to indicate that stashing is in progress
3 participants