BlueGit

ict rusty-teams

Files

rusty-teams / crates / app / src / views / mod.rs

mod.rs

merge: meeting recap tab
metis Daniel Däschle · pushed by metis · 7 weeks ago
ffc96243 History
mod.rs 2.8 KiB Download Raw
1pub mod activity_panel;
2pub mod adaptive_card;
3pub mod attachment_tray;
4pub mod attachments;
5pub mod avatar;
6pub mod call_controls;
7pub mod call_extras;
8pub mod call_health;
9pub mod call_layouts;
10pub mod call_mini;
11pub mod call_mini_window;
12pub mod call_organizer;
13pub mod call_stage;
14pub mod call_view;
15pub mod call_view_menu;
16pub mod calls_tab;
17pub mod card_carousel;
18pub mod card_chart;
19pub mod card_code_block;
20pub mod card_icon;
21pub mod card_input;
22pub mod card_media;
23pub mod card_table;
24pub mod card_widgets;
25pub mod channel_tabs;
26pub mod composer;
27pub mod conversation;
28pub mod dialog_overlay;
29pub mod draft_style;
30pub mod emoji_popup;
31pub mod format_toolbar;
32pub mod forward_dialog;
33pub mod fun_picker;
34pub mod image_viewer;
35pub mod join_dialog;
36pub mod link_preview;
37pub mod message_actions;
38pub mod message_row;
39pub mod new_chat;
40pub mod pin_banner;
41pub mod post_card;
42pub mod profile_card;
43pub mod proposal_card;
44pub mod rail;
45pub mod reaction_picker;
46pub mod reaction_pills;
47pub mod recap_tab;
48pub mod saved_panel;
49pub mod scheduled_toolbar;
50pub mod section_dialog;
51pub mod share_bar;
52pub mod shared_tab;
53pub mod shell;
54pub mod shortcuts;
55pub mod shortcuts_dialog;
56pub mod sidebar;
57pub mod status_bar;
58pub mod status_menu;
59pub mod status_message_dialog;
60pub mod switcher;
61pub mod title_bar;
62pub mod toolbar_placement;
63pub mod transfer_picker;
64pub mod translation_line;
65pub mod widgets;
66
67#[cfg(test)]
68mod tests {
69 use std::path::Path;
70
71 fn rust_files(directory: &Path, files: &mut Vec<std::path::PathBuf>) {
72 for entry in std::fs::read_dir(directory).unwrap() {
73 let path = entry.unwrap().path();
74 if path.is_dir() {
75 rust_files(&path, files);
76 } else if path.extension().is_some_and(|extension| extension == "rs") {
77 files.push(path);
78 }
79 }
80 }
81
82 #[test]
83 fn hover_styles_never_toggle_display() {
84 let toggle =
85 regex::Regex::new(r"hover\([^|]*\|\w+\|\s*\w+\s*\.\s*(hidden|flex|block|grid)\(\)")
86 .unwrap();
87 let mut files = Vec::new();
88 rust_files(
89 &Path::new(env!("CARGO_MANIFEST_DIR")).join("src"),
90 &mut files,
91 );
92 let offenders: Vec<String> = files
93 .iter()
94 .flat_map(|path| {
95 let source = std::fs::read_to_string(path).unwrap();
96 source
97 .lines()
98 .enumerate()
99 .filter(|(_, line)| toggle.is_match(line))
100 .map(|(index, _)| format!("{}:{}", path.display(), index + 1))
101 .collect::<Vec<_>>()
102 })
103 .collect();
104 assert!(
105 offenders.is_empty(),
106 "hover styles must toggle visible()/invisible(), not display (gpui panics \"must call prepaint before paint\"): {offenders:?}"
107 );
108 }
109}