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

ref(feedback): Simplify feedback function params #11957

Merged
merged 1 commit into from May 8, 2024

Conversation

ryan953
Copy link
Member

@ryan953 ryan953 commented May 8, 2024

We can simplify the function params and only pass options around most of the time.

I also moved some dialog specific css variables into dialog.css.ts so they can be async loaded, which depends on the options config.

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

@ryan953 ryan953 requested a review from a team as a code owner May 8, 2024 20:28
Comment on lines -59 to -61
--dialog-inset: auto var(--page-margin) var(--page-margin) auto;
--dialog-padding: 24px;

Copy link
Member Author

Choose a reason for hiding this comment

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

these and a bunch of stuff above are in Dialog.css.ts now, along with all the :host { ... } stuff to wrap it.

Copy link
Contributor

github-actions bot commented May 8, 2024

size-limit report 📦

Path Size
@sentry/browser 21.65 KB (0%)
@sentry/browser (incl. Tracing) 32.68 KB (0%)
@sentry/browser (incl. Tracing, Replay) 68.02 KB (0%)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 61.42 KB (0%)
@sentry/browser (incl. Tracing, Replay with Canvas) 72.06 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback) 84.15 KB (-0.09% 🔽)
@sentry/browser (incl. Feedback) 37.66 KB (-0.22% 🔽)
@sentry/browser (incl. sendFeedback) 26.21 KB (0%)
@sentry/browser (incl. FeedbackAsync) 30.73 KB (-0.57% 🔽)
@sentry/react 24.33 KB (0%)
@sentry/react (incl. Tracing) 35.64 KB (0%)
@sentry/vue 25.48 KB (0%)
@sentry/vue (incl. Tracing) 34.47 KB (0%)
@sentry/svelte 21.78 KB (0%)
CDN Bundle 24.13 KB (0%)
CDN Bundle (incl. Tracing) 34.05 KB (0%)
CDN Bundle (incl. Tracing, Replay) 67.72 KB (+0.01% 🔺)
CDN Bundle (incl. Tracing, Replay, Feedback) 72.83 KB (-0.24% 🔽)
CDN Bundle - uncompressed 70.99 KB (0%)
CDN Bundle (incl. Tracing) - uncompressed 101 KB (0%)
CDN Bundle (incl. Tracing, Replay) - uncompressed 210.61 KB (0%)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 223.09 KB (-0.46% 🔽)
@sentry/nextjs (client) 34.87 KB (0%)
@sentry/sveltekit (client) 33.24 KB (+0.01% 🔺)
@sentry/node 147.34 KB (-0.01% 🔽)

}

export function DialogHeader({ formTitle, showBranding }: Props): VNode {
Copy link
Member

Choose a reason for hiding this comment

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

l: i kind of like having the specific props, esp for this component where it only needs 2 of the options

@ryan953 ryan953 merged commit 9f19754 into develop May 8, 2024
93 checks passed
@ryan953 ryan953 deleted the ryan953/feedback-pass-opts branch May 8, 2024 20:48
andreiborza pushed a commit that referenced this pull request May 16, 2024
We can simplify the function params and only pass options around most of
the time.

I also moved some dialog specific css variables into dialog.css.ts so
they can be async loaded, which depends on the options config.

Before submitting a pull request, please take a look at our

[Contributing](https://github.com/getsentry/sentry-javascript/blob/master/CONTRIBUTING.md)
guidelines and verify:

- [ ] If you've added code that should be tested, please add tests.
- [ ] Ensure your code lints and the test suite passes (`yarn lint`) &
(`yarn test`).
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.

None yet

3 participants