Improvements to message path autocomplete #7256
Improvements to message path autocomplete #7256
Conversation
* | ||
* Or use actual ROS primitive types: | ||
* | ||
* <MessagePathInput types={["uint16", "float64"]} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this types feature used anywhere in the codebase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been renamed to validTypes
, but yes, we actually pipe it through the extension API:
studio/packages/studio/src/index.ts
Line 558 in c404fae
validTypes?: string[]; |
packages/studio-base/src/components/MessagePathSyntax/MessagePathInput.tsx
Show resolved
Hide resolved
packages/studio-base/src/components/MessagePathSyntax/MessagePathInput.tsx
Show resolved
Hide resolved
packages/studio-base/src/components/MessagePathSyntax/messagePathsForDatatype.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the gist of the change here? what was happening wrong before and what has been fixed?
I see some logic that is suppose to filter out header.seq
but I see that in your screenshot. Is that logic no longer useful and should be removed? Or is the screenshot exposing a bug?
btw I'm planning to come back and address these comments at some point soon, but I don't see this being a super high priority issue that needs to be closed out before the plot stuff |
Updated PR description:
|
User-Facing Changes
Improved autocomplete suggestions when typing message path syntax.
Description
The logic that generated the initial combined (topics+paths) list of suggestions was bespoke and did not account for array fields. This PR changes it to use the existing
messagePathsForStructure
function (with some additional info returned). It also updatesmessagePathsForStructure
to extend the typicalFilterName logic to strings, and fix a bug where quotes in string filters (...{field=="value"}
) were being deleted.Follow-up to #1971 & #3190