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

feat(trace-explorer): Render list of trace related project icons #73691

Merged

Conversation

Zylphrex
Copy link
Member

@Zylphrex Zylphrex commented Jul 2, 2024

Instead of always rendering a single project icon for the trace root, render a list of project icons for all related projects in the trace. We try to prioritize projects that are selected in order to avoid users thinking it's making a cross project query.

Screenshot

image

Instead of always rendering a single project icon for the trace root, render a
list of project icons for all related projects in the trace. We try to
prioritize projects that are selected in order to avoid users thinking it's
making a cross project query.
@Zylphrex Zylphrex requested a review from a team as a code owner July 2, 2024 21:29
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 2, 2024
maxVisibleProjects?: number;
}

export function ProjectsRenderer({
Copy link
Member Author

Choose a reason for hiding this comment

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

This was largely adapted from AvatarList however that component is very much specialized right now and doesn't extend to this use case very well. A good place to clean up in the future.

Copy link

codecov bot commented Jul 2, 2024

Bundle Report

Changes will increase total bundle size by 2.82kB ⬆️

Bundle name Size Change
app-webpack-bundle-array-push 27.31MB 2.82kB ⬆️

Copy link
Member

@k-fish k-fish left a comment

Choose a reason for hiding this comment

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

Nothing breaking, a few code quality comments though.

static/app/views/traces/content.tsx Outdated Show resolved Hide resolved
Comment on lines +844 to +850
grid-template-columns: 116px auto repeat(2, min-content) 85px 112px 66px;
`;

const SpanPanelContent = styled('div')`
width: 100%;
display: grid;
grid-template-columns: repeat(1, min-content) auto repeat(1, min-content) 160px 85px;
grid-template-columns: 100px auto repeat(1, min-content) 160px 85px;
Copy link
Member

Choose a reason for hiding this comment

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

Why? doesn't this cover ids?

Copy link
Member Author

Choose a reason for hiding this comment

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

we dont use a monospace font for the id so depending on the id, the trace/span id could end up with different widths using min-content

Copy link
Member

Choose a reason for hiding this comment

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

Ah now you say it I did notice that

static/app/views/traces/fieldRenderers.spec.tsx Outdated Show resolved Hide resolved
static/app/views/traces/fieldRenderers.spec.tsx Outdated Show resolved Hide resolved
static/app/views/traces/fieldRenderers.spec.tsx Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jul 4, 2024

Codecov Report

Attention: Patch coverage is 56.00000% with 22 lines in your changes missing coverage. Please review.

Project coverage is 78.12%. Comparing base (f08644a) to head (0bc9cb2).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #73691      +/-   ##
==========================================
+ Coverage   78.11%   78.12%   +0.01%     
==========================================
  Files        6659     6659              
  Lines      297962   298009      +47     
  Branches    51266    51270       +4     
==========================================
+ Hits       232752   232825      +73     
+ Misses      58920    58895      -25     
+ Partials     6290     6289       -1     
Files Coverage Δ
static/app/views/traces/data.tsx 0.00% <ø> (ø)
static/app/views/traces/fieldRenderers.tsx 72.17% <96.55%> (+54.93%) ⬆️
static/app/views/traces/content.tsx 0.00% <0.00%> (ø)

... and 2 files with indirect coverage changes

@Zylphrex Zylphrex merged commit 366ba80 into master Jul 4, 2024
42 of 43 checks passed
@Zylphrex Zylphrex deleted the txiao/feat/render-list-of-trace-related-project-icons branch July 4, 2024 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants