After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 710271 - Show channels and logs when offline or disconnected
Show channels and logs when offline or disconnected
Status: RESOLVED FIXED
Product: polari
Classification: Applications
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Polari maintainers
Polari maintainers
Depends on:
Blocks:
 
 
Reported: 2013-10-16 13:38 UTC by Allan Day
Modified: 2013-12-12 12:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
room: Add account, channel-name and type properties (6.11 KB, patch)
2013-12-12 11:30 UTC, Florian Müllner
committed Details | Review
Use new PolariRoom properties (10.95 KB, patch)
2013-12-12 11:30 UTC, Florian Müllner
committed Details | Review
room: Stop using the channel's object path as ID (4.21 KB, patch)
2013-12-12 11:30 UTC, Florian Müllner
committed Details | Review
Guard against PolariRoom:channel getting set/unset (12.08 KB, patch)
2013-12-12 11:31 UTC, Florian Müllner
committed Details | Review
room: Reset :channel property when channel is invalidated (2.71 KB, patch)
2013-12-12 11:31 UTC, Florian Müllner
committed Details | Review
Make new Room properties the primary way to identify a room (5.48 KB, patch)
2013-12-12 11:31 UTC, Florian Müllner
committed Details | Review
chatroomManager: Stop tying rooms' lifecycle to their channels (6.80 KB, patch)
2013-12-12 11:31 UTC, Florian Müllner
committed Details | Review

Description Allan Day 2013-10-16 13:38:45 UTC
If polari isn't online or is in the process of connecting, you should still see the list of channels in the sidebar, and each channel should show the logs for recent conversations.

We'd need to make the chat entry field insensitive and indicate that the channel is offline - perhaps by changing the channel icon to user-offline-symbolic.
Comment 1 Florian Müllner 2013-12-12 11:30:48 UTC
Created attachment 264055 [details] [review]
room: Add account, channel-name and type properties

Currently the lifetime of a room is bound to the lifetime of the
corresponding channel. This will soon change, and we will create
a room as soon as the user requested it, and only destroy it when
it has been closed explicitly. To do that, we will need other
means to identify a room and associate it with the corresponding
channel, so add account, name and type properties for that purpose.
For now, those properties are read-only and derived from the channel,
but they will soon be used as the primary identifying properties.
Comment 2 Florian Müllner 2013-12-12 11:30:54 UTC
Created attachment 264056 [details] [review]
Use new PolariRoom properties

In preparation of supporting offline rooms, replace simple accesses
to PolariRoom:channel with the newly added :account, :type and
:channel-name properties.
Comment 3 Florian Müllner 2013-12-12 11:30:58 UTC
Created attachment 264057 [details] [review]
room: Stop using the channel's object path as ID

We will still need a unique ID at all times when supporting rooms
with no assiciated channel, so base the ID on the new :account,
:type and :channel-name properties instead.
Comment 4 Florian Müllner 2013-12-12 11:31:03 UTC
Created attachment 264058 [details] [review]
Guard against PolariRoom:channel getting set/unset

This cannot happen currently, as the lifecycle of Rooms is bound
to the corresponding channel, but this is about to change. So
adjust the code to not assume that any room has a valid channel
at any time, but update state appropriately as channels go away or
become available.
Comment 5 Florian Müllner 2013-12-12 11:31:09 UTC
Created attachment 264059 [details] [review]
room: Reset :channel property when channel is invalidated

We will soon stop to automatically destroying a room when the
associated channels is invalidated. In order to not require
users to check for the validity of :channel in addition to its
existance, just unset the property when the channel becomes
invalid.
Comment 6 Florian Müllner 2013-12-12 11:31:20 UTC
Created attachment 264060 [details] [review]
Make new Room properties the primary way to identify a room

Require :account, :channel-name and :type to be set at construction
time and ensure that they match the passed in channel when setting
the :channel property.
Comment 7 Florian Müllner 2013-12-12 11:31:27 UTC
Created attachment 264061 [details] [review]
chatroomManager: Stop tying rooms' lifecycle to their channels

Currently rooms are created and destroyed as the corresponding
channel becomes available or goes away. However this behavior
can result in the application appearing sluggish when the time
between user request and result takes too long, and it is plain
wrong when no user interaction at all is involved (for instance
when the network goes away). So instead, create rooms immediately
when requested by the user, and keep them around until removed
explicitly.
Comment 8 Florian Müllner 2013-12-12 11:32:02 UTC
Attachment 264055 [details] pushed as c58e60f - room: Add account, channel-name and type properties
Attachment 264056 [details] pushed as e890b32 - Use new PolariRoom properties
Attachment 264057 [details] pushed as 2f9f666 - room: Stop using the channel's object path as ID
Attachment 264058 [details] pushed as 17bd1ea - Guard against PolariRoom:channel getting set/unset
Attachment 264059 [details] pushed as 45f83ea - room: Reset :channel property when channel is invalidated
Attachment 264060 [details] pushed as f7e080f - Make new Room properties the primary way to identify a room
Attachment 264061 [details] pushed as f6b73e8 - chatroomManager: Stop tying rooms' lifecycle to their channels
Comment 9 Allan Day 2013-12-12 12:16:37 UTC
Fantastic! Thanks Florian; this looks like it was a fair amount of work.