Enhance CustomInfoBar to display messages from each backend in threading
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GTG |
Won't Fix
|
Low
|
Chenxiong Qi |
Bug Description
During the development of Bugzilla synchronization service, I have to display various messages to tell user what reason a bug link cannot be converted to a real bug. Due to the conversation happens in a separate thread, subsequent messages could be shown before user clicks the Ok button to close info bar. Thus, the implementation of CustomInfoBar faces a new situation. The shown of subsequent message will overwrite the UI elements for previous message, but they are not released as normal. Obviously, other backends may also work in a same way with Bugzilla sync service.
I propose this solution is to handle the situation. New CustomInfoBar has no changes to its API, but supports display messages one by one. Two user stories to describe the solution,
1. when a message coming from a backend to tell user some important things, just show the message in info bar. The previous message with all response buttons if exists will hide.
2. user reads the message and then wants to close the bar, after clicking response button, the whole area of the bar will disappear and previous one appears.
So far, no changes and improvement of the UE emerges in my mind, actually I'm not good at that design. This proposal is just based on current InfoBar behavior.
Related branches
Changed in gtg: | |
assignee: | nobody → Chenxiong Qi (qcxhome) |
Changed in gtg: | |
status: | Triaged → Won't Fix |
Datastore implements backend mutex so that modifying a task by multiple backends can be avoided at same time.
You can try implementing a similar mutex for infobar messages. get_backend_ mutex() : ), it'll also have to get a lock on infobar.
Just like each backend has to get the lock first to edit tasks( with self.datastore.
Subsequent messages will be queued, and when the user closes the bar for one message, the remaining ones will be shown one by one.