Skip to content
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

1405 [Transactions] Display parsed value when hovering over Interpolations#1405 #1447

Conversation

xoscar
Copy link
Contributor

@xoscar xoscar commented Nov 1, 2022

This PR wires up the parse expressions service to the FE by displaying the interpolated values when hovering over inputs.
It is available for both Expressions and Interpolation editors and can be used by passing context to the editor component.

Changes

  • Editors now have a context prop.
  • New service logic for expressions.
  • Tooltip display for editors.

Fixes

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

https://www.loom.com/share/be6aaf7ca74440d4ad87888b122b80f6

@xoscar xoscar linked an issue Nov 1, 2022 that may be closed by this pull request
@xoscar xoscar changed the base branch from main to 1427-transactions-create-parse-statement-service November 1, 2022 18:26
@@ -24,6 +24,7 @@ JsonPath {"json_path '" Identifier "'"}
Pipe {"|"}
Number { @digit+ }
Comparator {"=" | "contains" | "!=" | "<" | ">" | "<=" | ">=" | "not-contains" }
Duration { Number ("." Number)? ("ns" | "us" | "ms"| "s"| "m" | "h") }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding the duration token that was missing 🥴

@xoscar xoscar marked this pull request as ready for review November 1, 2022 19:00
…1405-transactions-display-parsed-value-when-hovering-over-interpolations
…thub.com:kubeshop/tracetest into 1427-transactions-create-parse-statement-service
…1405-transactions-display-parsed-value-when-hovering-over-interpolations
Base automatically changed from 1427-transactions-create-parse-statement-service to main November 1, 2022 19:36
Copy link
Contributor

@jorgeepc jorgeepc left a comment

Choose a reason for hiding this comment

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

Looks good! Great job @xoscar 🔥

@@ -50,6 +64,18 @@ export const AssertionCheck = ({field, index, name, remove, form, assertions, at
[assertions, attributeList, form, name]
);

const selector = Form.useWatch('selector') || '';
const editorContext = useMemo(() => {
const [spanId = ''] = spanIdList;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need the first spanId?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I'm going to add a TODO here, we have the same issue as when we auto-complete the expected value with first span info, even if there can be something from a different one. I'm going to bring this to the rest of the team.

@@ -52,6 +52,8 @@ export const GridContainer = styled.div`

export const CheckItemContainer = styled.div`
padding: 10px 12px 10px 42px;

Copy link
Contributor

Choose a reason for hiding this comment

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

not needed space 😄

@xoscar xoscar merged commit 77232dc into main Nov 2, 2022
@xoscar xoscar deleted the 1405-transactions-display-parsed-value-when-hovering-over-interpolations branch November 2, 2022 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Transactions] Display parsed value when hovering over Interpolations
3 participants