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

Save data notifications vanish too quickly #5725

Closed
tillsanders opened this issue Feb 28, 2023 · 6 comments
Closed

Save data notifications vanish too quickly #5725

tillsanders opened this issue Feb 28, 2023 · 6 comments
Labels

Comments

@tillsanders
Copy link

Usability bug

Recently, #5530 improved the saving notifications. This is already a lot better than before. The messages are disappearing too quickly, however.

What is the current behavior?

When completing a survey, I have access to the callbacks showDataSaving(), showDataSavingSuccess() and showDataSavingError(), like this:

survey.onComplete.add(function ({ data }, { showDataSaving, showDataSavingError, showDataSavingSuccess }) {
    showDataSaving();
    if (!doingStuff()) {
        showDataSavingError();
        return;
    }
    showDataSavingSuccess();
});

This will display notifications accordingly, at the bottom of the screen. The notifications disappear after about three seconds. The error notification contains a button that can retry sending the survey.

What is the expected behavior?

  • The notifications should stay longer.
  • The error notification should not disappear automatically at all since it is the only way to re-submit the survey!

Specify your

  • browser: Chrome (macOS)
  • browser version: 110
  • surveyjs platform: jquery
  • surveyjs version: 1.9.76
@JaneSjs JaneSjs self-assigned this Mar 3, 2023
@JaneSjs
Copy link
Contributor

JaneSjs commented Mar 3, 2023

[Updated]

Hello,
Thank you for input. Your suggestions definitely make sense. I will discuss them with the team and get back to you shortly.

@JaneSjs
Copy link
Contributor

JaneSjs commented Mar 14, 2023

Hello @tillsanders,
Thank you for your patience. I discussed this with the team.

  • The notifications should stay longer.

You can specify the Survey.settings.notifications.lifetime property to increase the notification delay. By default, it is set to 2 seconds. For example, you can set to to 10 seconds using the following code:

Survey.settings.notifications.lifetime = 10000;
  • The error notification should not disappear automatically at all since it is the only way to re-submit the survey!

We agreed that error notification should not disappear, because it contains a user action. I created a separate issue in this regard.
#5768

Thank you

@JaneSjs JaneSjs closed this as completed Mar 14, 2023
@JaneSjs JaneSjs added question and removed bug labels Mar 14, 2023
@JaneSjs JaneSjs removed this from the v1.9.78 milestone Mar 14, 2023
OlgaLarina pushed a commit that referenced this issue Mar 14, 2023
tsv2013 pushed a commit that referenced this issue Mar 16, 2023
… automatically (#5773)

* resolve #5725 Save Data Notifications - The Error notification should not disappear automatically

* work for #5768

---------

Co-authored-by: OlgaLarina <olga.larina.dev@gmail.com>
OlgaLarina pushed a commit that referenced this issue Mar 17, 2023
OlgaLarina pushed a commit that referenced this issue Mar 17, 2023
novikov82 pushed a commit that referenced this issue Mar 18, 2023
Co-authored-by: OlgaLarina <olga.larina.dev@gmail.com>
OlgaLarina pushed a commit that referenced this issue Mar 20, 2023
novikov82 pushed a commit that referenced this issue Mar 20, 2023
* work for #5725

* work for #5725

---------

Co-authored-by: OlgaLarina <olga.larina.dev@gmail.com>
@CmdrBeavis
Copy link

Oh what I wouldn't give right now for the documentation of that onComplete.add() function / method! I've searched all over the place, and still no joy. : (

My linter is DEMANDING to know the Type of the options argument. Currently I just get "'options' is of type 'unknown'"

@andrewtelnov
Copy link
Member

@CmdrBeavis What framework do you use?
onComplete event has options with CompleteEvent type.
Here is survey.onComplete event documentation.

Thank you,
Andrew

@CmdrBeavis
Copy link

CmdrBeavis commented Jun 21, 2023 via email

@CmdrBeavis
Copy link

Not sure how to find it, so I'll ask; is there a way to control the display and behavior of that "Try Again" button you get when you call the showDataSavingError() options function?

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

No branches or pull requests

5 participants