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

Ddg ui find #427

Merged
merged 14 commits into from
Aug 7, 2019
Merged

Ddg ui find #427

merged 14 commits into from
Aug 7, 2019

Conversation

everett980
Copy link
Collaborator

Adds UiFind to DDG, with temporary isUiFindMatch styling.

Focused, with query:
image

Not focused, with query:
image

Not focused, without query:
image

Unfortunately antd's Input in UiFindInput made getting this right more time consuming than it should have been. Between some styling conflicts, antd's allowClear prop implementation (in 3.12.0+), and how it handles suffix it probably would've been better to simply use a native input instead.
Due to other work being dependent on this, I figured it'd be best to raise this PR as is. Then we can decide the priority of finalizing these details in this PR versus wrapping up other DDG UI work.

@everett980 everett980 requested a review from tiffon July 31, 2019 21:44
Copy link
Member

@tiffon tiffon left a comment

Choose a reason for hiding this comment

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

Did you have to update something? There are a lot of changes to the yarn.lock file.

Also, the packages were fetched from unpm.uberinternal.com which is now in the lock file.

Signed-off-by: Everett Ross <[email protected]>
@everett980
Copy link
Collaborator Author

I had tried to use [email protected] because they implemented allowClear, but the aesthetic was lacking and seemed non-configurable. I reverted the package.json, but forgot about the yarn.lock. It should be unchanged now.

@codecov
Copy link

codecov bot commented Aug 1, 2019

Codecov Report

Merging #427 into master will decrease coverage by 0.06%.
The diff coverage is 93.65%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #427      +/-   ##
=========================================
- Coverage   91.67%   91.6%   -0.07%     
=========================================
  Files         176     176              
  Lines        4012    4039      +27     
  Branches      957     968      +11     
=========================================
+ Hits         3678    3700      +22     
- Misses        292     295       +3     
- Partials       42      44       +2
Impacted Files Coverage Δ
...aeger-ui/src/components/DeepDependencies/Graph.tsx 100% <100%> (ø) ⬆️
...i/src/components/DeepDependencies/Header/index.tsx 100% <100%> (ø) ⬆️
packages/jaeger-ui/src/model/ddg/Graph.tsx 100% <100%> (ø) ⬆️
...components/DeepDependencies/getNodeLabel/index.tsx 100% <100%> (ø) ⬆️
...nts/DeepDependencies/Header/HopsSelector/index.tsx 100% <100%> (ø) ⬆️
...mponents/DeepDependencies/getNodeLabel/DdgNode.tsx 100% <100%> (ø) ⬆️
...es/jaeger-ui/src/components/common/UiFindInput.tsx 82.35% <40%> (-17.65%) ⬇️
...aeger-ui/src/components/DeepDependencies/index.tsx 98.14% <94.44%> (+0.27%) ⬆️
...eViewer/TimelineHeaderRow/TimelineViewingLayer.tsx 88.13% <0%> (-3.39%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9df691d...0c9330f. Read the comment docs.

@everett980 everett980 mentioned this pull request Aug 1, 2019
Copy link
Member

@tiffon tiffon left a comment

Choose a reason for hiding this comment

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

Styling looks great. LMK if any of my comments look awry.

@@ -55,7 +56,7 @@ export class UnconnectedUiFindInput extends React.PureComponent<TProps, StateTyp
ownInputValue: undefined,
};

updateUiFindQueryParam = _debounce((uiFind: string | undefined) => {
updateUiFindQueryParam = _debounce((uiFind?: string | undefined) => {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think undefined is needed when the ? is used:

type T = { a?: string }
const t: T = { a: undefined } // ok

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

that works but seems off imo. to me, type T means that if Reflect.has(t, a) === true then t.a is a string.

for instance:

 function(pt: T) {
     if (Reflect.has(pt, 'a')) {
         console.log(pt.a.repeat(3));
     }
 }

shouldn't have any TS errors IMO, but it does (pt.a can be undefined so can't repeat off of it).

Oh well, I removed the | undefined

packages/jaeger-ui/src/components/common/UiFindInput.tsx Outdated Show resolved Hide resolved
packages/jaeger-ui/src/model/ddg/Graph.tsx Outdated Show resolved Hide resolved
packages/jaeger-ui/src/model/ddg/Graph.tsx Outdated Show resolved Hide resolved
Copy link
Member

@tiffon tiffon left a comment

Choose a reason for hiding this comment

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

Added a few comments in the threads of the previous comments.

Copy link
Member

@tiffon tiffon left a comment

Choose a reason for hiding this comment

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

LGTM. Great work.

@tiffon tiffon merged commit b86cfd3 into jaegertracing:master Aug 7, 2019
@tiffon tiffon deleted the ddg-ui-find branch August 7, 2019 20:43
vvvprabhakar pushed a commit to vvvprabhakar/jaeger-ui that referenced this pull request Jul 5, 2021
Ddg ui find
Signed-off-by: vvvprabhakar <[email protected]>
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