Skip to content

Comments

Generalize the 'Map Vector' node as 'Map' with support for all graphical types#3793

Merged
Keavon merged 3 commits intomasterfrom
rename_map_vector
Feb 20, 2026
Merged

Generalize the 'Map Vector' node as 'Map' with support for all graphical types#3793
Keavon merged 3 commits intomasterfrom
rename_map_vector

Conversation

@TrueDoctor
Copy link
Member

@TrueDoctor TrueDoctor commented Feb 20, 2026

image

@gemini-code-assist
Copy link

Summary of Changes

Hello @TrueDoctor, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the vector node mapping functionality by introducing a new, generic map node. This change replaces a previously specialized map_vector node, allowing for more flexible and reusable mapping operations across various data types within the node graph system. The update ensures that the system can handle a wider range of items through a unified mapping interface.

Highlights

  • Refactoring of Vector Map Node: The specialized map_vector node has been replaced with a new, more generic map node, allowing for broader application across different data types.
  • Document Migration Update: The document migration logic was updated to correctly reference the new generic map node identifier, ensuring compatibility with existing documents.
  • Removal of Deprecated Node: The old map_vector node, which was specific to vector types, has been removed as part of this refactoring.
Changelog
  • editor/src/messages/portfolio/document_migration.rs
    • Updated the NodeReplacement entry for InstanceMapNode to point to the new graphene_std::vector::instance::map::IDENTIFIER.
  • node-graph/nodes/vector/src/instance.rs
    • Added AnyHash and DynAny to the module imports.
    • Introduced a new generic map asynchronous function, decorated as a node, capable of mapping over Table<Item> where Item can be various graphic types.
  • node-graph/nodes/vector/src/vector_nodes.rs
    • Removed the map_vector asynchronous function and its associated node_macro::node attribute.
Activity
  • The pull request was created with the stated intention of renaming 'Map Vector to Map'.
  • The author noted that the changes are 'Not tested yet'.
  • The PR description contained boilerplate text, indicating no further specific human activity or detailed explanation beyond the title.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the map_vector node into a generic map node, which is a great improvement for code reuse. The implementation is straightforward and correctly moves the logic to a new generic function. I've suggested a small efficiency improvement to avoid an intermediate allocation when building the result table. Otherwise, the changes look good.

@TrueDoctor TrueDoctor marked this pull request as ready for review February 20, 2026 09:48
@TrueDoctor TrueDoctor requested a review from Keavon February 20, 2026 09:48
@Keavon Keavon changed the title Rename Map Vector to Map Generalize the 'Map Vector' node as 'Map' with support for all graphical types Feb 20, 2026
Copy link
Member

@Keavon Keavon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, I am very glad to generalize this, thank you for making it happen!

@Keavon Keavon enabled auto-merge February 20, 2026 21:20
@Keavon Keavon added this pull request to the merge queue Feb 20, 2026
Merged via the queue into master with commit ba177c4 Feb 20, 2026
5 checks passed
@Keavon Keavon deleted the rename_map_vector branch February 20, 2026 21:33
JustJ01 pushed a commit to JustJ01/Graphite that referenced this pull request Feb 22, 2026
…cal types (GraphiteEditor#3793)

* Rename Map Vector to Map

* Fix compilation errors

* Move to the Graphic module and add Read {Graphic, Raster, Color} nodes

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants