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: setup wizard #780

Merged
merged 9 commits into from
Jun 22, 2022
Merged

feat: setup wizard #780

merged 9 commits into from
Jun 22, 2022

Conversation

bruno-garcia
Copy link
Member

@bruno-garcia bruno-garcia commented Jun 4, 2022

The goal is to have an onboarding flow that will have the user hit Sentry, select an org and project, and will pre-populate the DSN and the Sentry CLI options for symbol upload.


Edit @vaind: cleaned this up somewhat, resolved TODOs and usability issues.

Remaining TODO: tests 😱

Basic workflow:
wizard


First draft does (outdated):

image

Opens the browser:
image

prepopulates orgs:
image

Then projects:
image

After selecting, the normal window shows up. With DSN, Org and Proj slug and Auth token.

@bruno-garcia bruno-garcia marked this pull request as draft June 4, 2022 19:37
@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2022

Fails
🚫 Please consider adding a changelog entry for the next release.
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- setup wizard ([#780](https://github.com/getsentry/sentry-unity/pull/780))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.

Generated by 🚫 dangerJS against 81b5abf

@HazAT
Copy link
Member

HazAT commented Jun 5, 2022

If there is only one org, one project
auto fill/select and skip the steps
even better

@vaind vaind self-assigned this Jun 8, 2022
@vaind vaind force-pushed the feat/wizard branch 3 times, most recently from 64e53c2 to 0fb1956 Compare June 9, 2022 14:01
@vaind vaind changed the title hacked up wizard flow feat: setup wizard Jun 9, 2022
@vaind vaind marked this pull request as ready for review June 9, 2022 14:12
@@ -6,7 +6,11 @@ namespace Sentry.Unity.Editor.ConfigurationWindow
{
public sealed class SentryTestWindow : SentryWindow, IDisposable
{
protected override string SentryOptionsAssetName { get; } = Path.GetRandomFileName();
public SentryTestWindow()
Copy link
Member Author

Choose a reason for hiding this comment

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

@bitsandfoxes is this supposed to be in the test project instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, we probably should move it into Sentry.Unity.Editor.Tests.

Copy link
Collaborator

Choose a reason for hiding this comment

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

moved

Copy link
Collaborator

Choose a reason for hiding this comment

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

actually... not moved - some editor tests fail after moving - leaving as is and if this bothers anyone too much, please create an issue

src/Sentry.Unity.Editor/ConfigurationWindow/Wizard.cs Outdated Show resolved Hide resolved
.Prepend(firstEntry).ToArray());
}

if (_projectSelected != 0)
Copy link
Member Author

Choose a reason for hiding this comment

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

Lets just always add the token, we just need to tell the user not to make the SentryCliOptions asset public

Copy link
Collaborator

Choose a reason for hiding this comment

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

Lets just always add the token, we just need to tell the user not to make the SentryCliOptions asset public

I'll add a note here. Also, what about auto-creating a .gitignore alongside the SentryCliOptions.asset? changed my mind, probably a bad idea

Copy link
Collaborator

Choose a reason for hiding this comment

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

image

@vaind vaind force-pushed the feat/wizard branch 2 times, most recently from 55253e5 to 7b1d098 Compare June 14, 2022 16:44
Copy link
Member Author

@bruno-garcia bruno-garcia left a comment

Choose a reason for hiding this comment

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

I can't approve my own PR, but great stuff @vaind ! thank you

Directory.Build.targets Outdated Show resolved Hide resolved
@@ -6,7 +6,11 @@ namespace Sentry.Unity.Editor.ConfigurationWindow
{
public sealed class SentryTestWindow : SentryWindow, IDisposable
{
protected override string SentryOptionsAssetName { get; } = Path.GetRandomFileName();
public SentryTestWindow()
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, we probably should move it into Sentry.Unity.Editor.Tests.

src/Sentry.Unity.Editor/ConfigurationWindow/Wizard.cs Outdated Show resolved Hide resolved
src/Sentry.Unity.Editor/ConfigurationWindow/Wizard.cs Outdated Show resolved Hide resolved
src/Sentry.Unity.Editor/ConfigurationWindow/Wizard.cs Outdated Show resolved Hide resolved
src/Sentry.Unity.Editor/ConfigurationWindow/WizardApi.cs Outdated Show resolved Hide resolved
@vaind vaind merged commit 9f3612c into main Jun 22, 2022
@vaind vaind deleted the feat/wizard branch June 22, 2022 10:42
@vaind vaind mentioned this pull request Jun 22, 2022
@bruno-garcia
Copy link
Member Author

Thanks for transforming a rough idea into something amazing guys!

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.

5 participants