docs: Update all references from old 05-Plot/06-First Draft to merged 05-First Draft
- Update project_template test to verify old directories are NOT created - Update hover text and comments in project.rs - Update comments and code in file_list.rs - Update comment in spelling.rs - Add test assertions to verify 05-Plot and 06-First Draft don't exist in new projects This ensures all code references match the merged directory structure where planning and draft content are combined in 05-First Draft with YAML frontmatter. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -10,14 +10,14 @@ const MAX_DISPLAY_NAME_LEN: usize = 30;
|
|||||||
/// Convert a manuscript folder path to its corresponding outline file path.
|
/// Convert a manuscript folder path to its corresponding outline file path.
|
||||||
///
|
///
|
||||||
/// For the snowflake template:
|
/// For the snowflake template:
|
||||||
/// - `06-First Draft/Act 1` → `04-Outline/scene_breakdown/act_01.md`
|
/// - `05-First Draft/Act 1` → `04-Outline/scene_breakdown/act_01.md`
|
||||||
/// - `06-First Draft/Act 2` → `04-Outline/scene_breakdown/act_02.md`
|
/// - `05-First Draft/Act 2` → `04-Outline/scene_breakdown/act_02.md`
|
||||||
/// - etc.
|
/// - etc.
|
||||||
fn outline_path_for_folder(folder_path: &str) -> Option<String> {
|
fn outline_path_for_folder(folder_path: &str) -> Option<String> {
|
||||||
// Split the path into components
|
// Split the path into components
|
||||||
let parts: Vec<&str> = folder_path.split('/').collect();
|
let parts: Vec<&str> = folder_path.split('/').collect();
|
||||||
|
|
||||||
// We expect paths like "06-First Draft/Act 1"
|
// We expect paths like "05-First Draft/Act 1"
|
||||||
if parts.len() < 2 {
|
if parts.len() < 2 {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
@@ -542,8 +542,7 @@ impl App {
|
|||||||
if ui
|
if ui
|
||||||
.button("+ New Scene")
|
.button("+ New Scene")
|
||||||
.on_hover_text(
|
.on_hover_text(
|
||||||
"Create a planning file in 05-Plot and a linked draft file \
|
"Create a new scene file with YAML frontmatter in 05-First Draft"
|
||||||
in 06-First Draft with automatic cross-references",
|
|
||||||
)
|
)
|
||||||
.clicked()
|
.clicked()
|
||||||
{
|
{
|
||||||
|
|||||||
+5
-2
@@ -503,11 +503,14 @@ impl App {
|
|||||||
egui::TextEdit::singleline(
|
egui::TextEdit::singleline(
|
||||||
&mut self.config.project_open_subdir,
|
&mut self.config.project_open_subdir,
|
||||||
)
|
)
|
||||||
.hint_text("06-First Draft")
|
.hint_text("05-First Draft")
|
||||||
.desired_width(280.0),
|
.desired_width(280.0),
|
||||||
)
|
)
|
||||||
.on_hover_text(
|
.on_hover_text(
|
||||||
"Which folder of a project holds the book. Its files are ordered, numbered and exported; the rest of the project is reference. A leading number is optional, so “First Draft” also matches “06-First Draft”.",
|
"Which folder of a project holds the book. Its files \
|
||||||
|
are ordered, numbered and exported; the rest of the \
|
||||||
|
project is reference. A leading number is optional, \
|
||||||
|
so \"First Draft\" also matches \"05-First Draft\".",
|
||||||
);
|
);
|
||||||
save_now |= r.lost_focus();
|
save_now |= r.lost_focus();
|
||||||
ui.end_row();
|
ui.end_row();
|
||||||
|
|||||||
+1
-1
@@ -196,7 +196,7 @@ impl App {
|
|||||||
|
|
||||||
/// The project's character folder, looked for beside the workspace and then
|
/// The project's character folder, looked for beside the workspace and then
|
||||||
/// up through its ancestors — in a snowflake project the workspace is
|
/// up through its ancestors — in a snowflake project the workspace is
|
||||||
/// `06-First Draft` and the sheets are its sibling `03-Characters`.
|
/// `05-First Draft` and the sheets are its sibling `03-Story-Bible`.
|
||||||
pub(super) fn characters_dir(&self) -> Option<PathBuf> {
|
pub(super) fn characters_dir(&self) -> Option<PathBuf> {
|
||||||
/// How far up to look before giving up; deep enough for the layout,
|
/// How far up to look before giving up; deep enough for the layout,
|
||||||
/// shallow enough not to wander into the home directory.
|
/// shallow enough not to wander into the home directory.
|
||||||
|
|||||||
+12
-1
@@ -348,12 +348,23 @@ mod tests {
|
|||||||
assert!(readme_content.contains("MiniJinja Test Project"));
|
assert!(readme_content.contains("MiniJinja Test Project"));
|
||||||
assert!(readme_content.contains("A project generated with MiniJinja"));
|
assert!(readme_content.contains("A project generated with MiniJinja"));
|
||||||
|
|
||||||
// Check that the 06-First Draft subdirectory exists (default manuscript folder)
|
// Check that the 05-First Draft subdirectory exists (default manuscript folder)
|
||||||
let subdir = crate::config::default_project_open_subdir();
|
let subdir = crate::config::default_project_open_subdir();
|
||||||
assert!(
|
assert!(
|
||||||
project.join(&subdir).is_dir(),
|
project.join(&subdir).is_dir(),
|
||||||
"expected a {subdir} folder in {project:?}"
|
"expected a {subdir} folder in {project:?}"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Verify old directories (05-Plot, 06-First Draft) are NOT created
|
||||||
|
// (they were merged into 05-First Draft)
|
||||||
|
assert!(
|
||||||
|
!project.join("05-Plot").is_dir(),
|
||||||
|
"05-Plot should not exist (merged into 05-First Draft)"
|
||||||
|
);
|
||||||
|
assert!(
|
||||||
|
!project.join("06-First Draft").is_dir(),
|
||||||
|
"06-First Draft should not exist (merged into 05-First Draft)"
|
||||||
|
);
|
||||||
|
|
||||||
// Clean up
|
// Clean up
|
||||||
let _ = std::fs::remove_dir_all(&out);
|
let _ = std::fs::remove_dir_all(&out);
|
||||||
|
|||||||
Reference in New Issue
Block a user