Commit graph

704 commits

Author SHA1 Message Date
Michael Gratton
1be5dec877 client: Update Components.WebView terminology around resource loading
Refer uniformly to remote resource loading instead of that and remote
image loading.
2021-04-04 18:04:41 +10:00
Julian Sparber
6a052031df avatar: Use HdyAvatar for displaying avatars 2021-04-04 12:44:32 +10:00
James Westman
40dd92e8c3
composer-headerbar: Use HdyHeaderBar
This allows the headerbar to be draggable with HdyApplicationWindow.
2021-02-11 01:14:04 -06:00
Christopher Davis
44bc5c5cda toolbar: Use HdyHeaderBar
This was forgotten when porting to HdyWindow,
but is needed for making the window draggable.
2021-02-06 04:07:28 -08:00
Julian Sparber
dc6fb34422 main-window: replace GtkApplicationWindow with HdyApplicaitonWindow
HdyApplicationWindow moves the titlebar into the content area of the
window which allows us to split the current main-titlebar and move the
parts directly into the leaflets without the need of swipe groups nor
size groups.
2021-02-03 17:06:45 +01:00
Michael Gratton
f4d3c54110 ui: Remove can_focus from GTK builder file definitions
GTK widgets set the default for this as needed, and some incorrect
values for this have caused issues with keyboard focus.

Fixes #1059
2021-01-27 21:43:23 +11:00
Michael Gratton
e6ab0f754f Composer.Widget: Rework to use common header row widget
Add private HeaderRow and EntryHeaderRow widgets for displaying editable
headers in the composer, convert to using that to wrap up common
properties and functionality for each of the header rows.
2021-01-27 12:05:49 +11:00
Michael Gratton
430f8abe9a client: Convert main composer widgets to use proper CSS names 2021-01-26 23:23:45 +11:00
Michael Gratton
f281b5ca2e Composer.Widget: Rename some structural widgets to make more sense 2021-01-26 21:54:14 +11:00
Julian Sparber
95f75f789c conversation-list-box: remove shadow and make the rows rounded
This also makes the expander row look like in HdyExpander row.
2021-01-25 22:20:15 +01:00
Michael Gratton
c331145fd3 client: Clean up database upgrade dialog implementation
Rename `UpgradeDialog` to `DatabaseManager` since it's not actually a
dialog, move it into the APplication package. Replace old Glade UI file
with a custom built dialog since it's trivial and so we can make it
modal for a main window.

Fixes #1007
2021-01-19 23:50:29 +11:00
Michael Gratton
085b9691a1 ui/gtk/help-overlay.ui 2021-01-18 08:38:03 +00:00
Jeremias Ortega
e0fab92d3c
application-main-window: Add shortcut to select inbox
Closes: https://gitlab.gnome.org/GNOME/geary/-/issues/1108
2021-01-17 16:55:49 -06:00
Michael Gratton
600be0d5f4 ui/gtk/help-overlay.ui: Reorganise so most needed shortcuts are first
Make the section order: Conversations > Composer > Application >
Single-key.
2021-01-08 09:32:39 +11:00
Michael Gratton
2a5c29b96e ui/gtk/help-overlay.ui: Break app shortcuts out into their own section 2021-01-08 09:32:39 +11:00
Michael Gratton
baed3edf94 ui/gtk/help-overlay.ui: Use 2-space indentation for readability 2021-01-08 09:32:39 +11:00
Michael Gratton
1ad29a9be9 Merge branch 'sidebar-improvments' into 'mainline'
Modernize folder list (without rewrite)

Closes #880 and #1029

See merge request GNOME/geary!618
2021-01-07 22:29:05 +00:00
Michael Gratton
bf3a0e830b Merge branch 'adaptive_dialogs' into 'mainline'
Make account-editor adaptive

See merge request GNOME/geary!609
2021-01-07 21:54:57 +00:00
Julian Sparber
8aa5f291e8 folder-list: mordernize sidebar
This makes each row a better click target and improves spacing in
general. This move the expander arrow to the left and removes the
indentation for folders which makes it possible to define a much
smaller width for the sidebar.

Fixes: https://gitlab.gnome.org/GNOME/geary/-/issues/880,
       https://gitlab.gnome.org/GNOME/geary/-/issues/1029
2020-12-09 11:08:33 +01:00
Julian Sparber
5f22d92051 in-app-notification: wrap text and add start/end margin
This makes sure that the in-app-notification fits also small window
sizes and eventually wraps the text to a new.
2020-11-18 16:50:18 +01:00
Julian Sparber
3530a804a1 compnents-info-bar: use custom infobar so that the buttons reflow 2020-11-18 16:50:18 +01:00
Julian Sparber
ed3a451434 conversation-viewer: allow one email per line 2020-11-18 14:59:47 +01:00
Julian Sparber
9c6ca541cc conversation-viewer: move actions to the bottom when they don't fit 2020-11-18 14:59:43 +01:00
Julian Sparber
17afbca172 account-editor: don't show close button for edit/servers pane
This makes it consistent with the other panes.
2020-11-17 13:45:57 +01:00
Julian Sparber
a30afb9e86 account-editor: replace remove confirm view with dialog 2020-11-17 13:45:57 +01:00
Julian Sparber
95f182df3f account-editor: use HdyClamp and remove padding 2020-11-17 13:45:56 +01:00
Arnaud Ferraris
7c9d1258c6 accounts-editor: make window usable on phones 2020-11-17 11:48:31 +01:00
Adrien Plazas
c128b1be5f accounts-editor-add-pane: Drop the useless shadow 2020-11-17 11:48:31 +01:00
Adrien Plazas
e6fd0fe174 accounts-editor: Wrap the welcome panel labels
This helps the accounts editor fit in narrow screens.
2020-11-17 11:48:31 +01:00
Julian Sparber
0923de098f main-window: remove shadow from folder/conversation list 2020-11-17 11:35:52 +01:00
Michael Gratton
ec3057daf7 ConversationWebView: Fix plain text emails sometimes being too wide
Using `whitespace: pre-wrap` to format plain text email sometimes
causes additional width to be allocated by the plain text blocks that
then does not get used due to the constraints on the HTML element.
The allocated space remains however and hence an un-needed horizontal
scrollbar appears.

Using `break-spaces` instead seems to help since it allows breaks after
a space character, leading to the additional space not otherwise being
allocated.
2020-10-17 15:08:10 +11:00
Michael Gratton
0e783de5bf ui/conversation-web-view.css: Work around oversized email body height
Sometimes when loading an email body, the viewport for the web view
will be set to 0 (when the web view is hidden or not yet laid out in
the widget hierarchy?). When this happens, since the width of the body
is specified as 100vw, the content width is reduced to the absolute
minimum and hence the content height is stretched right out. Then, when
the web view is displayed, the viewport width increases but the extra
whitespace is never reclaimed (scrollHeight never goes down), so the
height of the web view remains way too large, causing large amounts of
whitespace at the end of the email message (i.e. #283).

To work around this, set a min width for the HTML element so the initial
height of the email body isn't too badly wrong.
2020-10-17 13:55:36 +11:00
Michael Gratton
40f97de745 ui/conversation-web-view.css: Clean up HTML/BODY element lockdowns
Use some more obvious CSS to ensure we can get an accurate idea of the
content height for sizing the web view and that the body fits the
web view's width.
2020-10-17 13:55:36 +11:00
Michael Gratton
0dce103f6b ui/components-web-view.js: Use arrow functions for better this scoping 2020-10-17 13:55:36 +11:00
Michael Gratton
01a0f96b40 ui/components-web-view.js: Use ResizeObserver for watching pref height
Rather than guessing when the height might change by using a number
of different event listeners, use a ResizeObserver to get direct
notifications of any changes to the HTML element's size.
2020-10-17 11:29:05 +11:00
Michael Gratton
1d80ed2034 ComposerPageState: Use CSS for managing focus with composer body parts
Now that the `:focus-within` pseudoclass is supported, use this rather
than some custom JS to update custom HTML classes. This also prevents
spurious mutation events from firing.
2020-10-13 00:02:09 +11:00
Michael Gratton
7950ce50c6 GearyWebExtension: Untangle extension and JS interaction a bit
Move selection changed event listener into JS so it doesn't have to
cross the JS/native boundary twice.

Move sending remote load blocked from JS to the extension since we can
do that directly now and again so the JS/native boundary doesn't need
to be double-crossed again.
2020-10-13 00:02:09 +11:00
Michael Gratton
7b0146274c Conversation.WebView: Convert to using messages for JS → client comms 2020-10-13 00:02:09 +11:00
Michael Gratton
3655f4896f Composer.WebView: Convert to using messages for JS → client comms 2020-10-13 00:02:09 +11:00
Michael Gratton
fb96676fbd Components.WebView: Convert to using messages for JS → client comms 2020-10-13 00:02:09 +11:00
Michael Gratton
6162785d99 GearyWebExtension: Add support for sending messages from JS to client
Define a vala-backed JS class in the extension and make that available
to pages when they are registered. Add some helper JS to PageState for
defining message sending functions. Listen for these in
Components.WebView and dispatch to the registered callback for it.
2020-10-13 00:02:09 +11:00
Michael Gratton
c813aa5707 Components.WebView: Check for pass up exceptions when calling JS code
Update web extension to check for errors when invoking page state
methods and pass a message back if found. Check for this, decode and
throw a vala error in the WebView if found.
2020-10-13 00:02:09 +11:00
Michael Gratton
ff565bc6ef Components.WebView: Convert to using messages for JS method invocation
Use WebKitGTK UserMessage objects for invoking JS methods rather than
serialising to JS strings and running those. This is possibly slightly
less efficient, but removes the onus on serialising to and parsing from
JS and once switched over from message handlers to UserMessage objects
will be using a single uniform IPC interface for both.
2020-10-13 00:02:09 +11:00
Michael James Gratton
d7af23201c Revert "Revert "Merge branch 'mjog/558-webkit-shared-process' into 'mainline'""
This reverts commit cbe6e0ba9b, which reinstates
commit e4a5b85698.

See !411 and !374
2020-10-13 00:02:02 +11:00
Julian Sparber
70a40893a3 action-bar: Add an action bar to the conversations list (2-panel)
This moves the actions from the headerbar to the action bar at the
bottom of the conversations list when multiple conversations are
selected. This changes is needed so that the user can still interact
with the conversations when folded.
This also hides the actions from the Headerbar and action bar when
no conversation is selected.
2020-10-12 11:03:55 +02:00
Julian Sparber
98017cfb39 main-toolbar: Create object containing conversation actions
This creates a new object that contain the 4 groups of actions that used
to be in the conversation-viewer headerbar.
This allows the widgets to be moved to differen locations, e.g. to an
action bar that will be added in a later commit.
2020-10-12 11:03:04 +02:00
Julian Sparber
d6c546e2d5 composer: close the composer when navigating back 2020-10-10 10:41:49 +02:00
Adrien Plazas
d97d86cbc7 toolbar header group 2020-10-10 10:41:49 +02:00
Julian Sparber
28a19775b8 main-toolbar: Add back buttons for leaflet navigation 2020-10-10 10:41:49 +02:00
Adrien Plazas
28e3192674 application-main-window: Sync the leaflets' swipe state
This keeps the swiping state of the leaflets in sync.
2020-10-10 10:41:49 +02:00