-
-
Notifications
You must be signed in to change notification settings - Fork 505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Populate the Properties Panel with SVG shape properties #186
Comments
I'd be interested in taking this. Any guidance on what the UI should look like? |
@KeatonTech this is a pretty large feature that touches all areas of the frontend and backend and document system, so it might be better to do a few small/medium-sized tasks before tackling this one. In order of increasing complexity, you might like to take on one of these: #291 #225 #155 However you're definitely still welcome if you prefer jump straight into the deep end. The UI should look like this (top right panel). Let's chat in more detail on Discord about how to implement that in the frontend and backend sides. |
I was thinking of expanding the LayerData trait with a new function like: pub trait LayerData {
// ...
fn get_properties(&self) -> HashMap<&'const str, Property>;
// ...
} Where struct Property {
name: String;
type: PropertyType;
ui_group: UiGroup;
current_value: Option<PropertyValue>;
}
/* This should be the same enum that eventually gets used to specify graph input and output types. */
enum PropertyType {
String,
Boolean,
Number,
// ...
}
enum UiGroup {
Blending,
Origin,
Transform,
Fill,
Stroke,
// ...
}
enum PropertyValue {
String(String),
Boolean(bool),
Number(f64),
// ...
} (Note that this rust code might not be 100% syntactically correct, just using it as pseudocode). Then there could be a new SetLayerProperty action that modifies one of these by the hashmap key. SetLayerProperty {
path: Vec<LayerId>,
property_key: &'const str,
new_value: PropertyValue,
} The Editor layer or the Vue layer could move from a hashmap to a list of groups of properties, arranged however the UI wants to arrange them. |
Closing this stopgap issue because the full Properties Panel is being implemented now by @mfish33 and this temporary approach is no longer necessary. |
This is a temporary approach that allows modifying shape fill and stroke color, stroke width, etc. before we have a proper system for populating the layer's node properties, which is blocked on big architectural decisions. This is a quick and dirty feature to make the artwork creation process more powerful in the short term.
The text was updated successfully, but these errors were encountered: