team-ljyzipelo

공개

압축 작업 화면과 파일 선택 흐름을 재구성함

작성자
호시노 히나타
작성 시각
커밋
85c6f3d67877f7964dd1009ebfb828661ba871b9
부모
b10c7ee
이 시점의 파일 보기

변경된 파일 64개

+2,537-90
수정experiments/rust-ui-memory-app/Cargo.toml+5-0
@@ -51,3 +51,8 @@ eframe = { version = "=0.37.0", optional = true, default-features = false, featu
5151name = "renderer_fallback"
5252path = "../../tests/rust-app-ui/renderer_fallback.rs"
5353required-features = ["ui"]
54추가:
55추가: [[bin]]
56추가: name = "zipelo-ui-capture"
57추가: path = "../../tests/rust-app-ui/capture.rs"
58추가: required-features = ["ui-fixture"]
추가experiments/rust-ui-memory-app/src/archive_picker.rs+258-0
@@ -0,0 +1,258 @@
1추가: use crate::{archive_present as present, archive_theme as theme};
2추가: use eframe::egui::{self, Align, Layout};
3추가: use std::path::{Path, PathBuf};
4추가:
5추가: #[derive(Clone, Copy, PartialEq)]
6추가: pub enum Purpose {
7추가: Open,
8추가: Destination,
9추가: Retry,
10추가: Files,
11추가: Folder,
12추가: ZipFolder,
13추가: }
14추가:
15추가: pub enum Choice {
16추가: Cancel,
17추가: Paths(Vec<PathBuf>),
18추가: }
19추가:
20추가: pub struct Picker {
21추가: pub purpose: Purpose,
22추가: current: PathBuf,
23추가: entries: Vec<present::BrowserEntry>,
24추가: selected: Vec<PathBuf>,
25추가: error: bool,
26추가: }
27추가:
28추가: impl Picker {
29추가: pub fn new(purpose: Purpose, start: &Path) -> Self {
30추가: let current = if start.is_dir() {
31추가: start.to_path_buf()
32추가: } else {
33추가: start
34추가: .parent()
35추가: .filter(|p| p.is_dir())
36추가: .map(Path::to_path_buf)
37추가: .unwrap_or_else(present::home_directory)
38추가: };
39추가: let mut picker = Self {
40추가: purpose,
41추가: current,
42추가: entries: Vec::new(),
43추가: selected: Vec::new(),
44추가: error: false,
45추가: };
46추가: picker.reload();
47추가: picker
48추가: }
49추가:
50추가: fn reload(&mut self) {
51추가: self.selected.clear();
52추가: match present::directory_entries(&self.current) {
53추가: Ok(entries) => {
54추가: self.entries = entries;
55추가: self.error = false;
56추가: }
57추가: Err(_) => {
58추가: self.entries.clear();
59추가: self.error = true;
60추가: }
61추가: }
62추가: }
63추가:
64추가: fn directory_mode(&self) -> bool {
65추가: matches!(
66추가: self.purpose,
67추가: Purpose::Destination | Purpose::Retry | Purpose::Folder | Purpose::ZipFolder
68추가: )
69추가: }
70추가:
71추가: pub fn show(&mut self, ctx: &egui::Context) -> Option<Choice> {
72추가: let mut choice = None;
73추가: let mut navigate = None;
74추가: let width = (ctx.content_rect().width() - 64.0).min(720.0);
75추가: let height = (ctx.content_rect().height() - 280.0).clamp(160.0, 340.0);
76추가: let title = match self.purpose {
77추가: Purpose::Open => "파일 열기",
78추가: Purpose::Destination | Purpose::Retry => "풀 위치 선택",
79추가: Purpose::Files => "묶을 파일 선택",
80추가: Purpose::Folder => "묶을 폴더 선택",
81추가: Purpose::ZipFolder => "ZIP 저장 폴더 선택",
82추가: };
83추가: let title = if self.purpose == Purpose::Open {
84추가: "파일 열기"
85추가: } else {
86추가: title
87추가: };
88추가: let modal = egui::Modal::new(egui::Id::unique("archive-picker")).show(ctx, |ui| {
89추가: ui.set_width(width);
90추가: ui.heading(title);
91추가: egui::ScrollArea::horizontal()
92추가: .id_salt("breadcrumbs")
93추가: .show(ui, |ui| {
94추가: ui.horizontal(|ui| {
95추가: let mut ancestors = self.current.ancestors().collect::<Vec<_>>();
96추가: ancestors.reverse();
97추가: for path in ancestors {
98추가: let label = path
99추가: .file_name()
100추가: .unwrap_or(path.as_os_str())
101추가: .to_string_lossy();
102추가: if ui
103추가: .button(label.as_ref())
104추가: .on_hover_text(path.display().to_string())
105추가: .clicked()
106추가: {
107추가: navigate = Some(path.to_path_buf());
108추가: }
109추가: }
110추가: });
111추가: });
112추가: ui.separator();
113추가: ui.horizontal_top(|ui| {
114추가: ui.allocate_ui_with_layout(
115추가: egui::vec2(128.0, height),
116추가: Layout::top_down(Align::Min),
117추가: |ui| {
118추가: ui.set_min_size(egui::vec2(128.0, height));
119추가: for (label, path) in present::shortcuts() {
120추가: if theme::action(ui, &label, false, true).clicked() {
121추가: navigate = Some(path);
122추가: }
123추가: }
124추가: if let Some(parent) = self.current.parent() {
125추가: if theme::action(ui, "상위 폴더", false, true).clicked() {
126추가: navigate = Some(parent.to_path_buf());
127추가: }
128추가: }
129추가: },
130추가: );
131추가: ui.add_space(theme::SPACE);
132추가: ui.allocate_ui_with_layout(
133추가: egui::vec2((width - 160.0).max(240.0), height),
134추가: Layout::top_down(Align::Min),
135추가: |ui| {
136추가: ui.set_min_size(egui::vec2((width - 160.0).max(240.0), height));
137추가: if self.error {
138추가: ui.colored_label(
139추가: theme::ERROR,
140추가: "이 폴더를 열 수 없습니다. 접근 권한을 확인하세요",
141추가: );
142추가: } else if self.entries.is_empty() {
143추가: ui.label("이 폴더는 비어 있습니다");
144추가: }
145추가: egui::ScrollArea::vertical()
146추가: .id_salt("picker-entries")
147추가: .max_height(height)
148추가: .show_rows(ui, theme::ROW, self.entries.len(), |ui, rows| {
149추가: for index in rows {
150추가: let entry = &self.entries[index];
151추가: let selected = self.selected.contains(&entry.path);
152추가: let response = ui
153추가: .horizontal(|ui| {
154추가: theme::icon(
155추가: ui,
156추가: if entry.directory {
157추가: theme::Icon::Folder
158추가: } else {
159추가: theme::Icon::File
160추가: },
161추가: 20.0,
162추가: );
163추가: let name = if entry.link {
164추가: format!("{} (링크)", entry.name)
165추가: } else {
166추가: entry.name.clone()
167추가: };
168추가: ui.add_sized(
169추가: [ui.available_width(), theme::ROW],
170추가: egui::Button::new("")
171추가: .left_text(present::middle_text(&name, 38))
172추가: .selected(selected),
173추가: )
174추가: .on_hover_text(entry.path.display().to_string())
175추가: })
176추가: .inner;
177추가: theme::focus(&response);
178추가: if response.clicked() {
179추가: if self.purpose == Purpose::Files
180추가: && ui.input(|i| i.modifiers.command || i.modifiers.ctrl)
181추가: {
182추가: if selected {
183추가: self.selected.retain(|p| p != &entry.path);
184추가: } else if !entry.directory {
185추가: self.selected.push(entry.path.clone());
186추가: }
187추가: } else {
188추가: self.selected = vec![entry.path.clone()];
189추가: }
190추가: }
191추가: if response.double_clicked() {
192추가: if entry.directory && !entry.link {
193추가: navigate = Some(entry.path.clone());
194추가: } else if !self.directory_mode() {
195추가: choice = Some(Choice::Paths(vec![entry.path.clone()]));
196추가: }
197추가: }
198추가: }
199추가: });
200추가: },
201추가: );
202추가: });
203추가: ui.separator();
204추가: ui.horizontal(|ui| {
205추가: if self.purpose == Purpose::Files {
206추가: ui.label("Ctrl을 누르면 여러 파일을 고를 수 있습니다");
207추가: }
208추가: ui.with_layout(Layout::right_to_left(Align::Center), |ui| {
209추가: let selected_directory = self.selected.first().filter(|path| {
210추가: self.entries
211추가: .iter()
212추가: .any(|e| &e.path == *path && (e.directory || e.link))
213추가: });
214추가: let paths = if self.directory_mode() {
215추가: vec![
216추가: selected_directory
217추가: .cloned()
218추가: .unwrap_or_else(|| self.current.clone()),
219추가: ]
220추가: } else {
221추가: self.selected
222추가: .iter()
223추가: .filter(|path| {
224추가: self.entries
225추가: .iter()
226추가: .any(|e| &e.path == *path && !e.directory)
227추가: })
228추가: .cloned()
229추가: .collect()
230추가: };
231추가: let label = if self.directory_mode() {
232추가: "이 폴더 선택"
233추가: } else if self.purpose == Purpose::Files {
234추가: "추가"
235추가: } else {
236추가: "열기"
237추가: };
238추가: let enabled = !paths.is_empty() && !self.error;
239추가: let (cancel, confirm) = theme::action_pair(ui, "취소", Some((label, enabled)));
240추가: if confirm || (enabled && ui.input(|i| i.key_pressed(egui::Key::Enter))) {
241추가: choice = Some(Choice::Paths(paths));
242추가: }
243추가: if cancel {
244추가: choice = Some(Choice::Cancel);
245추가: }
246추가: });
247추가: });
248추가: });
249추가: if modal.should_close() {
250추가: choice = Some(Choice::Cancel);
251추가: }
252추가: if let Some(path) = navigate {
253추가: self.current = path;
254추가: self.reload();
255추가: }
256추가: choice
257추가: }
258추가: }
추가experiments/rust-ui-memory-app/src/archive_present.rs+308-0
@@ -0,0 +1,308 @@
1추가: use crate::archive_ui::*;
2추가: use std::{
3추가: collections::BTreeSet,
4추가: fs, io,
5추가: path::{Path, PathBuf},
6추가: };
7추가:
8추가: pub const UNCERTAIN: &str = "저장이 끝났는지 확인하지 못했습니다. 풀 위치 폴더를 확인하세요.";
9추가: pub const PARTIAL: &str = "일부 파일만 풀렸습니다. 풀린 파일은 풀 위치 폴더에 남아 있습니다.";
10추가: pub const LEFTOVERS: &str =
11추가: "선택한 파일은 모두 저장했지만 임시 파일을 지우지 못했습니다. 풀 위치 폴더를 확인하세요.";
12추가: pub const SYNC_WARNING: &str = "파일을 디스크에 완전히 저장했는지 확인하지 못했습니다.";
13추가: pub const CLEANUP_WARNING: &str =
14추가: "임시 파일을 지우지 못했습니다. 풀 위치 폴더에 남은 임시 파일이 있을 수 있습니다.";
15추가: pub const INTERNAL: &str = "내부 오류가 발생했습니다. 프로그램을 다시 시작해 주세요";
16추가: pub const FOLDER_ERROR: &str = "풀 위치 폴더를 만들 수 없습니다. 접근 권한을 확인하세요";
17추가:
18추가: pub fn error_text(code: ErrorCode) -> &'static str {
19추가: match code {
20추가: ErrorCode::Integrity => "압축파일이 손상됐습니다",
21추가: ErrorCode::UnsupportedFormat => "지원하지 않는 압축 형식입니다",
22추가: ErrorCode::UnsupportedFeature => "아직 지원하지 않는 기능입니다",
23추가: ErrorCode::WrongPassword => "암호가 올바르지 않습니다",
24추가: ErrorCode::UnsafePath => "파일 경로의 안전성을 확인할 수 없어 중단했습니다",
25추가: ErrorCode::Conflict => "같은 이름의 파일이 이미 있습니다. 다른 폴더를 선택하세요",
26추가: ErrorCode::Limit => "처리 한도를 초과했습니다",
27추가: ErrorCode::Io => "파일을 읽거나 쓰지 못했습니다. 파일과 폴더의 접근 권한을 확인하세요",
28추가: ErrorCode::DiskFull => "디스크 여유 공간이 부족합니다. 공간을 확보한 뒤 다시 시도하세요",
29추가: ErrorCode::SourceChanged => "원본 파일이 바뀌었습니다. 압축파일을 다시 여세요",
30추가: ErrorCode::InvalidRequest => "풀 위치와 선택한 항목을 확인하세요",
31추가: ErrorCode::Protocol | ErrorCode::Internal => INTERNAL,
32추가: }
33추가: }
34추가:
35추가: pub fn progress_text(stage: Stage, creating: bool) -> &'static str {
36추가: match stage {
37추가: Stage::Scan | Stage::Read => "압축파일을 읽는 중",
38추가: Stage::Decode if creating => "압축하는 중",
39추가: Stage::Decode => "압축을 푸는 중",
40추가: Stage::Write => "파일을 저장하는 중",
41추가: Stage::Verify => "확인하는 중",
42추가: Stage::Commit => "마무리하는 중",
43추가: }
44추가: }
45추가:
46추가: pub fn bytes_text(bytes: u64) -> String {
47추가: for (unit, size) in [("GB", 1_u64 << 30), ("MB", 1 << 20), ("KB", 1 << 10)] {
48추가: if bytes >= size {
49추가: return format!("{:.1} {unit}", bytes as f64 / size as f64);
50추가: }
51추가: }
52추가: format!("{bytes} B")
53추가: }
54추가:
55추가: pub fn middle_text(text: &str, max_chars: usize) -> String {
56추가: let chars = text.chars().collect::<Vec<_>>();
57추가: if chars.len() <= max_chars || max_chars < 5 {
58추가: return text.into();
59추가: }
60추가: let left = (max_chars - 1) / 2;
61추가: chars[..left]
62추가: .iter()
63추가: .chain(std::iter::once(&'…'))
64추가: .chain(chars[chars.len() - (max_chars - left - 1)..].iter())
65추가: .collect()
66추가: }
67추가:
68추가: pub fn default_destination(archive: &Path) -> PathBuf {
69추가: let name = archive.file_name().unwrap_or_default().to_string_lossy();
70추가: let lower = name.to_ascii_lowercase();
71추가: let stem = if lower.ends_with(".tar.gz") {
72추가: &name[..name.len() - 7]
73추가: } else {
74추가: name.rsplit_once('.')
75추가: .map_or(name.as_ref(), |(stem, _)| stem)
76추가: };
77추가: archive.with_file_name(if stem.is_empty() {
78추가: "압축 해제"
79추가: } else {
80추가: stem
81추가: })
82추가: }
83추가:
84추가: pub fn prepare_destination(path: &Path, automatic: bool) -> io::Result<bool> {
85추가: match fs::symlink_metadata(path) {
86추가: Ok(metadata) if metadata.is_dir() && !metadata.file_type().is_symlink() => Ok(false),
87추가: Ok(_) => Err(io::Error::other(FOLDER_ERROR)),
88추가: Err(error) if error.kind() == io::ErrorKind::NotFound && automatic => {
89추가: fs::create_dir(path)?;
90추가: Ok(true)
91추가: }
92추가: Err(error) => Err(error),
93추가: }
94추가: }
95추가:
96추가: pub fn remove_owned_empty(path: &Path) {
97추가: // 이번 요청에서 만든 폴더만 호출하며 비어 있지 않으면 보존함.
98추가: let _ = fs::remove_dir(path);
99추가: }
100추가:
101추가: pub fn target_files(
102추가: entries: &[Entry],
103추가: selected: &BTreeSet<u32>,
104추가: only: bool,
105추가: gzip: Option<&str>,
106추가: ) -> Option<BTreeSet<String>> {
107추가: let selected_names = entries
108추가: .iter()
109추가: .filter(|e| selected.contains(&e.id))
110추가: .map(|e| (e.name.as_str(), e.kind))
111추가: .collect::<Vec<_>>();
112추가: let mut names = BTreeSet::new();
113추가: for entry in entries.iter().filter(|e| e.kind == Kind::File) {
114추가: let included = !only
115추가: || selected_names.iter().any(|(name, kind)| {
116추가: *name == entry.name
117추가: || (*kind == Kind::Directory
118추가: && entry
119추가: .name
120추가: .starts_with(&format!("{}/", name.trim_end_matches('/'))))
121추가: });
122추가: if included && !names.insert(gzip.unwrap_or(&entry.name).replace('\\', "/")) {
123추가: return None;
124추가: }
125추가: }
126추가: Some(names)
127추가: }
128추가:
129추가: pub fn warnings(
130추가: terminal: Option<&Terminal>,
131추가: confirmed: bool,
132추가: targets: Option<&BTreeSet<String>>,
133추가: outputs: &[(String, Disposition)],
134추가: ) -> Vec<&'static str> {
135추가: let Some(t) = terminal.filter(|_| confirmed) else {
136추가: return vec![UNCERTAIN];
137추가: };
138추가: let created = outputs
139추가: .iter()
140추가: .filter(|(_, state)| *state == Disposition::Created)
141추가: .map(|(name, _)| name.replace('\\', "/"))
142추가: .collect::<BTreeSet<_>>();
143추가: let created_reports = outputs
144추가: .iter()
145추가: .filter(|(_, state)| *state == Disposition::Created)
146추가: .count();
147추가: let uncertain = t.publication == Publication::Uncertain
148추가: || outputs
149추가: .iter()
150추가: .any(|(_, state)| *state == Disposition::CommitUncertain)
151추가: || created.len() != created_reports
152추가: || created_reports as u64 != t.created_count
153추가: || (t.publication == Publication::None && !created.is_empty());
154추가: let retained = t.retained_partial_count > 0
155추가: || outputs
156추가: .iter()
157추가: .any(|(_, state)| *state == Disposition::PartialRetained);
158추가: let mut result = Vec::new();
159추가: let mut all_saved_with_leftovers = false;
160추가: if uncertain {
161추가: result.push(UNCERTAIN);
162추가: } else if let Some(targets) = targets {
163추가: let saved = targets.intersection(&created).count();
164추가: if !targets.is_empty() && saved == targets.len() && retained {
165추가: result.push(LEFTOVERS);
166추가: all_saved_with_leftovers = true;
167추가: } else if saved > 0 && saved < targets.len() && t.outcome != Outcome::Completed {
168추가: result.push(PARTIAL);
169추가: } else if (saved == 0 && !created.is_empty())
170추가: || (retained && saved == 0)
171추가: || (t.outcome == Outcome::Completed && saved != targets.len())
172추가: {
173추가: result.push(UNCERTAIN);
174추가: }
175추가: } else {
176추가: result.push(UNCERTAIN);
177추가: }
178추가: if matches!(t.durability, Durability::Failed | Durability::Unconfirmed) {
179추가: result.push(SYNC_WARNING);
180추가: }
181추가: if (retained || t.cleanup != Cleanup::Complete) && !all_saved_with_leftovers {
182추가: result.push(CLEANUP_WARNING);
183추가: }
184추가: result
185추가: }
186추가:
187추가: pub fn definitely_unsaved(
188추가: t: Option<&Terminal>,
189추가: confirmed: bool,
190추가: outputs: &[(String, Disposition)],
191추가: ) -> bool {
192추가: t.is_some_and(|t| {
193추가: confirmed
194추가: && t.publication == Publication::None
195추가: && t.created_count == 0
196추가: && t.retained_partial_count == 0
197추가: && t.cleanup == Cleanup::Complete
198추가: && outputs
199추가: .iter()
200추가: .all(|(_, state)| *state == Disposition::Removed)
201추가: })
202추가: }
203추가:
204추가: #[derive(Clone)]
205추가: pub struct BrowserEntry {
206추가: pub path: PathBuf,
207추가: pub name: String,
208추가: pub directory: bool,
209추가: pub link: bool,
210추가: }
211추가:
212추가: pub fn directory_entries(path: &Path) -> io::Result<Vec<BrowserEntry>> {
213추가: if fs::symlink_metadata(path)?.file_type().is_symlink() {
214추가: return Err(io::Error::other("링크 폴더는 탐색하지 않음"));
215추가: }
216추가: let mut entries = Vec::new();
217추가: for item in fs::read_dir(path)? {
218추가: let item = item?;
219추가: let kind = item.file_type()?;
220추가: entries.push(BrowserEntry {
221추가: path: item.path(),
222추가: name: item.file_name().to_string_lossy().into(),
223추가: directory: kind.is_dir(),
224추가: link: kind.is_symlink(),
225추가: });
226추가: }
227추가: entries.sort_by(|a, b| {
228추가: b.directory
229추가: .cmp(&a.directory)
230추가: .then_with(|| a.name.to_lowercase().cmp(&b.name.to_lowercase()))
231추가: });
232추가: Ok(entries)
233추가: }
234추가:
235추가: pub fn home_directory() -> PathBuf {
236추가: std::env::var_os(if cfg!(windows) { "USERPROFILE" } else { "HOME" })
237추가: .map(PathBuf::from)
238추가: .filter(|p| p.is_absolute())
239추가: .unwrap_or_else(|| std::env::current_dir().unwrap_or_else(|_| PathBuf::from("/")))
240추가: }
241추가:
242추가: pub fn shortcuts() -> Vec<(String, PathBuf)> {
243추가: let home = home_directory();
244추가: let mut paths = vec![("홈".into(), home.clone())];
245추가: for (label, candidates) in [
246추가: ("바탕 화면", ["Desktop", "바탕화면"]),
247추가: ("문서", ["Documents", "문서"]),
248추가: ("다운로드", ["Downloads", "다운로드"]),
249추가: ] {
250추가: if let Some(path) = candidates
251추가: .iter()
252추가: .map(|name| home.join(name))
253추가: .find(|p| p.is_dir())
254추가: {
255추가: paths.push((label.into(), path));
256추가: }
257추가: }
258추가: #[cfg(windows)]
259추가: for drive in b'A'..=b'Z' {
260추가: let path = PathBuf::from(format!("{}:\\", drive as char));
261추가: if path.is_dir() {
262추가: paths.push((format!("{}:", drive as char), path));
263추가: }
264추가: }
265추가: paths
266추가: }
267추가:
268추가: pub fn folder_command(path: &Path) -> std::process::Command {
269추가: let mut command = std::process::Command::new(if cfg!(windows) {
270추가: "explorer"
271추가: } else {
272추가: "xdg-open"
273추가: });
274추가: command.arg(path);
275추가: command
276추가: }
277추가:
278추가: pub const UNCONFIRMED_FINISH: &str =
279추가: "작업이 정상적으로 끝났는지 확인하지 못했습니다. 풀 위치 폴더를 확인하세요";
280추가:
281추가: pub fn client_error_text(error: &str) -> &'static str {
282추가: if error.starts_with("작업자 종료 결과를 확인할 수 없습니다") {
283추가: UNCONFIRMED_FINISH
284추가: } else {
285추가: INTERNAL
286추가: }
287추가: }
288추가:
289추가: pub fn activity_text(model: &Model, creating: bool) -> &'static str {
290추가: if model.terminal.is_some()
291추가: || matches!(
292추가: model.cancel,
293추가: Some(CancelStatus::TooLate | CancelStatus::Finished)
294추가: )
295추가: {
296추가: "마무리하는 중"
297추가: } else if model.cancellation_requested() || model.cancel.is_some() {
298추가: "취소하는 중..."
299추가: } else if model.challenge.is_some() {
300추가: "암호를 입력하세요"
301추가: } else {
302추가: model
303추가: .progress
304추가: .map_or("압축파일을 읽는 중", |(stage, _, _, _)| {
305추가: progress_text(stage, creating)
306추가: })
307추가: }
308추가: }
수정experiments/rust-ui-memory-app/src/archive_screen.rs

Diff가 표시 한도를 넘어서 생략했어요.

Raw로 열기
추가experiments/rust-ui-memory-app/src/archive_theme.rs+278-0
@@ -0,0 +1,278 @@
1추가: use eframe::egui::{self, Color32, FontId, Stroke, TextStyle};
2추가:
3추가: pub const BACKGROUND: Color32 = Color32::from_rgb(247, 248, 250);
4추가: pub const PANEL: Color32 = Color32::WHITE;
5추가: pub const STRIPE: Color32 = Color32::from_rgb(243, 245, 248);
6추가: pub const BORDER: Color32 = Color32::from_rgb(217, 222, 229);
7추가: pub const TEXT: Color32 = Color32::from_rgb(31, 41, 51);
8추가: pub const MUTED: Color32 = Color32::from_rgb(91, 102, 115);
9추가: pub const BLUE: Color32 = Color32::from_rgb(37, 99, 235);
10추가: pub const BLUE_HOVER: Color32 = Color32::from_rgb(29, 78, 216);
11추가: pub const BLUE_ACTIVE: Color32 = Color32::from_rgb(30, 64, 175);
12추가: pub const SELECTED: Color32 = Color32::from_rgb(232, 240, 254);
13추가: pub const DROP: Color32 = Color32::from_rgb(238, 244, 255);
14추가: pub const DASH: Color32 = Color32::from_rgb(170, 180, 192);
15추가: pub const SUCCESS: Color32 = Color32::from_rgb(21, 128, 61);
16추가: pub const SUCCESS_BG: Color32 = Color32::from_rgb(232, 245, 236);
17추가: pub const WARNING: Color32 = Color32::from_rgb(180, 83, 9);
18추가: pub const WARNING_BG: Color32 = Color32::from_rgb(255, 247, 232);
19추가: pub const ERROR: Color32 = Color32::from_rgb(185, 28, 28);
20추가: pub const ERROR_BG: Color32 = Color32::from_rgb(253, 237, 237);
21추가: pub const FOLDER: Color32 = Color32::from_rgb(224, 165, 38);
22추가: pub const FILE: Color32 = Color32::from_rgb(123, 135, 148);
23추가: pub const SPACE: f32 = 8.0;
24추가: pub const PAD: i8 = 16;
25추가: pub const ROW: f32 = 32.0;
26추가: pub const BUTTON: f32 = 40.0;
27추가: pub const BODY: f32 = 15.0;
28추가: pub const TITLE: f32 = 22.0;
29추가:
30추가: pub fn apply(ctx: &egui::Context) {
31추가: ctx.set_theme(egui::Theme::Light);
32추가: ctx.set_visuals(egui::Visuals::light());
33추가: ctx.style_mut_of(egui::Theme::Light, |style| {
34추가: style
35추가: .text_styles
36추가: .insert(TextStyle::Body, FontId::proportional(BODY));
37추가: style
38추가: .text_styles
39추가: .insert(TextStyle::Button, FontId::proportional(BODY));
40추가: style
41추가: .text_styles
42추가: .insert(TextStyle::Small, FontId::proportional(BODY));
43추가: style
44추가: .text_styles
45추가: .insert(TextStyle::Heading, FontId::proportional(TITLE));
46추가: style.visuals.override_text_color = Some(TEXT);
47추가: style.visuals.panel_fill = BACKGROUND;
48추가: style.visuals.window_fill = PANEL;
49추가: style.visuals.extreme_bg_color = PANEL;
50추가: style.visuals.faint_bg_color = STRIPE;
51추가: style.visuals.selection.bg_fill = SELECTED;
52추가: style.visuals.selection.stroke = Stroke::new(2.0, BLUE);
53추가: style.visuals.widgets.inactive.bg_fill = PANEL;
54추가: style.visuals.widgets.inactive.weak_bg_fill = PANEL;
55추가: style.visuals.widgets.inactive.bg_stroke = Stroke::new(1.0, BORDER);
56추가: style.visuals.widgets.hovered.bg_fill = DROP;
57추가: style.visuals.widgets.hovered.weak_bg_fill = DROP;
58추가: style.visuals.widgets.hovered.bg_stroke = Stroke::new(1.0, BLUE);
59추가: style.visuals.widgets.active.bg_stroke = Stroke::new(2.0, BLUE);
60추가: for widget in [
61추가: &mut style.visuals.widgets.inactive,
62추가: &mut style.visuals.widgets.hovered,
63추가: &mut style.visuals.widgets.active,
64추가: &mut style.visuals.widgets.noninteractive,
65추가: ] {
66추가: widget.corner_radius = egui::CornerRadius::same(6);
67추가: widget.fg_stroke = Stroke::new(1.5, TEXT);
68추가: }
69추가: style.visuals.window_corner_radius = egui::CornerRadius::same(8);
70추가: style.spacing.item_spacing = egui::vec2(SPACE, SPACE);
71추가: style.spacing.button_padding = egui::vec2(16.0, SPACE);
72추가: style.spacing.interact_size.y = ROW;
73추가: style.spacing.window_margin = egui::Margin::same(PAD);
74추가: style.visuals.disabled_alpha = 0.4;
75추가: });
76추가: }
77추가:
78추가: pub fn focus(response: &egui::Response) {
79추가: if response.has_focus() {
80추가: response.ctx.layer_painter(response.layer_id).rect_stroke(
81추가: response.rect.expand(2.0),
82추가: 6,
83추가: Stroke::new(2.0, BLUE),
84추가: egui::StrokeKind::Outside,
85추가: );
86추가: }
87추가: }
88추가:
89추가: pub fn action(ui: &mut egui::Ui, text: &str, primary: bool, enabled: bool) -> egui::Response {
90추가: let response = ui
91추가: .scope(|ui| {
92추가: if primary {
93추가: let style = ui.style_mut();
94추가: style.visuals.widgets.inactive.bg_fill = BLUE;
95추가: style.visuals.widgets.inactive.weak_bg_fill = BLUE;
96추가: style.visuals.widgets.hovered.bg_fill = BLUE_HOVER;
97추가: style.visuals.widgets.hovered.weak_bg_fill = BLUE_HOVER;
98추가: style.visuals.widgets.active.bg_fill = BLUE_ACTIVE;
99추가: style.visuals.widgets.active.weak_bg_fill = BLUE_ACTIVE;
100추가: }
101추가: ui.add_enabled(
102추가: enabled,
103추가: egui::Button::new(egui::RichText::new(text).strong().color(if primary {
104추가: PANEL
105추가: } else if text == "취소" {
106추가: ERROR
107추가: } else {
108추가: TEXT
109추가: }))
110추가: .min_size(egui::vec2(
111추가: if primary { 112.0 } else { 0.0 },
112추가: if primary { BUTTON } else { 36.0 },
113추가: ))
114추가: .stroke(Stroke::new(1.0, if primary { BLUE } else { BORDER })),
115추가: )
116추가: })
117추가: .inner;
118추가: focus(&response);
119추가: response
120추가: }
121추가:
122추가: pub fn panel(fill: Color32) -> egui::Frame {
123추가: egui::Frame::new()
124추가: .fill(fill)
125추가: .inner_margin(egui::Margin::same(PAD))
126추가: .corner_radius(8)
127추가: }
128추가:
129추가: #[derive(Clone, Copy)]
130추가: pub enum Icon {
131추가: File,
132추가: Folder,
133추가: Archive,
134추가: Lock,
135추가: Success,
136추가: Warning,
137추가: Error,
138추가: }
139추가:
140추가: pub fn icon(ui: &mut egui::Ui, kind: Icon, size: f32) {
141추가: let (rect, _) = ui.allocate_exact_size(egui::vec2(size, size), egui::Sense::hover());
142추가: let p = ui.painter();
143추가: let color = match kind {
144추가: Icon::Folder => FOLDER,
145추가: Icon::Archive => BLUE,
146추가: Icon::Lock | Icon::Warning => WARNING,
147추가: Icon::Success => SUCCESS,
148추가: Icon::Error => ERROR,
149추가: Icon::File => FILE,
150추가: };
151추가: let s = Stroke::new(if size > 32.0 { 2.5 } else { 1.5 }, color);
152추가: let point = |x, y| rect.min + egui::vec2(x * size, y * size);
153추가: let box_at = |x, y, w, h| egui::Rect::from_min_max(point(x, y), point(x + w, y + h));
154추가: match kind {
155추가: Icon::Folder => {
156추가: p.rect_filled(box_at(0.08, 0.22, 0.42, 0.22), 2, color);
157추가: p.rect_filled(box_at(0.08, 0.34, 0.84, 0.50), 2, color);
158추가: }
159추가: Icon::File | Icon::Archive => {
160추가: p.rect_stroke(
161추가: box_at(0.19, 0.08, 0.62, 0.84),
162추가: 2,
163추가: s,
164추가: egui::StrokeKind::Inside,
165추가: );
166추가: p.line_segment([point(0.60, 0.08), point(0.60, 0.30)], s);
167추가: p.line_segment([point(0.60, 0.30), point(0.81, 0.30)], s);
168추가: if matches!(kind, Icon::Archive) {
169추가: for y in [0.42, 0.57, 0.72] {
170추가: p.line_segment([point(0.39, y), point(0.59, y)], s);
171추가: }
172추가: }
173추가: }
174추가: Icon::Lock => {
175추가: p.circle_stroke(point(0.50, 0.35), size * 0.23, s);
176추가: p.rect_filled(box_at(0.18, 0.39, 0.64, 0.47), 2, color);
177추가: }
178추가: Icon::Success | Icon::Error => {
179추가: p.circle_stroke(rect.center(), size * 0.40, s);
180추가: if matches!(kind, Icon::Success) {
181추가: p.line_segment([point(0.28, 0.50), point(0.44, 0.66)], s);
182추가: p.line_segment([point(0.44, 0.66), point(0.74, 0.33)], s);
183추가: } else {
184추가: p.line_segment([point(0.34, 0.34), point(0.66, 0.66)], s);
185추가: p.line_segment([point(0.66, 0.34), point(0.34, 0.66)], s);
186추가: }
187추가: }
188추가: Icon::Warning => {
189추가: p.add(egui::Shape::closed_line(
190추가: vec![point(0.50, 0.08), point(0.94, 0.86), point(0.06, 0.86)],
191추가: s,
192추가: ));
193추가: p.line_segment([point(0.50, 0.32), point(0.50, 0.57)], s);
194추가: p.circle_filled(point(0.50, 0.73), size * 0.035, color);
195추가: }
196추가: }
197추가: }
198추가:
199추가: pub fn column_label(
200추가: ui: &mut egui::Ui,
201추가: text: impl Into<egui::WidgetText>,
202추가: width: f32,
203추가: align: egui::Align,
204추가: ) -> egui::Response {
205추가: let layout = if align == egui::Align::Max {
206추가: egui::Layout::right_to_left(egui::Align::Center)
207추가: } else {
208추가: egui::Layout::left_to_right(egui::Align::Center)
209추가: };
210추가: ui.allocate_ui_with_layout(egui::vec2(width, ROW), layout, |ui| {
211추가: ui.set_min_width(width);
212추가: ui.set_max_width(width);
213추가: ui.add(egui::Label::new(text).truncate())
214추가: })
215추가: .inner
216추가: }
217추가:
218추가: pub fn action_pair(
219추가: ui: &mut egui::Ui,
220추가: secondary: &str,
221추가: primary: Option<(&str, bool)>,
222추가: ) -> (bool, bool) {
223추가: let text_width = |text: &str| {
224추가: ui.painter()
225추가: .layout_no_wrap(text.into(), FontId::proportional(BODY), TEXT)
226추가: .size()
227추가: .x
228추가: };
229추가: let width = text_width(secondary)
230추가: + 32.0
231추가: + primary.map_or(0.0, |(label, _)| {
232추가: SPACE + (text_width(label) + 32.0).max(112.0)
233추가: });
234추가: ui.horizontal(|ui| {
235추가: ui.with_layout(egui::Layout::left_to_right(egui::Align::Center), |ui| {
236추가: ui.add_space((ui.available_width() - width).max(0.0));
237추가: let secondary = action(ui, secondary, false, true).clicked();
238추가: let primary = primary.is_some_and(|(label, enabled)| {
239추가: action(ui, label, true, enabled)
240추가: .on_disabled_hover_text(match label {
241추가: "만들기" => "묶을 파일이나 폴더를 추가하세요",
242추가: "다른 폴더에 풀기" => "기존 풀 위치 폴더를 먼저 확인하세요",
243추가: _ => "입력한 내용을 확인하세요",
244추가: })
245추가: .clicked()
246추가: });
247추가: (secondary, primary)
248추가: })
249추가: .inner
250추가: })
251추가: .inner
252추가: }
253추가:
254추가: pub fn indeterminate(ui: &mut egui::Ui) {
255추가: let (rect, response) = ui.allocate_exact_size(
256추가: egui::vec2(ui.available_width(), SPACE * 2.0),
257추가: egui::Sense::hover(),
258추가: );
259추가: ui.painter().rect_filled(rect, 8, BORDER);
260추가: let phase = if ui.style().animation_time > 0.0 {
261추가: ui.input(|i| (i.time * 0.6).fract()) as f32
262추가: } else {
263추가: 0.5
264추가: };
265추가: let width = (SPACE * 8.0).min(rect.width());
266추가: let pulse = egui::Rect::from_min_size(
267추가: rect.min + egui::vec2((rect.width() - width) * phase, 0.0),
268추가: egui::vec2(width, rect.height()),
269추가: );
270추가: ui.painter().rect_filled(pulse, 8, BLUE);
271추가: response.widget_info(|| {
272추가: egui::WidgetInfo::labeled(
273추가: egui::Role::ProgressIndicator,
274추가: ui.is_enabled(),
275추가: "전체 크기를 알 수 없는 작업 진행 중",
276추가: )
277추가: });
278추가: }
수정experiments/rust-ui-memory-app/src/archive_ui.rs+5-0
@@ -280,6 +280,11 @@ impl Model {
280280 pub fn busy(&self) -> bool {
281281 self.running.is_some()
282282 }
283추가: pub fn cancellation_requested(&self) -> bool {
284추가: self.running
285추가: .as_ref()
286추가: .is_some_and(|run| run.cancel_sequence.is_some())
287추가: }
283288 pub fn job_id(&self) -> Option<u64> {
284289 self.running.as_ref().map(|r| r.id)
285290 }
수정experiments/rust-ui-memory-app/src/desktop.rs+2-18
@@ -7,7 +7,7 @@ mod fake;
77mod renderer;
88#[path = "system_font.rs"]
99mod system_font;
10삭제: use eframe::egui::{self, Color32, FontData, FontDefinitions, FontFamily, FontId, TextStyle};
10추가: use eframe::egui::{self, FontData, FontDefinitions, FontFamily};
1111fn main() -> eframe::Result {
1212 let result = run();
1313 #[cfg(target_os = "windows")]
@@ -63,23 +63,7 @@ fn run() -> eframe::Result {
6363 .families
6464 .insert(FontFamily::Proportional, vec!["noto-kr".into()]);
6565 cc.egui_ctx.set_fonts(fonts);
66삭제: cc.egui_ctx.set_visuals(egui::Visuals::light());
67삭제: cc.egui_ctx.style_mut_of(egui::Theme::Light, |style| {
68삭제: style
69삭제: .text_styles
70삭제: .insert(TextStyle::Body, FontId::proportional(18.0));
71삭제: style
72삭제: .text_styles
73삭제: .insert(TextStyle::Button, FontId::proportional(18.0));
74삭제: style
75삭제: .text_styles
76삭제: .insert(TextStyle::Heading, FontId::proportional(26.0));
77삭제: style.visuals.panel_fill = Color32::WHITE;
78삭제: style.visuals.override_text_color = Some(Color32::from_rgb(24, 39, 57));
79삭제: style.visuals.selection.bg_fill = Color32::from_rgb(211, 230, 246);
80삭제: style.spacing.item_spacing = egui::vec2(12.0, 10.0);
81삭제: style.spacing.button_padding = egui::vec2(14.0, 10.0);
82삭제: });
66추가: zipelo_ui_memory_app::archive_theme::apply(&cc.egui_ctx);
8367 let (fixture, startup) = zipelo_ui_memory_app::archive_ui::launch_args(
8468 std::env::args_os().skip(1).collect(),
8569 std::env::current_dir()?,
수정experiments/rust-ui-memory-app/src/lib.rs+7-0
@@ -11,3 +11,10 @@ pub mod archive_ui;
1111pub mod archive_screen;
1212
1313pub mod archive_process;
14추가:
15추가: pub mod archive_present;
16추가:
17추가: #[cfg(feature = "ui")]
18추가: pub mod archive_picker;
19추가: #[cfg(feature = "ui")]
20추가: pub mod archive_theme;
수정tests/rust-app-real-worker/flows.rs+26-15
@@ -230,9 +230,17 @@ mod screen {
230230 let point = self.locate(label);
231231 self.click_at(point);
232232 }
233삭제: fn fill(&mut self, label: &str, offset: egui::Vec2, value: &Path) {
234삭제: let point = self.locate(label) + offset;
233추가: fn set_text(&mut self, id: &str, value: &str) {
234추가: self.render(vec![]);
235추가: let point = self
236추가: .context
237추가: .read_response(egui::Id::unique(id))
238추가: .unwrap()
239추가: .rect
240추가: .center();
235241 self.click_at(point);
242추가: self.context
243추가: .memory_mut(|memory| memory.request_focus(egui::Id::unique(id)));
236244 self.render(vec![
237245 egui::Event::Key {
238246 key: egui::Key::A,
@@ -241,9 +249,18 @@ mod screen {
241249 repeat: false,
242250 modifiers: egui::Modifiers::COMMAND,
243251 },
244삭제: egui::Event::Text(value.to_str().unwrap().to_string()),
252추가: egui::Event::Text(value.into()),
245253 ]);
246254 }
255추가: fn escape(&mut self) {
256추가: self.render(vec![egui::Event::Key {
257추가: key: egui::Key::Escape,
258추가: physical_key: None,
259추가: pressed: true,
260추가: repeat: false,
261추가: modifiers: egui::Modifiers::NONE,
262추가: }]);
263추가: }
247264 fn settle(&mut self) {
248265 let deadline = Instant::now() + Duration::from_secs(10);
249266 while self.app.model.busy() {
@@ -254,14 +271,12 @@ mod screen {
254271 completed(&self.app.model);
255272 }
256273 fn open(&mut self, archive: &Path) {
257삭제: self.click("파일 열기");
258삭제: self.fill("압축파일 절대 경로", egui::vec2(0.0, 22.0), archive);
259삭제: self.click("열기");
274추가: self.app.open_path(archive.to_path_buf());
260275 assert!(self.app.model.busy());
261276 self.settle();
262277 }
263278 fn extract(&mut self, destination: &Path) {
264삭제: self.fill("출력 폴더", egui::vec2(100.0, 0.0), destination);
279추가: self.app.choose_destination(destination.to_path_buf());
265280 self.click("풀기");
266281 assert!(self.app.model.busy());
267282 self.settle();
@@ -345,14 +360,10 @@ mod screen {
345360 let output = make_directory(&scratch.path("output"));
346361 let (factory, observed) = observed_factory();
347362 let mut screen = Screen::new(factory);
348삭제: screen.click("ZIP 만들기");
349삭제: screen.fill(
350삭제: "원본 파일 절대 경로 / 한 줄에 하나",
351삭제: egui::vec2(0.0, 25.0),
352삭제: &source,
353삭제: );
354삭제: screen.fill("저장할 ZIP 절대 경로", egui::vec2(0.0, 22.0), &archive);
355삭제: screen.click("ZIP 만들기");
363추가: screen.app.add_sources(vec![source.clone()]);
364추가: screen.render(vec![]);
365추가: screen.set_text("zip-name", archive.file_name().unwrap().to_str().unwrap());
366추가: screen.click("만들기");
356367 assert!(screen.app.model.busy());
357368 screen.settle();
358369 assert!(archive.is_file());
수정tests/rust-app-real-worker/password_flows.rs+22-35
@@ -30,7 +30,7 @@ impl Screen {
3030 self.render(vec![]);
3131 let input = self
3232 .context
33삭제: .read_response(egui::Id::new("archive-password-input"))
33추가: .read_response(egui::Id::unique("archive-password-input"))
3434 .expect("암호 입력란이 없음")
3535 .rect
3636 .center();
@@ -48,10 +48,13 @@ impl Screen {
4848 if !text.is_empty() {
4949 assert!(!rendered.iter().any(|(value, _)| value.contains(text)));
5050 }
51삭제: self.click("암호 전달");
51추가: if self.app.model.challenge.is_some_and(|(_, _, encrypt)| encrypt) {
52추가: self.set_text("archive-password-confirm", text);
53추가: }
54추가: self.click("확인");
5255 }
5356 fn start_password_extract(&mut self, output: &Path) {
54삭제: self.fill("출력 폴더", egui::vec2(100.0, 0.0), output);
57추가: self.app.choose_destination(output.to_path_buf());
5558 self.click("풀기");
5659 assert!(self.app.model.busy());
5760 }
@@ -67,15 +70,11 @@ impl Screen {
6770 assert!(self.app.model.challenge.is_none());
6871 }
6972 fn start_encrypted_zip(&mut self, source: &Path, archive: &Path) {
70삭제: self.click("ZIP 만들기");
71삭제: self.fill(
72삭제: "원본 파일 절대 경로 / 한 줄에 하나",
73삭제: egui::vec2(0.0, 25.0),
74삭제: source,
75삭제: );
76삭제: self.fill("저장할 ZIP 절대 경로", egui::vec2(0.0, 22.0), archive);
77삭제: self.click("암호로 보호");
78삭제: self.click("ZIP 만들기");
73추가: self.app.add_sources(vec![source.to_path_buf()]);
74추가: self.render(vec![]);
75추가: self.set_text("zip-name", archive.file_name().unwrap().to_str().unwrap());
76추가: self.click("암호로 보호하기");
77추가: self.click("만들기");
7978 assert!(self.app.model.busy(), "{}", self.app.model.status());
8079 }
8180}
@@ -131,17 +130,9 @@ fn wrong_password_retry_clears_input_and_succeeds_without_partial_output() {
131130 .iter()
132131 .any(|(value, _)| value == "암호가 맞지 않습니다. 다시 입력하세요")
133132 );
134삭제: screen.click("암호 전달");
133추가: screen.click("확인");
135134 assert_eq!(screen.app.model.challenge, Some((second, 2, false)));
136삭제: assert!(
137삭제: screen
138삭제: .app
139삭제: .model
140삭제: .input_error
141삭제: .as_ref()
142삭제: .unwrap()
143삭제: .contains("1~1024바이트")
144삭제: );
135추가: assert!(screen.app.model.input_error.is_none());
145136 screen.render(vec![]);
146137 screen.password_answer(FIXTURE_PASSWORD);
147138 screen.finish_password_job(Outcome::Completed);
@@ -181,7 +172,7 @@ fn cancel_password_extraction_waits_for_cleanup_without_writes() {
181172 screen.open(&archive);
182173 screen.start_password_extract(&output);
183174 screen.password_request(1, false);
184삭제: screen.click("작업 취소");
175추가: screen.escape();
185176 screen.app.model.request_close();
186177 screen.app.model.confirm_close();
187178 assert!(matches!(
@@ -234,7 +225,7 @@ fn cancel_password_creation_does_not_create_an_archive() {
234225 let mut screen = Screen::new(factory);
235226 screen.start_encrypted_zip(&source, &archive);
236227 screen.password_request(1, true);
237삭제: screen.click("작업 취소");
228추가: screen.escape();
238229 screen.finish_password_job(Outcome::Cancelled);
239230 assert!(!archive.exists());
240231 assert_eq!(fs::read(source).unwrap(), b"preserve");
@@ -254,15 +245,7 @@ fn oversized_utf8_password_stays_in_dialog_then_accepts_valid_input() {
254245 let id = screen.password_request(1, false);
255246 screen.password_answer(&"가".repeat(342));
256247 assert_eq!(screen.app.model.challenge, Some((id, 1, false)));
257삭제: assert!(
258삭제: screen
259삭제: .app
260삭제: .model
261삭제: .input_error
262삭제: .as_ref()
263삭제: .unwrap()
264삭제: .contains("1~1024바이트")
265삭제: );
248추가: assert!(screen.render(vec![]).iter().any(|(text, _)| text.contains("1~1024바이트")));
266249 assert_eq!(fs::read_dir(&output).unwrap().count(), 0);
267250 screen.password_answer(FIXTURE_PASSWORD);
268251 screen.finish_password_job(Outcome::Completed);
@@ -280,14 +263,18 @@ fn invalid_password_then_cancel(invalid: &str, close: bool) {
280263 let challenge = screen.password_request(1, true);
281264 screen.password_answer(invalid);
282265 assert_eq!(screen.app.model.challenge, Some((challenge, 1, true)));
283삭제: assert!(screen.app.model.status().contains("1~1024바이트"));
266추가: if invalid.is_empty() {
267추가: assert!(screen.app.model.input_error.is_none());
268추가: } else {
269추가: assert!(screen.render(vec![]).iter().any(|(text, _)| text.contains("1~1024바이트")));
270추가: }
284271 if close {
285272 screen.app.model.request_close();
286273 screen.app.model.confirm_close();
287274 assert_eq!(screen.app.model.close, Close::Waiting);
288275 assert!(!screen.app.model.confirmed);
289276 } else {
290삭제: screen.click("작업 취소");
277추가: screen.escape();
291278 }
292279 screen.finish_password_job(Outcome::Cancelled);
293280 assert_eq!(screen.app.model.status(), "작업 취소됨");
추가tests/rust-app-ui/capture.rs+335-0
@@ -0,0 +1,335 @@
1추가: use eframe::egui::{self, FontData, FontDefinitions, FontFamily, FontId, TextStyle};
2추가: use std::{collections::VecDeque, path::PathBuf};
3추가: use zipelo_ui_memory_app::{archive_screen::ArchiveApp, archive_ui::*};
4추가: #[path = "../../experiments/rust-ui-memory-app/src/renderer.rs"]
5추가: mod renderer;
6추가: #[path = "../../experiments/rust-ui-memory-app/src/system_font.rs"]
7추가: mod system_font;
8추가:
9추가: #[derive(Clone)]
10추가: struct CaptureFactory {
11추가: mode: String,
12추가: }
13추가: struct CaptureConnection {
14추가: job: u64,
15추가: sequence: u64,
16추가: mode: String,
17추가: queue: VecDeque<HostEvent>,
18추가: create_name: Option<String>,
19추가: }
20추가: impl CaptureConnection {
21추가: fn event(&mut self, event: Event) {
22추가: self.queue.push_back(HostEvent::Frame {
23추가: job_id: self.job,
24추가: sequence: self.sequence,
25추가: event,
26추가: });
27추가: self.sequence += 1;
28추가: }
29추가: fn terminal(&mut self, terminal: Terminal) {
30추가: self.event(Event::Terminal(terminal));
31추가: self.queue.extend([
32추가: HostEvent::StdoutEof,
33추가: HostEvent::StderrEof,
34추가: HostEvent::Exited { success: true },
35추가: ]);
36추가: }
37추가: fn finish(&mut self, listing: bool) {
38추가: let error = !listing && self.mode == "error";
39추가: let cancelled = !listing && self.mode == "cancelled";
40추가: let mut count = 0;
41추가: if !listing && !error && !cancelled {
42추가: let names = self
43추가: .create_name
44추가: .clone()
45추가: .map(|name| vec![name])
46추가: .unwrap_or_else(|| {
47추가: vec![
48추가: "읽어주세요.txt".into(),
49추가: "여행 일정.pdf".into(),
50추가: "사진".into(),
51추가: ]
52추가: });
53추가: for name in names {
54추가: self.event(Event::Output {
55추가: entry_id: None,
56추가: relative_name: name,
57추가: disposition: Disposition::Created,
58추가: });
59추가: count += 1;
60추가: }
61추가: }
62추가: self.terminal(Terminal {
63추가: outcome: if error {
64추가: Outcome::Failed
65추가: } else if cancelled {
66추가: Outcome::Cancelled
67추가: } else {
68추가: Outcome::Completed
69추가: },
70추가: error: error.then_some(ErrorCode::DiskFull),
71추가: publication: if listing || error || cancelled {
72추가: Publication::None
73추가: } else {
74추가: Publication::Complete
75추가: },
76추가: created_count: count,
77추가: retained_partial_count: 0,
78추가: durability: if listing {
79추가: Durability::NotApplicable
80추가: } else {
81추가: Durability::Synced
82추가: },
83추가: cleanup: Cleanup::Complete,
84추가: });
85추가: }
86추가: }
87추가: fn entries() -> Vec<Entry> {
88추가: vec![
89추가: Entry {
90추가: id: 0,
91추가: name: "읽어주세요.txt".into(),
92추가: kind: Kind::File,
93추가: bytes: Some(4096),
94추가: packed: Some(1800),
95추가: encrypted: false,
96추가: },
97추가: Entry {
98추가: id: 1,
99추가: name: "여행 일정.pdf".into(),
100추가: kind: Kind::File,
101추가: bytes: Some(1_287_952),
102추가: packed: Some(900_000),
103추가: encrypted: true,
104추가: },
105추가: Entry {
106추가: id: 2,
107추가: name: "사진".into(),
108추가: kind: Kind::Directory,
109추가: bytes: Some(0),
110추가: packed: None,
111추가: encrypted: false,
112추가: },
113추가: ]
114추가: }
115추가: impl Factory for CaptureFactory {
116추가: fn connect(&mut self, job: u64) -> Result<Box<dyn Connection>, String> {
117추가: Ok(Box::new(CaptureConnection {
118추가: job,
119추가: sequence: 0,
120추가: mode: self.mode.clone(),
121추가: queue: VecDeque::new(),
122추가: create_name: None,
123추가: }))
124추가: }
125추가: }
126추가: impl Connection for CaptureConnection {
127추가: fn send(&mut self, request: Request) -> Result<(), String> {
128추가: match request.command {
129추가: Command::Start(start) => {
130추가: self.event(Event::Accepted { encryption: true });
131추가: match start {
132추가: Start::List { .. } => {
133추가: for entry in entries() {
134추가: self.event(Event::Entry(entry));
135추가: }
136추가: self.event(Event::ListEnd {
137추가: entry_count: 3,
138추가: list_id: ListId {
139추가: catalog_version: 1,
140추가: format: Format::Zip,
141추가: source_object: SourceObject::Unix {
142추가: device: 1,
143추가: inode: 1,
144추가: },
145추가: archive_bytes: 902000,
146추가: archive_sha256: [7; 32],
147추가: },
148추가: });
149추가: self.finish(true);
150추가: }
151추가: Start::Extract { .. } => {
152추가: if self.mode.starts_with("password") {
153추가: self.event(Event::PasswordRequired {
154추가: challenge_id: 17,
155추가: attempt: if self.mode == "password-retry" { 2 } else { 1 },
156추가: encrypt: false,
157추가: });
158추가: } else if self.mode.starts_with("progress") || self.mode == "cancelling" {
159추가: self.event(Event::Progress {
160추가: stage: Stage::Decode,
161추가: processed: 38 << 20,
162추가: total: (self.mode != "progress-unknown").then_some(61 << 20),
163추가: completed_entries: 12,
164추가: });
165추가: } else {
166추가: self.finish(false);
167추가: }
168추가: }
169추가: Start::CreateZip {
170추가: output_file,
171추가: aes256,
172추가: ..
173추가: } => {
174추가: self.create_name =
175추가: Some(output_file.file_name().unwrap().to_string_lossy().into());
176추가: if aes256 {
177추가: self.event(Event::PasswordRequired {
178추가: challenge_id: 17,
179추가: attempt: 1,
180추가: encrypt: true,
181추가: });
182추가: } else {
183추가: self.finish(false);
184추가: }
185추가: }
186추가: }
187추가: }
188추가: Command::Password { .. } => self.finish(false),
189추가: Command::Cancel => {
190추가: self.event(Event::CancelAck {
191추가: request_sequence: request.sequence,
192추가: status: CancelStatus::Requested,
193추가: });
194추가: if self.mode != "cancelling" {
195추가: self.terminal(Terminal {
196추가: outcome: Outcome::Cancelled,
197추가: error: None,
198추가: publication: Publication::None,
199추가: created_count: 0,
200추가: retained_partial_count: 0,
201추가: durability: Durability::NotApplicable,
202추가: cleanup: Cleanup::Complete,
203추가: });
204추가: }
205추가: }
206추가: }
207추가: Ok(())
208추가: }
209추가: fn poll(&mut self) -> Option<HostEvent> {
210추가: self.queue.pop_front()
211추가: }
212추가: }
213추가: struct Capture {
214추가: app: ArchiveApp,
215추가: mode: String,
216추가: factory: CaptureFactory,
217추가: triggered: bool,
218추가: }
219추가: impl eframe::App for Capture {
220추가: fn ui(&mut self, root: &mut egui::Ui, _: &mut eframe::Frame) {
221추가: if self.mode == "hover" {
222추가: root.ctx().input_mut(|i| {
223추가: i.raw.hovered_files = vec![egui::HoveredFile {
224추가: path: Some(PathBuf::from("여행.zip")),
225추가: ..Default::default()
226추가: }]
227추가: });
228추가: }
229추가: if !self.triggered && self.app.model.list_id.is_some() {
230추가: self.triggered = true;
231추가: if [
232추가: "password",
233추가: "password-retry",
234추가: "password-create",
235추가: "progress",
236추가: "progress-unknown",
237추가: "cancelling",
238추가: "success",
239추가: "error",
240추가: "cancelled",
241추가: ]
242추가: .contains(&self.mode.as_str())
243추가: {
244추가: let archive = self.app.model.archive.clone().unwrap();
245추가: let start = if self.mode == "password-create" {
246추가: Start::CreateZip {
247추가: sources: vec![(archive.clone(), "자료".into())],
248추가: output_file: archive.with_file_name("보호한 자료.zip"),
249추가: method: Method::Deflate,
250추가: aes256: true,
251추가: }
252추가: } else {
253추가: Start::Extract {
254추가: archive,
255추가: destination: std::env::current_dir().unwrap(),
256추가: selection: Selection::All,
257추가: list_id: self.app.model.list_id.clone().unwrap(),
258추가: gzip_output_name: None,
259추가: }
260추가: };
261추가: // 이전 화면과 같은 공개 상태 API로 암호 및 진행 상태를 재현함.
262추가: if self.mode == "password-create" {
263추가: self.app.model.begin(start, &mut self.factory);
264추가: } else {
265추가: self.app.begin_extract();
266추가: }
267추가: }
268추가: }
269추가: self.app.show(root);
270추가: root.ctx()
271추가: .request_repaint_after(std::time::Duration::from_millis(30));
272추가: }
273추가: }
274추가: fn main() -> eframe::Result {
275추가: let mode = std::env::args().nth(1).unwrap_or_else(|| "empty".into());
276추가: let base = std::env::current_dir()
277추가: .unwrap()
278추가: .join("tests/ui-redesign/runs/fixtures");
279추가: std::fs::create_dir_all(&base).unwrap();
280추가: std::fs::write(base.join("읽어주세요.txt"), "화면 검증 입력").unwrap();
281추가: std::fs::create_dir_all(base.join("사진")).unwrap();
282추가: let font = system_font::load().map_err(|e| eframe::Error::AppCreation(Box::new(e)))?;
283추가: let title = format!("Zipelo UI capture {mode}");
284추가: renderer::run_native(
285추가: &title,
286추가: eframe::NativeOptions {
287추가: viewport: egui::ViewportBuilder::default()
288추가: .with_inner_size([1060.0, 720.0])
289추가: .with_min_inner_size([760.0, 540.0]),
290추가: ..Default::default()
291추가: },
292추가: || {
293추가: let mode = mode.clone();
294추가: let base = base.clone();
295추가: let bytes = font.bytes.clone();
296추가: let face_index = font.face_index;
297추가: Box::new(move |cc| {
298추가: let mut fonts = FontDefinitions::empty();
299추가: let mut data = FontData::from_owned(bytes.clone());
300추가: data.index = face_index;
301추가: fonts.font_data.insert("noto-kr".into(), data.into());
302추가: fonts
303추가: .families
304추가: .insert(FontFamily::Proportional, vec!["noto-kr".into()]);
305추가: cc.egui_ctx.set_fonts(fonts);
306추가: cc.egui_ctx.set_visuals(egui::Visuals::light());
307추가: cc.egui_ctx.style_mut_of(egui::Theme::Light, |style| {
308추가: style
309추가: .text_styles
310추가: .insert(TextStyle::Body, FontId::proportional(18.0));
311추가: style
312추가: .text_styles
313추가: .insert(TextStyle::Button, FontId::proportional(18.0));
314추가: style
315추가: .text_styles
316추가: .insert(TextStyle::Heading, FontId::proportional(26.0));
317추가: });
318추가: let factory = CaptureFactory { mode: mode.clone() };
319추가: let startup = (!["empty", "hover", "create", "create-filled"]
320추가: .contains(&mode.as_str()))
321추가: .then(|| base.join("여행.zip"));
322추가: let mut app = ArchiveApp::new(Box::new(factory.clone()), startup, true);
323추가: if mode == "create-filled" {
324추가: app.add_sources(vec![base.join("읽어주세요.txt"), base.join("사진")]);
325추가: }
326추가: Ok(Box::new(Capture {
327추가: app,
328추가: mode,
329추가: factory,
330추가: triggered: false,
331추가: }))
332추가: })
333추가: },
334추가: )
335추가: }
추가tests/rust-app-ui/presentation.rs+762-0
@@ -0,0 +1,762 @@
1추가: use super::*;
2추가: use std::{
3추가: collections::BTreeSet,
4추가: fs,
5추가: sync::atomic::{AtomicU64, Ordering},
6추가: };
7추가: use zipelo_ui_memory_app::archive_present::*;
8추가:
9추가: fn terminal() -> Terminal {
10추가: Terminal {
11추가: outcome: Outcome::Failed,
12추가: error: Some(ErrorCode::Io),
13추가: publication: Publication::Partial,
14추가: created_count: 1,
15추가: retained_partial_count: 0,
16추가: durability: Durability::Synced,
17추가: cleanup: Cleanup::Complete,
18추가: }
19추가: }
20추가: fn targets() -> BTreeSet<String> {
21추가: ["one.txt".into(), "two.txt".into()].into_iter().collect()
22추가: }
23추가:
24추가: #[test]
25추가: fn partial_extraction_requires_matching_file_reports() {
26추가: let t = terminal();
27추가: assert_eq!(
28추가: warnings(
29추가: Some(&t),
30추가: true,
31추가: Some(&targets()),
32추가: &[("one.txt".into(), Disposition::Created)]
33추가: ),
34추가: vec![PARTIAL]
35추가: );
36추가: }
37추가: #[test]
38추가: fn all_saved_with_temporary_leftover_is_not_partial_extraction() {
39추가: let mut t = terminal();
40추가: t.retained_partial_count = 1;
41추가: t.cleanup = Cleanup::Failed;
42추가: let files = ["one.txt".into()].into_iter().collect();
43추가: assert_eq!(
44추가: warnings(
45추가: Some(&t),
46추가: true,
47추가: Some(&files),
48추가: &[
49추가: ("one.txt".into(), Disposition::Created),
50추가: ("temp".into(), Disposition::PartialRetained)
51추가: ]
52추가: ),
53추가: vec![LEFTOVERS]
54추가: );
55추가: }
56추가: #[test]
57추가: fn leftover_without_file_reports_and_commit_uncertainty_are_unknown() {
58추가: let mut t = terminal();
59추가: t.created_count = 0;
60추가: t.retained_partial_count = 1;
61추가: for outputs in [
62추가: vec![("temp".into(), Disposition::PartialRetained)],
63추가: vec![("one.txt".into(), Disposition::CommitUncertain)],
64추가: ] {
65추가: assert!(warnings(Some(&t), true, Some(&targets()), &outputs).contains(&UNCERTAIN));
66추가: assert!(!warnings(Some(&t), true, Some(&targets()), &outputs).contains(&PARTIAL));
67추가: }
68추가: }
69추가: #[test]
70추가: fn synchronization_and_cleanup_warnings_are_both_visible() {
71추가: let mut t = terminal();
72추가: t.created_count = 0;
73추가: t.durability = Durability::Unconfirmed;
74추가: t.cleanup = Cleanup::Failed;
75추가: let result = warnings(Some(&t), true, Some(&targets()), &[]);
76추가: assert!(result.contains(&SYNC_WARNING));
77추가: assert!(result.contains(&CLEANUP_WARNING));
78추가: }
79추가: #[test]
80추가: fn missing_terminal_exit_or_contradictory_reports_never_claim_unsaved() {
81추가: let mut t = terminal();
82추가: t.publication = Publication::None;
83추가: t.created_count = 0;
84추가: assert!(definitely_unsaved(Some(&t), true, &[]));
85추가: assert!(!definitely_unsaved(None, true, &[]));
86추가: assert!(!definitely_unsaved(Some(&t), false, &[]));
87추가: let reports = [("one.txt".into(), Disposition::Created)];
88추가: assert!(!definitely_unsaved(Some(&t), true, &reports));
89추가: assert!(warnings(Some(&t), true, Some(&targets()), &reports).contains(&UNCERTAIN));
90추가: }
91추가: #[test]
92추가: fn unsafe_path_and_conflict_preserve_result_classification() {
93추가: for code in [ErrorCode::UnsafePath, ErrorCode::Conflict] {
94추가: let mut t = terminal();
95추가: t.error = Some(code);
96추가: assert_eq!(
97추가: warnings(
98추가: Some(&t),
99추가: true,
100추가: Some(&targets()),
101추가: &[("one.txt".into(), Disposition::Created)]
102추가: ),
103추가: vec![PARTIAL]
104추가: );
105추가: t.publication = Publication::Uncertain;
106추가: assert!(warnings(Some(&t), true, Some(&targets()), &[]).contains(&UNCERTAIN));
107추가: t.publication = Publication::None;
108추가: t.created_count = 0;
109추가: assert!(definitely_unsaved(Some(&t), true, &[]));
110추가: }
111추가: }
112추가: #[test]
113추가: fn every_error_and_stage_has_user_facing_text() {
114추가: for code in [
115추가: ErrorCode::Integrity,
116추가: ErrorCode::UnsupportedFormat,
117추가: ErrorCode::UnsupportedFeature,
118추가: ErrorCode::WrongPassword,
119추가: ErrorCode::UnsafePath,
120추가: ErrorCode::Conflict,
121추가: ErrorCode::Limit,
122추가: ErrorCode::Io,
123추가: ErrorCode::DiskFull,
124추가: ErrorCode::Protocol,
125추가: ErrorCode::Internal,
126추가: ErrorCode::SourceChanged,
127추가: ErrorCode::InvalidRequest,
128추가: ] {
129추가: assert!(!error_text(code).is_empty());
130추가: assert!(!error_text(code).contains("작업자"));
131추가: }
132추가: assert_eq!(error_text(ErrorCode::Protocol), INTERNAL);
133추가: assert_eq!(error_text(ErrorCode::Internal), INTERNAL);
134추가: assert_eq!(progress_text(Stage::Decode, true), "압축하는 중");
135추가: assert_eq!(progress_text(Stage::Decode, false), "압축을 푸는 중");
136추가: }
137추가: #[test]
138추가: fn folder_selection_expands_only_matching_descendants() {
139추가: let entries = vec![
140추가: Entry {
141추가: id: 0,
142추가: name: "docs".into(),
143추가: kind: Kind::Directory,
144추가: bytes: None,
145추가: packed: None,
146추가: encrypted: false,
147추가: },
148추가: Entry {
149추가: id: 1,
150추가: name: "docs/one.txt".into(),
151추가: kind: Kind::File,
152추가: bytes: None,
153추가: packed: None,
154추가: encrypted: false,
155추가: },
156추가: Entry {
157추가: id: 2,
158추가: name: "docs-old/two.txt".into(),
159추가: kind: Kind::File,
160추가: bytes: None,
161추가: packed: None,
162추가: encrypted: false,
163추가: },
164추가: ];
165추가: assert_eq!(
166추가: target_files(&entries, &[0].into_iter().collect(), true, None),
167추가: Some(["docs/one.txt".into()].into_iter().collect())
168추가: );
169추가: }
170추가: #[test]
171추가: fn duplicate_names_prevent_file_completion_assumptions() {
172추가: let entry = Entry {
173추가: id: 0,
174추가: name: "same.txt".into(),
175추가: kind: Kind::File,
176추가: bytes: None,
177추가: packed: None,
178추가: encrypted: false,
179추가: };
180추가: assert!(target_files(&[entry.clone(), entry], &BTreeSet::new(), false, None).is_none());
181추가: assert_eq!(
182추가: warnings(Some(&terminal()), true, None, &[]),
183추가: vec![UNCERTAIN]
184추가: );
185추가: }
186추가: #[test]
187추가: fn default_names_and_middle_truncation_preserve_unicode() {
188추가: assert_eq!(default_destination(&path("자료.tar.gz")), path("자료"));
189추가: assert_eq!(default_destination(&path("자료.zip")), path("자료"));
190추가: assert_eq!(middle_text("가나다라마바사아자차", 7), "가나다…아자차");
191추가: assert_eq!(bytes_text(21), "21 B");
192추가: }
193추가:
194추가: static SCRATCH_ID: AtomicU64 = AtomicU64::new(0);
195추가: pub(super) struct Folder(pub(super) PathBuf);
196추가: impl Folder {
197추가: pub(super) fn new() -> Self {
198추가: let root = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../tests/rust-app-ui/runs");
199추가: fs::create_dir_all(&root).unwrap();
200추가: let path = root.join(format!(
201추가: "presentation-{}-{}",
202추가: std::process::id(),
203추가: SCRATCH_ID.fetch_add(1, Ordering::Relaxed)
204추가: ));
205추가: fs::create_dir(&path).unwrap();
206추가: Self(path.canonicalize().unwrap())
207추가: }
208추가: }
209추가: impl Drop for Folder {
210추가: fn drop(&mut self) {
211추가: fs::remove_dir_all(&self.0).unwrap();
212추가: }
213추가: }
214추가:
215추가: #[test]
216추가: fn automatic_destination_creation_and_failure_are_distinct() {
217추가: let scratch = Folder::new();
218추가: let output = scratch.0.join("output");
219추가: assert!(prepare_destination(&output, true).unwrap());
220추가: assert!(!prepare_destination(&output, true).unwrap());
221추가: assert!(prepare_destination(&scratch.0.join("missing/child"), true).is_err());
222추가: assert!(prepare_destination(&scratch.0.join("chosen-missing"), false).is_err());
223추가: let file = scratch.0.join("file");
224추가: fs::write(&file, "existing").unwrap();
225추가: assert!(prepare_destination(&file, true).is_err());
226추가: assert_eq!(fs::read_to_string(file).unwrap(), "existing");
227추가: }
228추가: #[test]
229추가: fn only_new_empty_output_is_removed_and_nonempty_is_preserved() {
230추가: let scratch = Folder::new();
231추가: let empty = scratch.0.join("empty");
232추가: assert!(prepare_destination(&empty, true).unwrap());
233추가: remove_owned_empty(&empty);
234추가: assert!(!empty.exists());
235추가: let nonempty = scratch.0.join("nonempty");
236추가: assert!(prepare_destination(&nonempty, true).unwrap());
237추가: fs::write(nonempty.join("existing"), "keep").unwrap();
238추가: remove_owned_empty(&nonempty);
239추가: assert_eq!(
240추가: fs::read_to_string(nonempty.join("existing")).unwrap(),
241추가: "keep"
242추가: );
243추가: assert!(!prepare_destination(&scratch.0, false).unwrap());
244추가: assert!(scratch.0.is_dir());
245추가: }
246추가: #[cfg(unix)]
247추가: #[test]
248추가: fn browser_and_output_do_not_follow_symbolic_links() {
249추가: let scratch = Folder::new();
250추가: let link = scratch.0.join("link");
251추가: std::os::unix::fs::symlink(&scratch.0, &link).unwrap();
252추가: let rows = directory_entries(&scratch.0).unwrap();
253추가: assert!(rows.iter().any(|entry| entry.link && entry.path == link));
254추가: assert!(directory_entries(&link).is_err());
255추가: assert!(prepare_destination(&link, true).is_err());
256추가: }
257추가:
258추가: #[cfg(feature = "ui")]
259추가: mod widgets {
260추가: use super::*;
261추가: use eframe::egui::{self, epaint::Shape};
262추가: use zipelo_ui_memory_app::{
263추가: archive_picker::{Choice, Picker, Purpose},
264추가: archive_screen::ArchiveApp,
265추가: };
266추가:
267추가: fn labels(shapes: &[egui::epaint::ClippedShape]) -> Vec<(String, egui::Pos2)> {
268추가: fn walk(shape: &Shape, result: &mut Vec<(String, egui::Pos2)>) {
269추가: match shape {
270추가: Shape::Text(text) => result.push((
271추가: text.galley.job.text.clone(),
272추가: text.pos + text.galley.rect.size() / 2.0,
273추가: )),
274추가: Shape::Vec(shapes) => {
275추가: for shape in shapes {
276추가: walk(shape, result);
277추가: }
278추가: }
279추가: _ => {}
280추가: }
281추가: }
282추가: let mut result = Vec::new();
283추가: for shape in shapes {
284추가: walk(&shape.shape, &mut result);
285추가: }
286추가: result
287추가: }
288추가: fn render(
289추가: ctx: &egui::Context,
290추가: app: &mut ArchiveApp,
291추가: events: Vec<egui::Event>,
292추가: ) -> Vec<(String, egui::Pos2)> {
293추가: let mut output = ctx.run_ui(
294추가: egui::RawInput {
295추가: screen_rect: Some(egui::Rect::from_min_size(
296추가: egui::Pos2::ZERO,
297추가: egui::vec2(760.0, 540.0),
298추가: )),
299추가: events,
300추가: ..Default::default()
301추가: },
302추가: |ui| app.show(ui),
303추가: );
304추가: output.textures_delta.clear();
305추가: labels(&output.shapes)
306추가: }
307추가: fn click(ctx: &egui::Context, app: &mut ArchiveApp, label: &str) {
308추가: render(ctx, app, vec![]);
309추가: let point = render(ctx, app, vec![])
310추가: .into_iter()
311추가: .filter(|(text, _)| text == label)
312추가: .max_by(|a, b| a.1.y.total_cmp(&b.1.y))
313추가: .unwrap_or_else(|| panic!("항목 없음: {label}"))
314추가: .1;
315추가: for pressed in [true, false] {
316추가: render(
317추가: ctx,
318추가: app,
319추가: vec![
320추가: egui::Event::PointerMoved(point),
321추가: egui::Event::PointerButton {
322추가: pos: point,
323추가: button: egui::PointerButton::Primary,
324추가: pressed,
325추가: modifiers: egui::Modifiers::NONE,
326추가: },
327추가: ],
328추가: );
329추가: }
330추가: }
331추가: fn key(key: egui::Key) -> egui::Event {
332추가: egui::Event::Key {
333추가: key,
334추가: physical_key: None,
335추가: pressed: true,
336추가: repeat: false,
337추가: modifiers: egui::Modifiers::NONE,
338추가: }
339추가: }
340추가: fn text(ctx: &egui::Context, app: &mut ArchiveApp, id: &str, value: &str) {
341추가: ctx.memory_mut(|memory| memory.request_focus(egui::Id::unique(id)));
342추가: render(
343추가: ctx,
344추가: app,
345추가: vec![
346추가: egui::Event::Key {
347추가: key: egui::Key::A,
348추가: physical_key: None,
349추가: pressed: true,
350추가: repeat: false,
351추가: modifiers: egui::Modifiers::COMMAND,
352추가: },
353추가: egui::Event::Text(value.into()),
354추가: ],
355추가: );
356추가: }
357추가: fn loaded(scratch: &Folder, factory: &FakeFactory) -> ArchiveApp {
358추가: let mut app = ArchiveApp::new(
359추가: Box::new(factory.clone()),
360추가: Some(scratch.0.join("sample.zip")),
361추가: false,
362추가: );
363추가: pump(&mut app.model);
364추가: app
365추가: }
366추가: #[test]
367추가: fn empty_view_has_no_internal_status_and_keyboard_focus_is_reachable() {
368추가: let ctx = egui::Context::default();
369추가: let mut app = ArchiveApp::new(Box::new(FakeFactory::default()), None, false);
370추가: render(&ctx, &mut app, vec![]);
371추가: let shown = render(&ctx, &mut app, vec![key(egui::Key::Tab)]);
372추가: assert!(
373추가: shown
374추가: .iter()
375추가: .any(|(text, _)| text == "압축파일을 여기에 끌어 놓으세요")
376추가: );
377추가: assert!(!shown.iter().any(|(text, _)| text.contains("게시")
378추가: || text.contains("동기화")
379추가: || text.contains("시험 모드")));
380추가: assert!(ctx.memory(|memory| memory.focused().is_some()));
381추가: app.model.request_close();
382추가: let closing = render(&ctx, &mut app, vec![]);
383추가: assert!(!closing.iter().any(|(text, _)| text == UNCERTAIN));
384추가: }
385추가: #[test]
386추가: fn empty_selection_and_empty_zip_sources_do_not_start_work() {
387추가: let scratch = Folder::new();
388추가: let ctx = egui::Context::default();
389추가: let factory = FakeFactory::default();
390추가: let mut app = loaded(&scratch, &factory);
391추가: render(&ctx, &mut app, vec![]);
392추가: click(&ctx, &mut app, "선택한 항목만 풀기");
393추가: click(&ctx, &mut app, "풀기");
394추가: assert_eq!(factory.state.borrow().starts.len(), 1);
395추가: click(&ctx, &mut app, "ZIP 만들기");
396추가: click(&ctx, &mut app, "만들기");
397추가: assert_eq!(factory.state.borrow().starts.len(), 1);
398추가: assert!(!app.model.busy());
399추가: }
400추가: #[test]
401추가: fn destination_failure_sends_no_request_and_explains_folder_change() {
402추가: let scratch = Folder::new();
403추가: let factory = FakeFactory::default();
404추가: let mut app = loaded(&scratch, &factory);
405추가: let file = scratch.0.join("existing.txt");
406추가: fs::write(&file, "preserve").unwrap();
407추가: app.choose_destination(file.clone());
408추가: assert!(!app.begin_extract());
409추가: assert_eq!(factory.state.borrow().starts.len(), 1);
410추가: let ctx = egui::Context::default();
411추가: render(&ctx, &mut app, vec![]);
412추가: assert!(
413추가: render(&ctx, &mut app, vec![])
414추가: .iter()
415추가: .any(|(text, _)| text == FOLDER_ERROR)
416추가: );
417추가: assert_eq!(fs::read_to_string(file).unwrap(), "preserve");
418추가: }
419추가: #[test]
420추가: fn cancelling_removes_only_automatically_created_empty_folder() {
421추가: for case in ["automatic-empty", "automatic-nonempty", "chosen-empty"] {
422추가: let scratch = Folder::new();
423추가: let factory = FakeFactory::default();
424추가: let mut app = loaded(&scratch, &factory);
425추가: factory.state.borrow_mut().manual = true;
426추가: let destination = if case == "chosen-empty" {
427추가: let path = scratch.0.join("chosen");
428추가: fs::create_dir(&path).unwrap();
429추가: app.choose_destination(path.clone());
430추가: path
431추가: } else {
432추가: scratch.0.join("sample")
433추가: };
434추가: assert!(app.begin_extract());
435추가: if case == "automatic-nonempty" {
436추가: fs::write(destination.join("preserve"), "keep").unwrap();
437추가: }
438추가: {
439추가: let mut state = factory.state.borrow_mut();
440추가: state.frame(Event::Accepted { encryption: true });
441추가: state.finish(Outcome::Cancelled, Publication::None);
442추가: }
443추가: let ctx = egui::Context::default();
444추가: for _ in 0..30 {
445추가: render(&ctx, &mut app, vec![]);
446추가: }
447추가: assert!(!app.model.busy());
448추가: assert_eq!(destination.exists(), case != "automatic-empty");
449추가: }
450추가: }
451추가: #[test]
452추가: fn password_confirmation_requires_match_and_enter_sends_once() {
453추가: let scratch = Folder::new();
454추가: let factory = FakeFactory::manual();
455추가: let mut app = ArchiveApp::new(Box::new(factory.clone()), None, false);
456추가: assert!(app.model.begin(
457추가: Start::CreateZip {
458추가: sources: vec![(scratch.0.join("source"), "source".into())],
459추가: output_file: scratch.0.join("new.zip"),
460추가: method: Method::Deflate,
461추가: aes256: true
462추가: },
463추가: &mut factory.clone()
464추가: ));
465추가: {
466추가: let mut state = factory.state.borrow_mut();
467추가: state.frame(Event::Accepted { encryption: true });
468추가: state.frame(Event::PasswordRequired {
469추가: challenge_id: 17,
470추가: attempt: 1,
471추가: encrypt: true,
472추가: });
473추가: }
474추가: let ctx = egui::Context::default();
475추가: for _ in 0..12 {
476추가: render(&ctx, &mut app, vec![]);
477추가: }
478추가: assert_eq!(
479추가: ctx.memory(|memory| memory.focused()),
480추가: Some(egui::Id::unique("archive-password-input"))
481추가: );
482추가: text(&ctx, &mut app, "archive-password-input", "fixture-secret");
483추가: text(&ctx, &mut app, "archive-password-confirm", "different");
484추가: click(&ctx, &mut app, "확인");
485추가: assert!(!factory.state.borrow().password_seen);
486추가: text(&ctx, &mut app, "archive-password-confirm", "fixture-secret");
487추가: let shown = render(&ctx, &mut app, vec![key(egui::Key::Enter)]);
488추가: assert!(
489추가: !shown
490추가: .iter()
491추가: .any(|(text, _)| text.contains("fixture-secret"))
492추가: );
493추가: assert!(factory.state.borrow().password_seen);
494추가: assert!(app.model.challenge.is_none());
495추가: }
496추가: #[test]
497추가: fn picker_fits_minimum_window_and_opens_selected_file_with_enter() {
498추가: let scratch = Folder::new();
499추가: let file = scratch.0.join("one.zip");
500추가: fs::write(&file, "fixture").unwrap();
501추가: let ctx = egui::Context::default();
502추가: let mut picker = Picker::new(Purpose::Open, &scratch.0);
503추가: let mut result = None;
504추가: let mut draw = |events| {
505추가: let mut output = ctx.run_ui(
506추가: egui::RawInput {
507추가: screen_rect: Some(egui::Rect::from_min_size(
508추가: egui::Pos2::ZERO,
509추가: egui::vec2(760.0, 540.0),
510추가: )),
511추가: events,
512추가: ..Default::default()
513추가: },
514추가: |_ui| {
515추가: result = picker.show(&ctx);
516추가: },
517추가: );
518추가: output.textures_delta.clear();
519추가: labels(&output.shapes)
520추가: };
521추가: draw(vec![]);
522추가: let shown = draw(vec![]);
523추가: for label in ["파일 열기", "열기", "홈"] {
524추가: let (_, point) = shown.iter().find(|(text, _)| text == label).unwrap();
525추가: assert!((0.0..540.0).contains(&point.y), "{label}: {point:?}");
526추가: }
527추가: let cancel = shown.iter().find(|(text, _)| text == "취소").unwrap().1;
528추가: let confirm = shown.iter().find(|(text, _)| text == "열기").unwrap().1;
529추가: assert!(cancel.x < confirm.x);
530추가: let point = shown.iter().find(|(text, _)| text == "one.zip").unwrap().1;
531추가: for pressed in [true, false] {
532추가: draw(vec![
533추가: egui::Event::PointerMoved(point),
534추가: egui::Event::PointerButton {
535추가: pos: point,
536추가: button: egui::PointerButton::Primary,
537추가: pressed,
538추가: modifiers: egui::Modifiers::NONE,
539추가: },
540추가: ]);
541추가: }
542추가: draw(vec![key(egui::Key::Enter)]);
543추가: assert!(matches!(result, Some(Choice::Paths(ref paths)) if paths == &vec![file]));
544추가: }
545추가: }
546추가:
547추가: #[cfg(feature = "ui")]
548추가: #[test]
549추가: fn conflict_retry_waits_for_folder_choice_and_preserves_selection() {
550추가: use eframe::egui;
551추가: use zipelo_ui_memory_app::archive_screen::ArchiveApp;
552추가: let scratch = Folder::new();
553추가: let factory = FakeFactory::default();
554추가: let mut app = ArchiveApp::new(
555추가: Box::new(factory.clone()),
556추가: Some(scratch.0.join("sample.zip")),
557추가: false,
558추가: );
559추가: pump(&mut app.model);
560추가: app.model.selected.insert(0);
561추가: factory.state.borrow_mut().manual = true;
562추가: let ctx = egui::Context::default();
563추가: let render = |app: &mut ArchiveApp, events| {
564추가: let mut output = ctx.run_ui(
565추가: egui::RawInput {
566추가: screen_rect: Some(egui::Rect::from_min_size(
567추가: egui::Pos2::ZERO,
568추가: egui::vec2(760.0, 540.0),
569추가: )),
570추가: events,
571추가: ..Default::default()
572추가: },
573추가: |ui| app.show(ui),
574추가: );
575추가: output.textures_delta.clear();
576추가: fn walk(shape: &egui::epaint::Shape, labels: &mut Vec<(String, egui::Pos2)>) {
577추가: match shape {
578추가: egui::epaint::Shape::Text(text) => labels.push((
579추가: text.galley.job.text.clone(),
580추가: text.pos + text.galley.rect.size() / 2.0,
581추가: )),
582추가: egui::epaint::Shape::Vec(shapes) => {
583추가: for shape in shapes {
584추가: walk(shape, labels);
585추가: }
586추가: }
587추가: _ => {}
588추가: }
589추가: }
590추가: let mut labels = Vec::new();
591추가: for shape in &output.shapes {
592추가: walk(&shape.shape, &mut labels);
593추가: }
594추가: labels
595추가: };
596추가: let click = |app: &mut ArchiveApp, text: &str| {
597추가: render(app, vec![]);
598추가: let point = render(app, vec![])
599추가: .into_iter()
600추가: .filter(|(value, _)| value == text)
601추가: .max_by(|a, b| a.1.y.total_cmp(&b.1.y))
602추가: .unwrap_or_else(|| panic!("항목 없음: {text}"))
603추가: .1;
604추가: for pressed in [true, false] {
605추가: render(
606추가: app,
607추가: vec![
608추가: egui::Event::PointerMoved(point),
609추가: egui::Event::PointerButton {
610추가: pos: point,
611추가: button: egui::PointerButton::Primary,
612추가: pressed,
613추가: modifiers: egui::Modifiers::NONE,
614추가: },
615추가: ],
616추가: );
617추가: }
618추가: };
619추가: render(&mut app, vec![]);
620추가: click(&mut app, "선택한 항목만 풀기");
621추가: assert!(app.begin_extract());
622추가: let old = scratch.0.join("sample");
623추가: fs::write(old.join("existing"), "preserve").unwrap();
624추가: let chosen = scratch.0.join("chosen");
625추가: fs::create_dir(&chosen).unwrap();
626추가: {
627추가: let mut state = factory.state.borrow_mut();
628추가: state.frame(Event::Accepted { encryption: true });
629추가: state.frame(Event::Terminal(Terminal {
630추가: outcome: Outcome::Failed,
631추가: error: Some(ErrorCode::Conflict),
632추가: publication: Publication::None,
633추가: created_count: 0,
634추가: retained_partial_count: 0,
635추가: durability: Durability::NotApplicable,
636추가: cleanup: Cleanup::Complete,
637추가: }));
638추가: state.queue.extend([
639추가: HostEvent::StdoutEof,
640추가: HostEvent::StderrEof,
641추가: HostEvent::Exited { success: true },
642추가: ]);
643추가: }
644추가: for _ in 0..30 {
645추가: render(&mut app, vec![]);
646추가: }
647추가: assert_eq!(factory.state.borrow().starts.len(), 2);
648추가: click(&mut app, "다른 폴더에 풀기");
649추가: assert_eq!(factory.state.borrow().starts.len(), 2);
650추가: click(&mut app, "상위 폴더");
651추가: click(&mut app, "chosen");
652추가: click(&mut app, "이 폴더 선택");
653추가: assert!(matches!(factory.state.borrow().starts.last(),
654추가: Some(Start::Extract { destination, selection: Selection::EntryIds(ids), .. })
655추가: if destination == &chosen && ids == &vec![0]));
656추가: assert_eq!(
657추가: fs::read_to_string(old.join("existing")).unwrap(),
658추가: "preserve"
659추가: );
660추가: }
661추가:
662추가: #[cfg(feature = "ui")]
663추가: #[test]
664추가: fn create_dialog_keeps_title_and_actions_visible_after_resize() {
665추가: use eframe::egui::{self, epaint::Shape};
666추가: use zipelo_ui_memory_app::archive_screen::ArchiveApp;
667추가: let scratch = Folder::new();
668추가: let mut app = ArchiveApp::new(Box::new(FakeFactory::default()), None, false);
669추가: app.add_sources(vec![scratch.0.join("one.txt"), scratch.0.join("photos")]);
670추가: let ctx = egui::Context::default();
671추가: for size in [egui::vec2(1060.0, 720.0), egui::vec2(760.0, 540.0)] {
672추가: let mut texts = Vec::new();
673추가: for _ in 0..8 {
674추가: let mut output = ctx.run_ui(
675추가: egui::RawInput {
676추가: screen_rect: Some(egui::Rect::from_min_size(egui::Pos2::ZERO, size)),
677추가: ..Default::default()
678추가: },
679추가: |ui| app.show(ui),
680추가: );
681추가: output.textures_delta.clear();
682추가: fn walk(shape: &Shape, output: &mut Vec<(String, egui::Pos2)>) {
683추가: match shape {
684추가: Shape::Text(text) => output.push((
685추가: text.galley.job.text.clone(),
686추가: text.pos + text.galley.rect.size() / 2.0,
687추가: )),
688추가: Shape::Vec(shapes) => {
689추가: for shape in shapes {
690추가: walk(shape, output);
691추가: }
692추가: }
693추가: _ => {}
694추가: }
695추가: }
696추가: texts.clear();
697추가: for shape in &output.shapes {
698추가: walk(&shape.shape, &mut texts);
699추가: }
700추가: }
701추가: for label in ["ZIP 만들기", "만들기", "취소"] {
702추가: let positions = texts
703추가: .iter()
704추가: .filter(|(text, _)| text == label)
705추가: .map(|(_, p)| p)
706추가: .collect::<Vec<_>>();
707추가: assert!(!positions.is_empty(), "{label}");
708추가: assert!(
709추가: positions.iter().all(|p| p.y >= 0.0 && p.y <= size.y),
710추가: "{label}: {positions:?}"
711추가: );
712추가: }
713추가: }
714추가: }
715추가: #[test]
716추가: fn folder_open_command_preserves_shell_characters_as_one_argument() {
717추가: let path = path("한글 폴더 ; $(touch unexpected)");
718추가: let command = folder_command(&path);
719추가: assert_eq!(
720추가: command.get_program(),
721추가: if cfg!(windows) {
722추가: "explorer"
723추가: } else {
724추가: "xdg-open"
725추가: }
726추가: );
727추가: assert_eq!(
728추가: command.get_args().collect::<Vec<_>>(),
729추가: vec![path.as_os_str()]
730추가: );
731추가: }
732추가:
733추가: #[test]
734추가: fn late_cancel_and_terminal_wait_use_finishing_text() {
735추가: let mut model = Model::default();
736추가: model.progress = Some((Stage::Decode, 1, Some(2), 0));
737추가: assert_eq!(activity_text(&model, false), "압축을 푸는 중");
738추가: model.cancel = Some(CancelStatus::Requested);
739추가: assert_eq!(activity_text(&model, false), "취소하는 중...");
740추가: for state in [CancelStatus::TooLate, CancelStatus::Finished] {
741추가: model.cancel = Some(state);
742추가: assert_eq!(activity_text(&model, false), "마무리하는 중");
743추가: }
744추가: model.cancel = Some(CancelStatus::Requested);
745추가: model.terminal = Some(terminal());
746추가: assert_eq!(activity_text(&model, false), "마무리하는 중");
747추가: }
748추가: #[test]
749추가: fn client_protocol_errors_hide_internal_terms_but_preserve_exit_uncertainty() {
750추가: for error in [
751추가: "작업 ID 한도에 도달했습니다",
752추가: "작업자 응답 순서나 작업 ID가 일치하지 않습니다",
753추가: "작업 승인 응답이 없습니다",
754추가: "출력 보고 한도 초과",
755추가: ] {
756추가: assert_eq!(client_error_text(error), INTERNAL);
757추가: }
758추가: assert_eq!(
759추가: client_error_text("작업자 종료 결과를 확인할 수 없습니다. 출력 상태를 확인하세요"),
760추가: UNCONFIRMED_FINISH
761추가: );
762추가: }
수정tests/rust-app-ui/regressions.rs+26-22
@@ -413,7 +413,7 @@ fn renders_every_flow_with_actual_egui_widgets() {
413413 1060.0,
414414 );
415415 let create = render(&mut app, vec![], 1060.0);
416삭제: assert!(create.iter().any(|(t, _)| t == "저장할 ZIP 절대 경로"));
416추가: assert!(create.iter().any(|(t, _)| t == "2. 저장 위치"));
417417 let mut app = ArchiveApp::new(Box::new(f.clone()), Some(path("locked.zip")), true);
418418 for _ in 0..8 {
419419 app.model.poll();
@@ -422,7 +422,7 @@ fn renders_every_flow_with_actual_egui_widgets() {
422422 render(&mut app, vec![], width);
423423 render(&mut app, vec![], width);
424424 let password = render(&mut app, vec![], width);
425삭제: assert!(password.iter().any(|(t, _)| t.contains("암호 전달")));
425추가: assert!(password.iter().any(|(t, _)| t == "암호가 필요합니다"));
426426 }
427427 assert!(app.model.password("synthetic secret".into()));
428428 pump(&mut app.model);
@@ -644,29 +644,31 @@ fn extract_button_sends_gzip_name_only_for_raw_gzip() {
644644 }],
645645 );
646646 };
647추가: let scratch = presentation::Folder::new();
648추가: app.choose_destination(scratch.0.clone());
647649 render(&mut app, vec![]);
648삭제: let texts = render(&mut app, vec![]);
649삭제: let folder = texts
650삭제: .iter()
651삭제: .find(|(text, _)| text == "출력 폴더")
652삭제: .unwrap()
653삭제: .1;
654삭제: click(&mut app, folder + egui::vec2(100.0, 0.0));
655삭제: render(
656삭제: &mut app,
657삭제: vec![egui::Event::Text(
658삭제: path("button-output").to_string_lossy().into_owned(),
659삭제: )],
660삭제: );
661650 if format == Format::Gzip {
662삭제: let texts = render(&mut app, vec![]);
663삭제: let name = texts
664삭제: .iter()
665삭제: .find(|(text, _)| text == "출력 파일명")
651추가: render(&mut app, vec![]);
652추가: let input = ctx
653추가: .read_response(egui::Id::unique("gzip-name"))
666654 .unwrap()
667삭제: .1;
668삭제: click(&mut app, name + egui::vec2(100.0, 0.0));
669삭제: render(&mut app, vec![egui::Event::Text("plain.txt".into())]);
655추가: .rect
656추가: .center();
657추가: click(&mut app, input);
658추가: ctx.memory_mut(|memory| memory.request_focus(egui::Id::unique("gzip-name")));
659추가: render(
660추가: &mut app,
661추가: vec![
662추가: egui::Event::Key {
663추가: key: egui::Key::A,
664추가: physical_key: None,
665추가: pressed: true,
666추가: repeat: false,
667추가: modifiers: egui::Modifiers::COMMAND,
668추가: },
669추가: egui::Event::Text("plain.txt".into()),
670추가: ],
671추가: );
670672 }
671673 let texts = render(&mut app, vec![]);
672674 let button = texts.iter().find(|(text, _)| text == "풀기").unwrap().1;
@@ -846,3 +848,5 @@ fn password_validation_and_retry_do_not_erase_transport_failure() {
846848 assert_eq!(model.error.as_deref(), Some("pipe error"));
847849 assert!(!model.confirmed);
848850}
851추가:
852추가: mod presentation;
추가tests/ui-redesign/README.md+32-0
@@ -0,0 +1,32 @@
1추가: # Zipelo 화면 회귀 확인
2추가:
3추가: 설계 기준은 docs/ui-design-v0.1.md의 수용 기준 23개이며, 비교 기준 커밋은 b10c7eedddd202f83766aa8f001142cdfdb4097c임.
4추가:
5추가: ## 기능 시험
6추가:
7추가: 프로젝트 루트에서 실행함.
8추가:
9추가: ```sh
10추가: python3 tests/ci/run_rust.py local
11추가: ```
12추가:
13추가: tests/rust-app-ui/presentation.rs에서 결과 안내, 오류 문구, 폴더 생성과 정리, 선택창, 암호 확인, 키보드 입력과 최소 크기를 검증함. tests/rust-app-real-worker/flows.rs와 password_flows.rs는 실제 작업자를 사용해 파일 생성과 재해제, 암호 재입력 및 취소 후 파일 보존을 검증함.
14추가:
15추가: ## 전후 화면 재현
16추가:
17추가: Linux의 Xvfb, xdotool, ImageMagick import와 시스템 CJK 글꼴이 필요함. 제품 의존성은 추가하지 않음. 실행 파일 준비는 로컬 Git 객체와 기존 Cargo 오프라인 캐시를 사용함. 기존 산출물은 지우지 않으며 새 output 폴더를 지정함.
18추가:
19추가: ```sh
20추가: python3 tests/ui-redesign/prepare.py --output tests/ui-redesign/runs/reproduce --target-dir tests/ui-redesign/runs/target
21추가: python3 tests/ui-redesign/capture.py --binary tests/ui-redesign/runs/reproduce/before-capture --variant before
22추가: python3 tests/ui-redesign/capture.py --binary tests/ui-redesign/runs/reproduce/after-capture --variant after
23추가: python3 tests/ui-redesign/capture.py --binary tests/ui-redesign/runs/reproduce/after-capture --variant after --width 760 --height 540 --output tests/ui-redesign/screenshots/minimum
24추가: ```
25추가:
26추가: 촬영기는 전용 Xvfb를 만들고 X11을 지정하며 종료 시 자신이 만든 창과 서버만 종료함. 결과는 screenshots/before, screenshots/after, screenshots/minimum에 저장함. 15개 상태를 각각 촬영하며 capture.json에 크기와 경로를 기록함.
27추가:
28추가: 촬영 화면은 tests/rust-app-ui/capture.rs의 합성 입력임. 글꼴과 eframe 렌더러 및 실제 화면 컴포넌트를 사용하고 "화면 시험 모드"를 표시함. 암호 불일치 화면에는 고정된 시험 문자열만 입력함. 합성 작업자는 실제 압축 파일을 읽거나 결과 파일을 저장하지 않으며, 기본 풀 위치 생성은 tests/ui-redesign/runs/fixtures 아래에서 확인함. 실제 파일 작업 검증은 별도의 real_worker 시험 결과와 구분함.
29추가:
30추가: 기준 화면 준비 시 같은 촬영 도우미를 기준 커밋 소스에 넣고, 새 화면 전용 메서드 두 곳만 기존 공개 모델 호출로 바꿈. 기준 제품 소스는 바꾸지 않음. --states 옵션으로 일부 상태만 다시 촬영할 수 있으며 다른 상태의 기록은 보존함.
31추가:
32추가: 최소 크기에서 ZIP 만들기 본문은 내부 스크롤로 모든 설정에 접근함. 주 버튼과 취소 버튼은 본문 스크롤 밖에 고정함. 폴더 열기는 셸 없이 운영체제 명령에 경로 하나를 인자로 전달하며, 특수 문자가 있는 경로도 시험함. Windows 실제 화면과 운영체제 파일 탐색기 실행 확인은 이 Linux 촬영 기록에 포함하지 않음.
추가tests/ui-redesign/capture.py+130-0
@@ -0,0 +1,130 @@
1추가: """격리한 Xvfb에서 상태별 실제 창을 촬영함."""
2추가:
3추가: import argparse
4추가: import json
5추가: import os
6추가: from pathlib import Path
7추가: import subprocess
8추가: import time
9추가:
10추가: ROOT = Path(__file__).resolve().parents[2]
11추가:
12추가:
13추가: def command(args, environment, **kwargs):
14추가: return subprocess.run(args, env=environment, check=True, **kwargs)
15추가:
16추가:
17추가: def stop(process):
18추가: process.terminate()
19추가: try:
20추가: process.wait(timeout=3)
21추가: except subprocess.TimeoutExpired:
22추가: process.kill()
23추가: process.wait()
24추가:
25추가:
26추가: def capture(binary, variant, state, output, environment, width, height):
27추가: automatic = ROOT / "tests/ui-redesign/runs/fixtures/여행"
28추가: try:
29추가: automatic.rmdir()
30추가: except OSError:
31추가: pass
32추가: mode = "opened" if state in {"picker", "selected-empty"} else state
33추가: log = ROOT / "tests/ui-redesign/runs" / f"{variant}-{state}.log"
34추가: with log.open("w") as stream:
35추가: app = subprocess.Popen([str(binary), mode], cwd=ROOT, env=environment, stdout=stream, stderr=stream)
36추가: try:
37추가: deadline = time.monotonic() + 15
38추가: window = None
39추가: while time.monotonic() < deadline and app.poll() is None:
40추가: found = subprocess.run(
41추가: ["xdotool", "search", "--onlyvisible", "--name", "^Zipelo UI capture"],
42추가: env=environment, capture_output=True, text=True,
43추가: )
44추가: if found.returncode == 0:
45추가: window = found.stdout.splitlines()[0]
46추가: break
47추가: time.sleep(0.1)
48추가: if window is None:
49추가: raise RuntimeError(f"창 열기 실패: {log}")
50추가: command(["xdotool", "windowsize", window, str(width), str(height)], environment)
51추가: command(["xdotool", "windowfocus", "--sync", window], environment)
52추가: time.sleep(0.7)
53추가:
54추가: def click(x, y):
55추가: command(["xdotool", "mousemove", "--window", window, str(x), str(y), "click", "1"], environment)
56추가: time.sleep(0.4)
57추가:
58추가: if state == "create" or (state == "create-filled" and variant == "before"):
59추가: click(180 if variant == "before" else width - 90, 18 if variant == "before" else 40)
60추가: if state == "create-filled" and variant == "before":
61추가: base = ROOT / "tests/ui-redesign/runs/fixtures"
62추가: click(100, 105)
63추가: command(["xdotool", "type", "--clearmodifiers", "--delay", "0",
64추가: str(ROOT / "tests/ui-redesign/README.md")], environment)
65추가: command(["xdotool", "key", "Return"], environment)
66추가: command(["xdotool", "type", "--clearmodifiers", "--delay", "0", str(base)], environment)
67추가: click(100, 200)
68추가: command(["xdotool", "type", "--clearmodifiers", "--delay", "0", str(base / "archive.zip")], environment)
69추가: elif state == "picker":
70추가: click(97 if variant == "before" else width - 90, 18 if variant == "before" else height - 80)
71추가: elif state == "selected-empty":
72추가: click(16 if variant == "before" else 24, 126 if variant == "before" else height - 36)
73추가: elif state == "cancelling":
74추가: click(260 if variant == "before" else width - 60, 18 if variant == "before" else height - 36)
75추가: if state == "password-create" and variant == "after":
76추가: click(width // 2 - 56, height // 2 - 12)
77추가: command(["xdotool", "type", "--clearmodifiers", "--delay", "0", "fixture-password"], environment)
78추가: command(["xdotool", "key", "Tab", "Tab"], environment)
79추가: command(["xdotool", "type", "--clearmodifiers", "--delay", "0", "different"], environment)
80추가: command(["xdotool", "mousemove", "--window", window, "2", "2"], environment)
81추가: time.sleep(0.3)
82추가: destination = output / f"{state}.png"
83추가: command(["import", "-window", window, str(destination)], environment)
84추가: return {"state": state, "path": str(destination.relative_to(ROOT)), "width": width, "height": height}
85추가: finally:
86추가: stop(app)
87추가:
88추가:
89추가: def main():
90추가: parser = argparse.ArgumentParser(description=__doc__)
91추가: parser.add_argument("--binary", type=Path, required=True)
92추가: parser.add_argument("--variant", choices=["before", "after"], required=True)
93추가: parser.add_argument("--states", nargs="+", default=["empty", "hover", "opened", "selected-empty", "picker", "create", "create-filled", "password", "password-retry", "password-create", "progress", "progress-unknown", "cancelling", "success", "error"])
94추가: parser.add_argument("--width", type=int, default=1060)
95추가: parser.add_argument("--height", type=int, default=720)
96추가: parser.add_argument("--output", type=Path)
97추가: args = parser.parse_args()
98추가: output = (args.output or ROOT / "tests/ui-redesign/screenshots" / args.variant).resolve()
99추가: if not output.is_relative_to(ROOT / "tests"):
100추가: raise ValueError("촬영 결과는 tests/ 안에만 저장함")
101추가: output.mkdir(parents=True, exist_ok=True)
102추가: read_fd, write_fd = os.pipe()
103추가: server = subprocess.Popen(
104추가: ["Xvfb", "-displayfd", str(write_fd), "-screen", "0", "1280x900x24", "-nolisten", "tcp"],
105추가: pass_fds=(write_fd,), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,
106추가: )
107추가: os.close(write_fd)
108추가: try:
109추가: with os.fdopen(read_fd) as stream:
110추가: display = stream.readline().strip()
111추가: if not display:
112추가: raise RuntimeError("Xvfb를 시작하지 못함")
113추가: environment = dict(os.environ, DISPLAY=f":{display}", LIBGL_ALWAYS_SOFTWARE="1", WINIT_UNIX_BACKEND="x11", XDG_SESSION_TYPE="x11")
114추가: environment.pop("WAYLAND_DISPLAY", None)
115추가: results = [
116추가: capture(args.binary.resolve(), args.variant, state, output, environment, args.width, args.height)
117추가: for state in args.states
118추가: ]
119추가: metadata = output / "capture.json"
120추가: existing = json.loads(metadata.read_text()) if metadata.exists() else []
121추가: merged = {row["state"]: row for row in existing}
122추가: merged.update({row["state"]: row for row in results})
123추가: metadata.write_text(json.dumps(list(merged.values()), ensure_ascii=False, indent=4) + "\n")
124추가: print(json.dumps(results, ensure_ascii=False))
125추가: finally:
126추가: stop(server)
127추가:
128추가:
129추가: if __name__ == "__main__":
130추가: main()
추가tests/ui-redesign/prepare.py+65-0
@@ -0,0 +1,65 @@
1추가: """현재 화면과 로컬 Git 기준 화면의 촬영 실행 파일을 준비함."""
2추가:
3추가: import argparse
4추가: import os
5추가: from pathlib import Path
6추가: import subprocess
7추가: import tarfile
8추가:
9추가: ROOT = Path(__file__).resolve().parents[2]
10추가: MANIFEST = Path("experiments/rust-ui-memory-app/Cargo.toml")
11추가: HELPER = Path("tests/rust-app-ui/capture.rs")
12추가: BIN = '\n[[bin]]\nname = "zipelo-ui-capture"\npath = "../../tests/rust-app-ui/capture.rs"\nrequired-features = ["ui-fixture"]\n'
13추가:
14추가:
15추가: def main():
16추가: parser = argparse.ArgumentParser(description=__doc__)
17추가: parser.add_argument("--before-ref", default="b10c7eedddd202f83766aa8f001142cdfdb4097c")
18추가: parser.add_argument("--output", type=Path, default=ROOT / "tests/ui-redesign/runs")
19추가: parser.add_argument("--target-dir", type=Path, required=True)
20추가: args = parser.parse_args()
21추가: output = args.output.resolve()
22추가: if not output.is_relative_to(ROOT / "tests"):
23추가: raise ValueError("기준 소스와 실행 파일은 tests/ 안에만 저장함")
24추가: before = output / "before-src"
25추가: if before.exists():
26추가: raise ValueError("기존 기준 소스는 보존함. 새 --output 폴더를 지정하세요")
27추가: before.mkdir(parents=True)
28추가: revision = subprocess.check_output(
29추가: ["git", "rev-parse", "--verify", "--end-of-options", args.before_ref + "^{commit}"],
30추가: cwd=ROOT, text=True,
31추가: ).strip()
32추가: with subprocess.Popen(["git", "archive", revision], cwd=ROOT, stdout=subprocess.PIPE) as archive:
33추가: with tarfile.open(fileobj=archive.stdout, mode="r|") as source:
34추가: source.extractall(before, filter="data")
35추가: if archive.wait() != 0:
36추가: raise RuntimeError("로컬 기준 소스를 읽지 못함")
37추가: helper = (ROOT / HELPER).read_text()
38추가: helper = helper.replace(
39추가: "self.app.begin_extract();",
40추가: "self.app.model.begin(start, &mut self.factory);",
41추가: )
42추가: helper = helper.replace(
43추가: 'app.add_sources(vec![base.join("읽어주세요.txt"), base.join("사진")]);',
44추가: "let _ = &mut app;",
45추가: )
46추가: (before / HELPER).write_text(helper)
47추가: original = before / MANIFEST
48추가: original.write_text(original.read_text() + BIN)
49추가: environment = dict(os.environ, CARGO_TARGET_DIR=str(args.target_dir.resolve()))
50추가: for variant, root in [("before", before), ("after", ROOT)]:
51추가: with (output / f"{variant}-build.log").open("w") as log:
52추가: subprocess.run(
53추가: ["cargo", "+1.99.1", "build", "--locked", "--offline", "--manifest-path",
54추가: str(root / MANIFEST), "--features", "ui-fixture", "--bin", "zipelo-ui-capture"],
55추가: cwd=ROOT, env=environment, stdout=log, stderr=log, check=True,
56추가: )
57추가: executable = args.target_dir.resolve() / "debug/zipelo-ui-capture"
58추가: destination = output / f"{variant}-capture"
59추가: destination.write_bytes(executable.read_bytes())
60추가: destination.chmod(executable.stat().st_mode)
61추가: print(f"기준 커밋 {revision}, 촬영 실행 파일 {output}")
62추가:
63추가:
64추가: if __name__ == "__main__":
65추가: main()
추가tests/ui-redesign/screenshots/after/cancelling.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/after/capture.json+92-0
@@ -0,0 +1,92 @@
1추가: [
2추가: {
3추가: "state": "empty",
4추가: "path": "tests/ui-redesign/screenshots/after/empty.png",
5추가: "width": 1060,
6추가: "height": 720
7추가: },
8추가: {
9추가: "state": "hover",
10추가: "path": "tests/ui-redesign/screenshots/after/hover.png",
11추가: "width": 1060,
12추가: "height": 720
13추가: },
14추가: {
15추가: "state": "opened",
16추가: "path": "tests/ui-redesign/screenshots/after/opened.png",
17추가: "width": 1060,
18추가: "height": 720
19추가: },
20추가: {
21추가: "state": "selected-empty",
22추가: "path": "tests/ui-redesign/screenshots/after/selected-empty.png",
23추가: "width": 1060,
24추가: "height": 720
25추가: },
26추가: {
27추가: "state": "picker",
28추가: "path": "tests/ui-redesign/screenshots/after/picker.png",
29추가: "width": 1060,
30추가: "height": 720
31추가: },
32추가: {
33추가: "state": "create",
34추가: "path": "tests/ui-redesign/screenshots/after/create.png",
35추가: "width": 1060,
36추가: "height": 720
37추가: },
38추가: {
39추가: "state": "create-filled",
40추가: "path": "tests/ui-redesign/screenshots/after/create-filled.png",
41추가: "width": 1060,
42추가: "height": 720
43추가: },
44추가: {
45추가: "state": "password",
46추가: "path": "tests/ui-redesign/screenshots/after/password.png",
47추가: "width": 1060,
48추가: "height": 720
49추가: },
50추가: {
51추가: "state": "password-retry",
52추가: "path": "tests/ui-redesign/screenshots/after/password-retry.png",
53추가: "width": 1060,
54추가: "height": 720
55추가: },
56추가: {
57추가: "state": "password-create",
58추가: "path": "tests/ui-redesign/screenshots/after/password-create.png",
59추가: "width": 1060,
60추가: "height": 720
61추가: },
62추가: {
63추가: "state": "progress",
64추가: "path": "tests/ui-redesign/screenshots/after/progress.png",
65추가: "width": 1060,
66추가: "height": 720
67추가: },
68추가: {
69추가: "state": "progress-unknown",
70추가: "path": "tests/ui-redesign/screenshots/after/progress-unknown.png",
71추가: "width": 1060,
72추가: "height": 720
73추가: },
74추가: {
75추가: "state": "cancelling",
76추가: "path": "tests/ui-redesign/screenshots/after/cancelling.png",
77추가: "width": 1060,
78추가: "height": 720
79추가: },
80추가: {
81추가: "state": "success",
82추가: "path": "tests/ui-redesign/screenshots/after/success.png",
83추가: "width": 1060,
84추가: "height": 720
85추가: },
86추가: {
87추가: "state": "error",
88추가: "path": "tests/ui-redesign/screenshots/after/error.png",
89추가: "width": 1060,
90추가: "height": 720
91추가: }
92추가: ]
추가tests/ui-redesign/screenshots/after/create-filled.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/after/create.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/after/empty.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/after/error.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/after/hover.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/after/opened.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/after/password-create.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/after/password-retry.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/after/password.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/after/picker.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/after/progress-unknown.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/after/progress.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/after/selected-empty.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/after/success.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/before/cancelling.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/before/capture.json+92-0
@@ -0,0 +1,92 @@
1추가: [
2추가: {
3추가: "state": "empty",
4추가: "path": "tests/ui-redesign/screenshots/before/empty.png",
5추가: "width": 1060,
6추가: "height": 720
7추가: },
8추가: {
9추가: "state": "hover",
10추가: "path": "tests/ui-redesign/screenshots/before/hover.png",
11추가: "width": 1060,
12추가: "height": 720
13추가: },
14추가: {
15추가: "state": "opened",
16추가: "path": "tests/ui-redesign/screenshots/before/opened.png",
17추가: "width": 1060,
18추가: "height": 720
19추가: },
20추가: {
21추가: "state": "selected-empty",
22추가: "path": "tests/ui-redesign/screenshots/before/selected-empty.png",
23추가: "width": 1060,
24추가: "height": 720
25추가: },
26추가: {
27추가: "state": "picker",
28추가: "path": "tests/ui-redesign/screenshots/before/picker.png",
29추가: "width": 1060,
30추가: "height": 720
31추가: },
32추가: {
33추가: "state": "create",
34추가: "path": "tests/ui-redesign/screenshots/before/create.png",
35추가: "width": 1060,
36추가: "height": 720
37추가: },
38추가: {
39추가: "state": "create-filled",
40추가: "path": "tests/ui-redesign/screenshots/before/create-filled.png",
41추가: "width": 1060,
42추가: "height": 720
43추가: },
44추가: {
45추가: "state": "password",
46추가: "path": "tests/ui-redesign/screenshots/before/password.png",
47추가: "width": 1060,
48추가: "height": 720
49추가: },
50추가: {
51추가: "state": "password-retry",
52추가: "path": "tests/ui-redesign/screenshots/before/password-retry.png",
53추가: "width": 1060,
54추가: "height": 720
55추가: },
56추가: {
57추가: "state": "password-create",
58추가: "path": "tests/ui-redesign/screenshots/before/password-create.png",
59추가: "width": 1060,
60추가: "height": 720
61추가: },
62추가: {
63추가: "state": "progress",
64추가: "path": "tests/ui-redesign/screenshots/before/progress.png",
65추가: "width": 1060,
66추가: "height": 720
67추가: },
68추가: {
69추가: "state": "progress-unknown",
70추가: "path": "tests/ui-redesign/screenshots/before/progress-unknown.png",
71추가: "width": 1060,
72추가: "height": 720
73추가: },
74추가: {
75추가: "state": "cancelling",
76추가: "path": "tests/ui-redesign/screenshots/before/cancelling.png",
77추가: "width": 1060,
78추가: "height": 720
79추가: },
80추가: {
81추가: "state": "success",
82추가: "path": "tests/ui-redesign/screenshots/before/success.png",
83추가: "width": 1060,
84추가: "height": 720
85추가: },
86추가: {
87추가: "state": "error",
88추가: "path": "tests/ui-redesign/screenshots/before/error.png",
89추가: "width": 1060,
90추가: "height": 720
91추가: }
92추가: ]
추가tests/ui-redesign/screenshots/before/create-filled.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/before/create.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/before/empty.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/before/error.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/before/hover.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/before/opened.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/before/password-create.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/before/password-retry.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/before/password.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/before/picker.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/before/progress-unknown.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/before/progress.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/before/selected-empty.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/before/success.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/minimum/cancelling.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/minimum/capture.json+92-0
@@ -0,0 +1,92 @@
1추가: [
2추가: {
3추가: "state": "empty",
4추가: "path": "tests/ui-redesign/screenshots/minimum/empty.png",
5추가: "width": 760,
6추가: "height": 540
7추가: },
8추가: {
9추가: "state": "hover",
10추가: "path": "tests/ui-redesign/screenshots/minimum/hover.png",
11추가: "width": 760,
12추가: "height": 540
13추가: },
14추가: {
15추가: "state": "opened",
16추가: "path": "tests/ui-redesign/screenshots/minimum/opened.png",
17추가: "width": 760,
18추가: "height": 540
19추가: },
20추가: {
21추가: "state": "selected-empty",
22추가: "path": "tests/ui-redesign/screenshots/minimum/selected-empty.png",
23추가: "width": 760,
24추가: "height": 540
25추가: },
26추가: {
27추가: "state": "picker",
28추가: "path": "tests/ui-redesign/screenshots/minimum/picker.png",
29추가: "width": 760,
30추가: "height": 540
31추가: },
32추가: {
33추가: "state": "create",
34추가: "path": "tests/ui-redesign/screenshots/minimum/create.png",
35추가: "width": 760,
36추가: "height": 540
37추가: },
38추가: {
39추가: "state": "create-filled",
40추가: "path": "tests/ui-redesign/screenshots/minimum/create-filled.png",
41추가: "width": 760,
42추가: "height": 540
43추가: },
44추가: {
45추가: "state": "password",
46추가: "path": "tests/ui-redesign/screenshots/minimum/password.png",
47추가: "width": 760,
48추가: "height": 540
49추가: },
50추가: {
51추가: "state": "password-retry",
52추가: "path": "tests/ui-redesign/screenshots/minimum/password-retry.png",
53추가: "width": 760,
54추가: "height": 540
55추가: },
56추가: {
57추가: "state": "password-create",
58추가: "path": "tests/ui-redesign/screenshots/minimum/password-create.png",
59추가: "width": 760,
60추가: "height": 540
61추가: },
62추가: {
63추가: "state": "progress",
64추가: "path": "tests/ui-redesign/screenshots/minimum/progress.png",
65추가: "width": 760,
66추가: "height": 540
67추가: },
68추가: {
69추가: "state": "progress-unknown",
70추가: "path": "tests/ui-redesign/screenshots/minimum/progress-unknown.png",
71추가: "width": 760,
72추가: "height": 540
73추가: },
74추가: {
75추가: "state": "cancelling",
76추가: "path": "tests/ui-redesign/screenshots/minimum/cancelling.png",
77추가: "width": 760,
78추가: "height": 540
79추가: },
80추가: {
81추가: "state": "success",
82추가: "path": "tests/ui-redesign/screenshots/minimum/success.png",
83추가: "width": 760,
84추가: "height": 540
85추가: },
86추가: {
87추가: "state": "error",
88추가: "path": "tests/ui-redesign/screenshots/minimum/error.png",
89추가: "width": 760,
90추가: "height": 540
91추가: }
92추가: ]
추가tests/ui-redesign/screenshots/minimum/create-filled.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/minimum/create.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/minimum/empty.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/minimum/error.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/minimum/hover.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/minimum/opened.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/minimum/password-create.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/minimum/password-retry.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/minimum/password.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/minimum/picker.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/minimum/progress-unknown.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/minimum/progress.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/minimum/selected-empty.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기
추가tests/ui-redesign/screenshots/minimum/success.png

바이너리 파일이라 Diff를 표시하지 않아요.

파일 내려받기