Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Fix dragging topic names with special characters to the Image panel #7359

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

jtbandes
Copy link
Member

@jtbandes jtbandes commented Jan 22, 2024

User-Facing Changes
Fixed an issue with dragging and dropping topics into the Image panel if the topic names contain special characters.

Description
The path field is quoted, but the Image panel uses an unquoted topic name in its config, so drag & drop would result in an invalid config if the topic name required quotes. This fixes the issue by adding a new topicName field to pass through the unmodified topic name.

Copy link
Contributor

@defunctzombie defunctzombie left a comment

Choose a reason for hiding this comment

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

It kinda looks like we've already parsed the path somewhere to get the topicName? Or maybe that's from the list of topics itself?

Would rootTopicName make more sense to align with rootSchemaName?

Does seem somewhat awkward to see "isTopic: false" and then you have a topic name - I guess that tells you if the path itself is a topic? Why doesn't the receiver figure that out itself? Should the parsed path AST be sent instead?

@jtbandes
Copy link
Member Author

Should the parsed path AST be sent instead?

Might be nice but the thought was to eventually publish this in the extension API and I believe we haven’t reworked our “RosPath” to a place where we’re comfortable with publishing it.

@jtbandes
Copy link
Member Author

Would rootTopicName make more sense to align with rootSchemaName?

I don't feel too strongly either way. My thinking on this was that rootSchemaName makes some sense because you could imagine a schema for each sub-message, and this one refers to the root. On the other hand, with topics, there are no "nested topics" – there is just one topic at the root level.

@jtbandes jtbandes merged commit 802bae7 into main Jan 22, 2024
14 of 15 checks passed
@jtbandes jtbandes deleted the jacob/fg-6356-drag-drop-topics-quotes branch January 22, 2024 22:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants