Skip to content

Conversation

@zeusongit
Copy link
Contributor

Purpose

This is a different implementation of the previous PR
In this we manage each method that calls the Auth individually.
This is updated so that we can show a warning for each user action.
So now each user action like login, triggering autocomplete or publishing a package etc. that requires Auth will throw the warning of IDSDK is not initialized/available.
explorer_AxHENdYHN0

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated
  • This PR contains no files larger than 50 MB

Release Notes

Improve UX when IDSDK is not installed on system running Dynamo #2

Reviewers

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-7268

}
catch (Exception e)
{
// Log the exception and show a notification to the user
Copy link
Contributor

Choose a reason for hiding this comment

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

Log the exception?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I added this to handle a crash that I encountered while testing, I think there will be more work done for cluster autocomplete integration and this will likely change, so we can handle it then.

Copy link
Contributor

@reddyashish reddyashish left a comment

Choose a reason for hiding this comment

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

LGTM with one comment


private void LogoutOption_Click(object sender, RoutedEventArgs e)
{
if (!DynamoViewModel.IsIDSDKInitialized()) return;
Copy link
Member

Choose a reason for hiding this comment

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

is there a way to avoid needing to add these checks everywhere? What about adding this check, or an event that eventually raises this check to getters that access data that would have required initialization to succeed in the authprovider - ie the token.

With the current solution proposed here devs need to know that they should add these checks.

Copy link
Contributor Author

@zeusongit zeusongit Feb 6, 2025

Choose a reason for hiding this comment

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

The first attempt(#15790) was exactly that, but problem with that is we use those getters at multiple places, so for example, when user clicks on SignIn button, the event would be fired 6 times and the popup will be shown 6 times. I met with @pinzart to discuss a solution, this approach may be more code, but gives more control.

@johnpierson
Copy link
Member

Tested with IDSDK disabled, and it LGTM from that point of view.
image

@zeusongit zeusongit merged commit ec3ad20 into DynamoDS:master Feb 6, 2025
23 of 24 checks passed
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