Files
ELY-Browser/crates/ely_domain/src/lib.rs
T
ZacharyZhang-NY 9a2f9f2d74 Add hidden-on-hover sidebar mode
Domain ships HIDDEN_SIDEBAR_WIDTH_PX = 8 alongside the existing
collapsed/default tiers. ElyShell tracks sidebar_hover_expanded with
expand_hidden_sidebar / collapse_hidden_sidebar helpers; switching
back to a non-hidden width via the layout cards or core API resets
the flag automatically so the sidebar can never be both hidden and
expanded after a mode change.

Renderer:
- render_sidebar takes a sidebar_hidden flag and routes to a thin
  8 px clickable rail (hover bg + click expands) when the active
  space's width is at HIDDEN.
- While the rail is expanded, render_browser overlays a transparent
  backdrop + the full default-width sidebar absolutely positioned in
  the shell inset, so the main pane content never reflows.
- collapsed_sidebar_active still drives the COLLAPSED-tier compact
  sidebar; the hidden tier is opted out of that path.

Appearance form:
- Layout cards section gains the design's third "Hidden on hover"
  card with a 6 px sliver preview that mutates the active space to
  HIDDEN_SIDEBAR_WIDTH_PX. LayoutMode now derives id/width/preview
  from a small enum so adding a fourth mode would be one match arm.

The hover-expanded state never persists into the domain; once the
user switches modes or clicks the backdrop, it collapses cleanly.
2026-05-09 20:01:31 -04:00

77 lines
2.3 KiB
Rust

mod appearance;
mod archive;
mod bookmark;
mod command;
mod diagnostics;
mod download;
mod error;
mod favorite;
mod history;
mod identifiers;
mod new_tab;
mod note;
mod plugin;
mod privacy;
mod profile;
mod reading_list;
mod search;
mod site_permission;
mod space;
mod split;
mod sync;
mod tab;
mod tab_group;
mod update;
mod url_text;
pub use appearance::{
AppearanceSettings, DEFAULT_TRANSLUCENCY_PCT, MAX_TRANSLUCENCY_PCT, ThemeMode, WallpaperTheme,
};
pub use archive::{ArchiveSource, ArchivedTab};
pub use bookmark::BookmarkEntry;
pub use command::{CommandIntent, CommandScope};
pub use diagnostics::{
DiagnosticCode, DiagnosticEvent, DiagnosticEventKind, DiagnosticOutcome, WebViewCrashKind,
};
pub use download::{
DownloadChecksum, DownloadChecksumAlgorithm, DownloadDestination, DownloadEntry,
DownloadPolicy, DownloadSecurity, DownloadState,
};
pub use error::DomainError;
pub use favorite::FavoriteLimit;
pub use history::HistoryEntry;
pub use identifiers::{
BookmarkId, DownloadId, NoteId, ProfileId, ReadingListId, SpaceId, SplitId, TabGroupId, TabId,
WebViewId,
};
pub use new_tab::NewTabDestination;
pub use note::{NoteEntry, NoteTarget};
pub use plugin::{
PluginContributionPoint, PluginId, PluginManifest, PluginPermission, PluginPermissionRisk,
PluginSignature, PluginSignatureAlgorithm,
};
pub use privacy::{DiagnosticsReportingPolicy, HistoryRecordingPolicy};
pub use profile::{Profile, ProfileKind, ProfileSyncPolicy};
pub use reading_list::{ReadingListEntry, ReadingProgress, ReadingProgressPercent};
pub use search::SearchEngine;
pub use site_permission::{
SiteOrigin, SitePermissionAuditAction, SitePermissionAuditEvent, SitePermissionDecision,
SitePermissionEntry, SitePermissionFeature,
};
pub use space::{
ArchivePolicy, COLLAPSED_SIDEBAR_WIDTH_PX, DEFAULT_SIDEBAR_WIDTH_PX, HIDDEN_SIDEBAR_WIDTH_PX,
Space,
};
pub use split::{MAX_SPLIT_PANES, SplitAxis, SplitLayout, SplitPane};
pub use sync::{
SyncConnectionState, SyncObjectKind, SyncObjectPolicy, SyncObjectState, SyncObjectStatus,
SyncStatus,
};
pub use tab::{
BrowserTab, DEFAULT_ZOOM_PERCENT, MAX_ZOOM_PERCENT, MIN_ZOOM_PERCENT, TabFlags, TabState,
ZOOM_PERCENT_STEP, parse_title_unread_count, validate_zoom_percent,
};
pub use tab_group::TabGroup;
pub use update::UpdatePolicy;
pub use url_text::UrlText;