Skip to content

Conversation

@leeandher
Copy link
Member

Before:

image

After:

image

@leeandher leeandher requested review from a team and Christinarlong June 17, 2025 21:47
@leeandher leeandher requested a review from a team as a code owner June 17, 2025 21:47
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 17, 2025
@leeandher leeandher force-pushed the leander/eco-625-ui branch from 3f79920 to 2f6ac1b Compare June 17, 2025 21:54
Copy link
Contributor

@Christinarlong Christinarlong left a comment

Choose a reason for hiding this comment

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

frontend is hard 💫

Comment on lines +42 to +45
componentFunction?: (props: {
data: GroupActivity['data'];
sentry_app: GroupActivity['sentry_app'];
user: GroupActivity['user'];
Copy link
Contributor

Choose a reason for hiding this comment

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

😵 is the stuff in the brackets ({}) creating the dictionary? Or is this like the typing? e.g data: GroupActivity['data'] == data is type GroupActivity['data'] or data is GroupActivity['data'].

if it's the former, is it possible to get more defined/concrete types?

Copy link
Member Author

Choose a reason for hiding this comment

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

Everything in the brackets is a type, and it's just referencing the data/sentry_app/user attributes of the GroupActivity type.

With this change I'm just swapping from positional arguments to a single object. It's self documenting (because of the key) and makes it easier to add new props (like sentry_app) without needing to keep track of positional arguments or pass in undefined (e.g. func(data, null, sentryApp) Generally we prefer objects to positional arguments unless theres a good reason for them

Comment on lines +58 to +61
if (sentry_app) {
return function () {
return <SentryAppAvatar sentryApp={sentry_app} />;
};
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be more readable with an arrow func 🤔

Suggested change
if (sentry_app) {
return function () {
return <SentryAppAvatar sentryApp={sentry_app} />;
};
if (sentry_app) {
return () => <SentryAppAvatar sentryApp={sentry_app} />;
};

Copy link
Member Author

Choose a reason for hiding this comment

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

I had it as an arrow function, but the change was automatically performed by eslint, so I don't really have a choice unfortunately :/

Copy link
Contributor

Choose a reason for hiding this comment

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

bruh @eslint, there's literally another anon arrow 2 lines later 💀

@leeandher
Copy link
Member Author

leeandher commented Jun 18, 2025

frontend is hard 💫

haven't encountered this one before but getsentry-bot applying pre-commit fixes was breaking the PR, had to tweak things manually -- should be good in CI now.

Comment on lines +58 to +61
if (sentry_app) {
return function () {
return <SentryAppAvatar sentryApp={sentry_app} />;
};
Copy link
Contributor

Choose a reason for hiding this comment

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

bruh @eslint, there's literally another anon arrow 2 lines later 💀

@leeandher leeandher merged commit 413f76b into master Jun 18, 2025
44 checks passed
@leeandher leeandher deleted the leander/eco-625-ui branch June 18, 2025 16:01
andrewshie-sentry pushed a commit that referenced this pull request Jun 19, 2025
…proxy user (#93763)

Before:

<img width="980" alt="image"
src="https://github.com/user-attachments/assets/257ca029-7eb5-450b-935b-b451c63cfefa"
/>


After:

<img width="905" alt="image"
src="https://github.com/user-attachments/assets/441a792f-2678-4c2c-8236-a1b19d86c01c"
/>

---------

Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Jul 4, 2025
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.

3 participants