Commit Graph

61 Commits

Author SHA1 Message Date
Florian Müllner
033277b68f Define externally accessible contants with 'var' instead of 'const'
Just as we did with classes, define other constants that are (or
may be) used from other modules with 'var' to cut down on warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=785084
2017-07-18 21:52:06 +02:00
Florian Müllner
2582d16ca7 Define classes with 'var' instead of 'const'
Any symbols (including class properties) that should be visible
outside the module it's defined in need to be defined as global.
For now gjs still allows the access for 'const', but get rid of
the warnings spill now by changing it.

https://bugzilla.gnome.org/show_bug.cgi?id=785084
2017-07-18 21:52:06 +02:00
Florian Müllner
358133e82f Initialize properties in _init()
While we've always considered it good style to initialize JS properties,
some code that relies on uninitialized properties having an implicit
value of 'undefined' has slipped in over time. The updated SpiderMonkey
version used by gjs now warns when accessing those properties, so we
should make sure that they are properly initialized to avoid log spam,
even though all warnings addressed here occur in conditionals that
produce the correct result with 'undefined'.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2017-07-13 17:23:54 +02:00
Florian Müllner
d3c050b88d Refine notification style
Update the notification style according to the latest mockups:
 - make notification icons smaller and prefer symbolic variants
 - remove background box when not hovered/focused
 - increase spacing between elements
 - use normal text sizes

https://bugzilla.gnome.org/show_bug.cgi?id=775763
2017-03-01 10:55:42 +01:00
Florian Müllner
c4f2bb5fe0 messageList: Keep secondary actor when showing close button
Currently the secondary actor (if set) and the close button are
exclusive, that is the latter replaces the former on hover. As
the swapping feels rather busy and there's no real reason both
cannot be shown at the same time, keep the secondary actor always
visible.
A welcome side effect is that it no longer needs to be placed at
the end, so we can move the notification timestamp right next to
the corresponding title.

https://bugzilla.gnome.org/show_bug.cgi?id=775763
2017-03-01 10:55:21 +01:00
Florian Müllner
fec511c786 calendar: Only show section title for other days
The section titles usually don't provide a lot of value - messages
themselves are usually pretty unambiguous about their type, and
having a hidden shortcut to some settings panel or application isn't
essential either - except when showing the selected date when browsing
other days, as it adds context to the listed events. Based on that,
remove the section title as a general MessageListSection feature and
move it into the EventsSection, where we only show it when it is useful.

https://bugzilla.gnome.org/show_bug.cgi?id=775763
2017-03-01 10:55:09 +01:00
Florian Müllner
8a6157c7c1 messageList: Remove section clear button
With the new "Clear All" button in the message list as a replacement,
we can remove the individual clear buttons from the sections.

https://bugzilla.gnome.org/show_bug.cgi?id=775763
2017-03-01 10:54:32 +01:00
Florian Müllner
239b67eff6 messageList: Make canClear public and notify on changes
The latest mockups contain a button to clear all sections at once.
As some elements cannot be cleared, we need to provide that information
to avoid offering an action that has no effect.

https://bugzilla.gnome.org/show_bug.cgi?id=775763
2017-03-01 10:52:43 +01:00
Florian Müllner
ede0bf2d88 messageList: Add missing import
We lost that when code was split out from calendar.js ...
2016-02-22 19:33:17 +01:00
Florian Müllner
3ecdfaffd2 calendar: Add Media section
We lost media controls outside of notification banners when
implementing the new notification designs. Reimplement this
functionality as a dedicated "Media" section in the message
list based on MPRIS.

https://bugzilla.gnome.org/show_bug.cgi?id=756491
2016-02-17 15:15:16 +01:00
Florian Müllner
ee8fd1e613 calendar: Split out message list base classes
Currently both the base classes for messages/sections and the message
list itself that instantiates the available sections are located in
the same module. As a result, it isn't possible to define sections
in a different module without introducing circular dependencies. The
Calendar module is already unwieldily large, so split it up a bit to
avoid it growing even bigger in the future.

https://bugzilla.gnome.org/show_bug.cgi?id=756491
2016-02-17 14:56:52 +01:00