Code Monkey home page Code Monkey logo

Comments (17)

larkin avatar larkin commented on August 26, 2024

Assigning to Victor, he will file a separate issue to design notifications around async operations and progress indicators, and he will implement this handling in different cases.

from openmct.

charlesh88 avatar charlesh88 commented on August 26, 2024

This need some UX design - Charles created issue #154.

from openmct.

VWoeltjen avatar VWoeltjen commented on August 26, 2024

Want to use infrastructure from #155 if possible, but that's a nice-to-have

from openmct.

larkin avatar larkin commented on August 26, 2024

Per tagup on 12/1/2015, narrow this down to complete in current sprint.

In persistence capability:

  • handle false return from persistence service as promise rejection.
  • throw global notification.

This leaves it open to implement per-action rejections at the persistence service so we have more information about errors and can provide errors that are more relevant to context. #58.

from openmct.

akhenry avatar akhenry commented on August 26, 2024

I require a little clarification here. So the persistence capability is (for now) going to produce a blocking message indicating that there was an error, and reject the promise? Or should it be a non-blocking notification?

At some later date this will be finessed by removing the global error message, and implementing function-specific error messages.

from openmct.

larkin avatar larkin commented on August 26, 2024

is blocking vs unblocking something that is non-trivial to change? Doesn't seem like it matters and ultimately it should be a tiny change to switch blocking to unblocking.

from openmct.

akhenry avatar akhenry commented on August 26, 2024

Yeah it's totally trivial. Just wanted to confirm the approach, and that it's in the persistence capability that I'll make the change, and not further downstream.

from openmct.

VWoeltjen avatar VWoeltjen commented on August 26, 2024

Yep, persistence capability is the right place for this (insofar as it covers a broad range of cases.)

I believe we said blocking on the call earlier, so let's go with that for now since it will be easy to change later.

from openmct.

akhenry avatar akhenry commented on August 26, 2024

So this ended up being a little more involved than I initially thought.

The persistence queue bundle has reasonably comprehensive persistence error reporting already. This takes the form of a blocking dialog that appears in most persistence failure modes (that I tried anyway), and not just in the case of conflicts. This actually appears after the PersistenceCapability is invoked so would result in duplication of dialogs if I were to implement a blocking dialog at that point. The existing functionality also provides the option to overwrite if the persistence error is due to a conflict in the remote store. As such, I'm reluctant at this point to remove this functionality. I also don't want to stick another blocking dialog in front of it. Moreover the CopyService has its own error handling using the DialogService.

As such, the approach I've gone for in the meantime is to implement failure messages as non-blocking notifications. This works alongside the existing blocking persistence notifications without being intrusive. It also provides error notification if queueing is disabled. If this approach sounds reasonable I'll add some unit tests and file a PR.

Longer term, there needs to be some reconciliation between the different approaches. If nothing else, the queueing errors need to look consistent with errors elsewhere. One option might be to integrate the newer notification options into the PersistenceFailureHandler. Another option is actually to refactor the PersistenceFailureHandler out of the queue bundle, and make it responsible for more generic persistence error handling, offering options such as overwrite, retry, etc.

from openmct.

larkin avatar larkin commented on August 26, 2024

I think we have an alternate issue for removing the persistence queue; I think the persistence service doing anything more than resolve/reject is out of scope. The service shouldn't have UI bindings.

I would expect individual operations to handle persistence failures differently as the failure of each user-action could potentially have different UX requirements, and each failure may require different clean up in the case of batch operations.

At baseline: implement support for individual failures (e.g. copy fail, save fail, link fail) instead of a global persistence failure handler. Once that is done, if we see a common pattern, then we support that, but from experience there isn't a global pattern that provides good UX without significant effort.

from openmct.

akhenry avatar akhenry commented on August 26, 2024

I agree that the persistence errors should be bubbled up so that context appropriate handling can take place. The generic persistence error handler is proposed as an alternative that integrates with and extends the current persistence queue error handling.

There may be a case for generic handling of certain types of errors, or for abstracting details of the underlying persistence store. If we want to give users the option to overwrite or discard conflicting modifications for example, implementing this separately for copy, save, link, etc. doesn't make much sense. But in any case, any generic handling should happen higher in the stack.

from openmct.

akhenry avatar akhenry commented on August 26, 2024

Have created #373 for addressing refactoring and reconciliation of differing approaches to persistence error notification.

from openmct.

RCarvalhoNASA avatar RCarvalhoNASA commented on August 26, 2024

Testathon 20151207 - So there is a series of errors that appear in the bottom bar, but to my mind, they are a bit too subtle (small and dark at the bottom instead of big and bright in the center). It still allows me to proceed around the tool even though the network is disconnected, and when I come back, that item still appears. I'm not sure what behaviour would be enough to really make me notice, and know that the work I've done is not going to survive me closing the browser, but this doesn't seem to be enough.

from openmct.

VWoeltjen avatar VWoeltjen commented on August 26, 2024

I believe that switching to a blocking dialog should be fairly easy here. Still not ideal UX, but ensures the necessary information gets conveyed; we can improve iteratively from there.

In nominal circumstances we don't expect to see these errors often (on console, connection to the server should be reliable; remotely, don't expect to create much) so this kind of messaging should not be practically disruptive

from openmct.

charlesh88 avatar charlesh88 commented on August 26, 2024

Testathon 20151207: Disconnected computer, tried to create an object. Notification appears, but once minimized overlay cannot be displayed while the system is disconnected. #383 filed to cover a fix to this behavior.

from openmct.

VWoeltjen avatar VWoeltjen commented on August 26, 2024

Quick fix for dialog not being available - prefetch all templates (e.g. during initialization of mct-include and mct-representation directives)

May need to prefetch earlier if this will compete with search indexing etc

from openmct.

VWoeltjen avatar VWoeltjen commented on August 26, 2024

Resolved by #388

from openmct.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.