Skip to content

feat(data-modeling): display errors when creating a diagram COMPASS-9307 #6892

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

Merged
merged 14 commits into from
May 6, 2025

Conversation

mabaasit
Copy link
Contributor

@mabaasit mabaasit commented May 5, 2025

In this PR, we are showing errors to the user that are caused listing databases/collections.

Preview

For listing databases/collections, the error is not thrown COMPASS-5275. In the screenshot, i manually threw an error to mimic how it looks.

image

Description

Checklist

  • New tests and/or benchmarks are included
  • Documentation is changed or added
  • If this change updates the UI, screenshots/videos are added and a design review is requested
  • I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

@github-actions github-actions bot added the feat label May 5, 2025
@mabaasit mabaasit added the feature flagged PRs labeled with this label will not be included in the release notes of the next release label May 5, 2025
@mabaasit mabaasit marked this pull request as ready for review May 5, 2025 13:44
@@ -287,15 +295,25 @@ export const generateDiagramWizardReducer: Reducer<
if (isAction(action, GenerateDiagramWizardActionTypes.CONNECTION_FAILED)) {
return {
...state,
inProgress: false,
error: action.error,
step: 'SELECT_CONNECTION',
Copy link
Member

@Anemy Anemy May 5, 2025

Choose a reason for hiding this comment

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

We actually do want to close the wizard when connecting fails. This lets the user click the Review button on the connect error toast. It's something we have in the scope: https://docs.google.com/document/d/1DX1F7LWirV1WkVV3G4RNEyxoX64oRPBYsJbd2NgL8OY
Sorry for not having this explicitly on the ticket, that's a miss on my end.
We don't need to show any connection error here then, the toast handles that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In that case i wonder if we should start with name? We let user enter the name and then its kinda lost if we close the modal when connection fails. But as its explicit in scope, i'll revert this behaviour.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in 9f5e3a1

Copy link
Contributor

@paula-stacho paula-stacho May 6, 2025

Choose a reason for hiding this comment

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

I agree it's weird behavior, normally the user should be able to continue the flow.. could we offer them the review button from here? then the connection modal would open on top of it. but only if it's straightforward - it's not worth much effort for the name only (especially since it might end up being autogenerated)

Copy link
Member

Choose a reason for hiding this comment

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

I'm thinking that would make more sense, but then that review button opens up a different modal. Maybe connect being first makes sense. We can follow up, good things raised.

@mabaasit mabaasit merged commit 4e1a0b2 into main May 6, 2025
105 of 108 checks passed
@mabaasit mabaasit deleted the COMPASS-9307-diagram-errors branch May 6, 2025 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat feature flagged PRs labeled with this label will not be included in the release notes of the next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants