mirror of
https://github.com/Foundry376/Mailspring.git
synced 2026-10-08 19:49:17 +02:00
* Host the calendar as a root sheet in the main window The calendar plugin now loads in the main window and defines a Calendar root sheet alongside Threads, Drafts and Activity. Its menu replaces Thread and View only while that sheet is showing. The preview banner is gone, and Day/Week/ Month/Agenda lose their Cmd+1-4 bindings, which belong to account switching in the main window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Retire the calendar window in favour of Mail and Calendar sections application:show-calendar now brings the main window forward and switches it to the Calendar sheet, focusing the event when an invitation's "View in Calendar" link sent one. The new application:show-mail switches back to the last mailbox. The Window menu lists Mail and Calendar in place of Message Viewer, and the Developer menu loses its Calendar Preview item. Shortcuts: Cmd+Option+1/2 on macOS, Ctrl+Shift+1/2 on Windows and Linux, where Ctrl+Alt is AltGr and AltGr+2 types "@" on Nordic layouts. Cmd/Ctrl+0 still goes to Mail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Add a nav rail for switching between Mail and Calendar The main window gets a rail of section icons under the toolbar. Items register with the NavRail:Item role and run the same application: command as the Window menu and the shortcut, so every path switches sections the same way. The toolbar's first column now covers the strip above the rail, keeping the window controls in the corner, and later columns are offset to stay over theirs. The rail is unstyled beyond layout and the existing btn-icon class; the inbox and month-grid icons are placeholders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Set the sheets in an inset card beside the nav rail In the main window the toolbar and nav rail now share one surface, and the sheets sit on it as a card with a hairline border, 6px corners and a 4px gap to the right and bottom edges. The card's border takes over from the toolbar's bottom hairline. The rail's background is set beside the toolbar's in each platform block, so the two stay matched: the sidebar colour on macOS and the window background on Linux and Windows. The selected rail item lifts to the content colour with a slight shadow, since the rail now shares the sidebar's colour and the old selected fill vanished against it. Themes that restyle the toolbar themselves (Darkside, Less Is More, Ubuntu) don't match the rail yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Lighten the section sidebars inside the card The account sidebar and the calendar list sit inside the card but shared the frame's colour, so they read as part of the frame. Inside the card they now mix halfway toward the content colour. @source-list-bg itself is unchanged, so other windows and theme overrides are unaffected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Move calendar search and New Event to the right of the toolbar Both now sit past the toolbar's +50 spacer, with New Event rightmost, which frees the left of the calendar toolbar. Mail's toolbar is unchanged, so the two sections place search differently for now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Keep the card and rail from overriding theme styles Themes, including ones users write themselves, load after core and plugin styles, so rules on elements a theme may already style now stay at that element's own specificity: - The lighter sidebar inside the card moves out of core into the account sidebar and calendar stylesheets, each beside its base rule, so a theme's own sidebar colour wins. Darkside's dark sidebar had gone pale with its light text still on it. The colour is a new @source-list-inset-bg, which a theme can also override. - The rail sets its own icon colour rather than inheriting .btn-icon's, which themes recolour for their toolbars. Ubuntu's light toolbar icons were invisible on the light rail. Ubuntu's rail takes its toolbar's dark colour. Darkside's rail joins its dark sidebar column and the sheets sit flush, since Darkside is two flat panels and the card's rounded corner fell in the middle of that column. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Give the calendar sidebar its own sheet column The Calendar sheet now has two columns like Mail's, CalendarSidebar and CalendarContent, so the toolbar and themes can address the sidebar the way they address Mail's account sidebar. The calendar list and mini month move out of MailspringCalendar into a CalendarSidebar component, and its column shares the account sidebar's width, so resizing either resizes both. The date being viewed now lives in FocusedMomentStore, which both columns read: the mini month moves the grid and the grid's navigation moves the mini month. The store also replaces the module variable that kept the date while the window shows Mail. The calendar list toggle and its mailspring.calendarListVisible setting are gone; nothing called the toggle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Place calendar search and New Event where Mail's sit New Event moves to the sidebar column's toolbar and takes Compose's position from the shared .item-compose rule, on every platform. Search starts the content column as Mail's does, at the same 450px width, so neither moves when switching sections. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Carry Darkside's dark sidebar column into Calendar Darkside's sidebar, toolbar and inset rules now cover the calendar's columns, so the toolbar strip, rail and calendar list form the same dark column as in Mail, and search sits at the same inset. The mini month keeps its light box. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fit the nav rail and calendar columns to Less Is More Less Is More gives the toolbar no height and insets each column from the top to clear it, so the rail and the calendar's columns take the same 3em inset; without it the rail's icons sat under the window controls and the calendar ran up under the toolbar. The sheets sit flush on white rather than in the card, matching the theme's single white surface, and the selected rail item uses the theme's darker-icon selection instead of a white tile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Let the calendar sidebar's mini month take the sidebar's colours In the calendar sidebar the mini month drops its own white box and inherits the sidebar's background and text colour, so it follows any theme that colours the sidebar; on Darkside it was a white box in a dark column. Days outside the month fade by opacity, and dividers and hover tints are mixed from the text colour, so all of them read on light and dark sidebars alike. Today and the selected day keep the accent. The rules are scoped with :where(.calendar-source-list), so they win over the core mini month styles by load order while a theme's own mini month rules still win over them. The date picker's mini month is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Close Preferences when its section is picked again Picking the section Preferences sits over (rail, shortcut, Window menu or "View in Calendar") now closes it, as switching to the other section already does. Before, nothing happened while the rail showed that section as current. The component kit's typings also stop declaring NavRail, which the kit doesn't export at runtime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Trim comments that restate structure Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Style Less Is More's calendar list like its account sidebar The calendar sidebar's account headings take the account sidebar's small uppercase, letter-spaced heading style, its rows the same grey 14px text and spacing, and the list the same inset from the column edge. The inset is on the list rather than the column, so the mini month keeps its full width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Open the calendar on today, and keep threads from stacking over it From review on #2946: - FocusedMomentStore took moment() at import, which is app launch, so the first visit to Calendar days later showed the launch date. The date now stays unset until the user picks one. - Pop In focused the thread without leaving Calendar, so a single-panel Thread sheet was pushed over the calendar. It now switches to Mail first, through a new FocusedPerspectiveStore.showMail() that application:show-mail also uses. - The thread list moved focus to the next thread when the focused one left the list while any root sheet showed, Calendar included, which pushed the same Thread sheet over the calendar. It now does so only while Mail is showing, per FocusedPerspectiveStore.isShowingMail(), which the rail's Mail item reads too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>