Ticket #1020 (closed enhancement: fixed)
HumanizedMessage -functionality
| Reported by: | Marc Englund | Owned by: | Marc Englund |
|---|---|---|---|
| Priority: | major | Milestone: | 5.0.0-beta-phase2 (release candidate) |
| Component: | Server-side framework | Version: | |
| Keywords: | message,tooltip,humanized,notification | Cc: | |
| Known Issue description: | |||
| Hours estimate: | Deadline (dd.mm.yyyy): | ||
| Known Issue version (since): | Known Issue title: | ||
| Hours done: | Depends to: | ||
| Affects documentation: | no | ||
| Known Issue workaround: | |||
| Affects release notes: | yes | Contract: | |
Description
We _really_ want humanized messages for notifications ("Your stuff has been saved", "Knurflat deleted"). (demo)
In practice the natural place to implement this would be in Window, which actually has two possible - mainly unused - candidates in the API: setDescription() and setComponentError().
Component error would be the perfect match, but there are some issues: this is not an error. But ErrorMessage? also contains an INFO error level, which is usually not an error, indicating that the ComponentError/ErrorMessage? is poorly named.
Otherwise ErrorMessage? could be a match: we have UserMessage? already, we could implement a HumanizedMessage? that would extend UserMessage? to indicate that the message should dissappear humanely - in the future all components could support this.
Solution
- implement HumanizedMessage? extends UserMessage? + setDelay()
- implement in IWindow
- at some point, implement in other components
Really consider:
- rename API, e.g Error -> Message(/Notification)? setComponentMessage(Message msg)
Problems
- Humanized messages should dissappear automatically, should probably do so serverside as well (too sticky error messages general problem in TK)?
- Many simultanious messges should be shown in the same notification - but should the programmer be responsible for compositing (automatic would be better, but how)?
