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

fix(context): Address a few small context bugs #72013

Merged
merged 6 commits into from
Jun 4, 2024
Merged

Conversation

leeandher
Copy link
Member

@leeandher leeandher commented Jun 4, 2024

Depends on #72008 to avoid merge conflicts.

Fixes:

  • Empty metadata no longer annotates text. E.g. context with key constructor would return a meta of {} because Object.constructor always exists. Now it checks if that meta object is empty, rather than if it exists.
  • Custom context is no longer Title-Cased or Start Cased (to retain exactly what users send)
  • Unknown browsers from showing a (?) icon in context cards
  • Adds title to icons for legibility of smaller icons

image

image

todo

  • Fix any failing tests
  • Add a fix for icon sizing (e.g. samsung, ios devices)

@leeandher leeandher changed the title Leander/ctx feedback fix(context): Address a few small context bugs Jun 4, 2024
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 4, 2024
Copy link

codecov bot commented Jun 4, 2024

Bundle Report

Changes will decrease total bundle size by 2.2kB ⬇️

Bundle name Size Change
app-webpack-bundle-array-push 27.89MB 2.2kB ⬇️

Copy link

codecov bot commented Jun 4, 2024

Codecov Report

Attention: Patch coverage is 54.28571% with 16 lines in your changes missing coverage. Please review.

Project coverage is 77.93%. Comparing base (79fff19) to head (909abea).

Current head 909abea differs from pull request most recent head fd5d2df

Please upload reports for the commit fd5d2df to get more accurate results.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #72013       +/-   ##
===========================================
+ Coverage   56.88%   77.93%   +21.05%     
===========================================
  Files        6564     6573        +9     
  Lines      292402   292626      +224     
  Branches    50469    50529       +60     
===========================================
+ Hits       166323   228065    +61742     
+ Misses     121334    58307    -63027     
- Partials     4745     6254     +1509     
Files Coverage Δ
...tic/app/components/events/contexts/contextCard.tsx 75.00% <ø> (ø)
...tic/app/components/events/contexts/contextIcon.tsx 73.68% <100.00%> (+4.93%) ⬆️
...ponents/events/meta/annotatedText/valueElement.tsx 100.00% <100.00%> (ø)
static/app/components/events/contexts/utils.tsx 51.53% <54.54%> (ø)
.../app/components/events/contexts/platform/index.tsx 38.88% <38.88%> (ø)

... and 2026 files with indirect coverage changes

@leeandher leeandher marked this pull request as ready for review June 4, 2024 18:00
@leeandher leeandher requested a review from a team as a code owner June 4, 2024 18:00
Comment on lines +160 to +162
if (hideUnknown && imageName === logoUnknown) {
return null;
}
Copy link
Member Author

Choose a reason for hiding this comment

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

@malwilley This is the issue since even though we're asking for a firefox logo, this line will resolve true because the unknown logo and firefox logo both resolve to this for tests. So in this test, the logo doesn't actually render any more, meaning i can't use a test id. I also couldn't find a way to override this but if you know of a better alternative that'd be great

@leeandher leeandher merged commit 4acd201 into master Jun 4, 2024
41 checks passed
@leeandher leeandher deleted the leander/ctx-feedback branch June 4, 2024 18:55
leeandher added a commit that referenced this pull request Jun 4, 2024
We wanted to preserve casing for unknown context from the sdk in
#72013, but there are a few
non-context context items that weren't accounted for.

**Before**

![image](https://github.com/getsentry/sentry/assets/35509934/e97ee884-4e66-45b4-ad6e-87b4e6cb9ed8)

**After**

![image](https://github.com/getsentry/sentry/assets/35509934/a12e560f-8231-49e2-bf24-5c28648b79de)
@github-actions github-actions bot locked and limited conversation to collaborators Jun 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants