Drop narration and internal asides from comments

This commit is contained in:
Dennis Kobert
2026-09-06 15:59:41 +00:00
parent 6cdab6b95d
commit fbdba0e545
9 changed files with 8 additions and 15 deletions
@@ -20,9 +20,7 @@ pub fn load_demo(file_name: &str) -> DocumentMessageHandler {
DocumentMessageHandler::deserialize_document(&content).unwrap_or_else(|e| panic!("Failed to deserialize {path}: {e:?}")) DocumentMessageHandler::deserialize_document(&content).unwrap_or_else(|e| panic!("Failed to deserialize {path}: {e:?}"))
} }
/// Dev tool for the flip: runs each demo through the full open-time migration and writes the /// Dev tool: writes each demo's migrated re-save into the directory named by `DEMO_OUT`, leaving the checked-in originals untouched.
/// re-saved form into the directory named by `DEMO_OUT`, so the CLI can render migrated copies
/// while the checked-in originals stay pristine until the flip's re-save.
#[test] #[test]
#[ignore = "dev tool: set DEMO_OUT and run explicitly"] #[ignore = "dev tool: set DEMO_OUT and run explicitly"]
fn migrate_demo_artwork_into_demo_out() { fn migrate_demo_artwork_into_demo_out() {
@@ -208,8 +208,7 @@ mod test_fill {
use graphene_std::color::SRGBA8; use graphene_std::color::SRGBA8;
use graphene_std::vector::fill; use graphene_std::vector::fill;
/// Paint inputs are single-typed now, so the monitored wire carries the /// The monitored fill wire carries `Color`; the `Graphic` conversion sits downstream of the monitor.
/// colors themselves and the `Graphic` conversion sits downstream of it.
async fn get_fills(editor: &mut EditorTestUtils) -> Vec<Color> { async fn get_fills(editor: &mut EditorTestUtils) -> Vec<Color> {
let instrumented = match editor.eval_graph().await { let instrumented = match editor.eval_graph().await {
Ok(instrumented) => instrumented, Ok(instrumented) => instrumented,
@@ -381,7 +381,7 @@ attribute! {
/// Maps the unit square `[(0, 0), (1, 1)]` (top-left convention) onto the 'Text' node's /// Maps the unit square `[(0, 0), (1, 1)]` (top-left convention) onto the 'Text' node's
/// text frame in this item's local space. Each item carries the frame relative to its own /// text frame in this item's local space. Each item carries the frame relative to its own
/// glyph origin so it survives 'Index Elements' filtering. The Text tool reads this to /// glyph origin so it survives 'Index Elements' filtering. The Text tool reads this to
/// position its drag cage. Stored as an affine to allow non-axis-aligned frames in the future. /// position its drag cage.
pub EditorTextFrame("editor:text_frame"): DAffine2; pub EditorTextFrame("editor:text_frame"): DAffine2;
/// Byte offset where a regex match begins ('Regex Find All' and 'Regex Capture' text nodes). /// Byte offset where a regex match begins ('Regex Find All' and 'Regex Capture' text nodes).
pub Start("start"): u64; pub Start("start"): u64;
@@ -285,7 +285,7 @@ pub struct RegistryEntry {
pub io: NodeIOTypes, pub io: NodeIOTypes,
pub constructor: NodeConstructor, pub constructor: NodeConstructor,
/// Declarative record-io metadata for the compiler layout pass; `None` for /// Declarative record-io metadata for the compiler layout pass; `None` for
/// nodes whose layout the pass does not yet fold (routing/opaque, hand-written /// nodes whose layout the pass does not fold (routing/opaque, hand-written
/// rows), which keep the construction-time path. /// rows), which keep the construction-time path.
pub layout_meta: Option<crate::record::LayoutMeta>, pub layout_meta: Option<crate::record::LayoutMeta>,
} }
@@ -238,8 +238,7 @@ impl_tuple!(A, B, C, D, E);
impl_tuple!(A, B, C, D, E, F); impl_tuple!(A, B, C, D, E, F);
/// rustc-hash's polynomial hash with the state pinned to u64, so keys match across native and wasm targets. /// rustc-hash's polynomial hash with the state pinned to u64, so keys match across native and wasm targets.
/// The state starts at a nonzero seed: zero-initialized fx absorbs leading zero words, which produced /// The state starts at a nonzero seed, since zero-initialized fx absorbs leading zero words.
/// a real wrong-value memo hit in the prototype.
#[derive(Clone)] #[derive(Clone)]
pub struct FxHasher64 { pub struct FxHasher64 {
hash: u64, hash: u64,
@@ -200,7 +200,7 @@ fn flatten_graphic_list<T>(content: List<Graphic>, extract_variant: fn(Graphic)
flatten_recursive(output, sub_list, extract_variant, lane_layer_path.as_deref()); flatten_recursive(output, sub_list, extract_variant, lane_layer_path.as_deref());
} }
// A bridge row's native group flattens through its legacy lowering; the arm dies with the legacy interior. // A bridge row's native group flattens through its legacy lowering.
Graphic::Group(group) => { Graphic::Group(group) => {
let lowered = List::new_from_item(Item::from_parts(group_to_legacy_graphic(&group), attributes.clone())); let lowered = List::new_from_item(Item::from_parts(group_to_legacy_graphic(&group), attributes.clone()));
flatten_recursive(output, lowered, extract_variant, parent_layer_path); flatten_recursive(output, lowered, extract_variant, parent_layer_path);
+1 -1
View File
@@ -185,7 +185,7 @@ fn frame_memo<'e, 'l>(
}; };
let past_end = || GPoll::Error(Box::new(core_types::gpoll::GraphError::past_end())); let past_end = || GPoll::Error(Box::new(core_types::gpoll::GraphError::past_end()));
let entry = cache.lock().unwrap().as_ref().filter(|entry| entry.key == key).map(|entry| (entry.span, entry.finality)); let entry = cache.lock().unwrap().as_ref().filter(|entry| entry.key == key).map(|entry| (entry.span, entry.finality));
// A span that no longer resolves was flushed; the miss below re-publishes. // A span that no longer resolves was flushed.
if let Some((span, finality)) = entry if let Some((span, finality)) = entry
&& let Some(published) = span.batch(persistent, content.layout()) && let Some(published) = span.batch(persistent, content.layout())
{ {
+1 -1
View File
@@ -540,7 +540,7 @@ fn to_graphic_unit_extent(_content: core_types::extent::ValueIn<'_, ()>, _level:
/// The transitional level bridge: the input's records as the legacy list an /// The transitional level bridge: the input's records as the legacy list an
/// unconverted consumer expects, attributes copied through their erased /// unconverted consumer expects, attributes copied through their erased
/// reads and content kept in its native form. Registered under the legacy /// reads and content kept in its native form. Registered under the legacy
/// convert identifiers; the rows die with the last legacy consumer. /// convert identifiers.
#[node_macro::node(category(""))] #[node_macro::node(category(""))]
pub fn level_to_list<T: Clone + Send + Sync + CacheHash + dyn_any::StaticTypeSized>( pub fn level_to_list<T: Clone + Send + Sync + CacheHash + dyn_any::StaticTypeSized>(
_: impl Ctx, _: impl Ctx,
@@ -327,7 +327,6 @@ fn paint_table(paint: core_types::node::List<'_, Graphic<'_>>) -> List<Graphic<'
} }
/// Applies a fill style to the vector content, giving an appearance to the area within the interior of the geometry. /// Applies a fill style to the vector content, giving an appearance to the area within the interior of the geometry.
/// The gradient transform fallback spans the lane's own bounds rather than the whole content's.
#[node_macro::node(category("Vector: Style"), path(graphene_core::vector), properties("fill_properties"))] #[node_macro::node(category("Vector: Style"), path(graphene_core::vector), properties("fill_properties"))]
fn fill<'e>( fn fill<'e>(
ctx: impl Ctx + ExtractArena<'e> + ExtractIndex + InjectIndex + Copy, ctx: impl Ctx + ExtractArena<'e> + ExtractIndex + InjectIndex + Copy,
@@ -1767,8 +1766,6 @@ fn path_is_closed(
.unwrap_or(false) .unwrap_or(false)
} }
// Converts with the write-attribute family: the record form needs a lazy
// value input on a record node, which the macro does not accept yet, and it
/// Sets each anchor point's position to the value the mapped input produces, with the point's /// Sets each anchor point's position to the value the mapped input produces, with the point's
/// index and current position provided via context. /// index and current position provided via context.
#[node_macro::node(category("Vector"), path(graphene_core::vector), extent(map_points_extent))] #[node_macro::node(category("Vector"), path(graphene_core::vector), extent(map_points_extent))]