swagger-ui icon indicating copy to clipboard operation
swagger-ui copied to clipboard

feat: implement automatic auth dialog closure for better UX

Open Musaddiq625 opened this issue 4 months ago • 2 comments

Description

  • Added functionality to automatically close the authorization dialog when the Authorize button is pressed with a non-empty token.
  • Added 50ms timeout to ensure authorization state updates complete before closing
  • Provides better user experience with automatic dialog closure while maintaining visual feedback

Motivation and Context

Previously, users had to manually close the authorization dialog after successful authentication, requiring an extra click on the "Close" button. This created unnecessary friction in the authentication workflow - users would successfully authenticate (seeing the button change from "Authorize" to "Logout") but still needed to manually dismiss the dialog. This change implements the requested auto-close feature with a minimal 50ms delay that feels immediate to users but allows proper state management and provides visual confirmation of successful authorization.

Checklist

My PR contains...

  • [ ] No code changes (src/ is unmodified: changes to documentation, CI, metadata, etc.)
  • [ ] Dependency changes (any modification to dependencies in package.json)
  • [ ] Bug fixes (non-breaking change which fixes an issue)
  • [x] Improvements (misc. changes to existing features)
  • [ ] Features (non-breaking change which adds functionality)

My changes...

  • [ ] are breaking changes to a public API (config options, System API, major UI change, etc).
  • [ ] are breaking changes to a private API (Redux, component props, utility functions, etc.).
  • [ ] are breaking changes to a developer API (npm script behavior changes, new dev system dependencies, etc).
  • [x] are not breaking changes.

Documentation

  • [x] My changes do not require a change to the project documentation.
  • [ ] My changes require a change to the project documentation.
  • [ ] If yes to above: I have updated the documentation accordingly.

Automated tests

  • [x] My changes can not or do not need to be tested.
  • [ ] My changes can and should be tested by unit and/or integration tests.
  • [ ] If yes to above: I have added tests to cover my changes.
  • [ ] If yes to above: I have taken care to cover edge cases in my tests.
  • [ ] All new and existing tests passed.

Musaddiq625 avatar Oct 10 '25 15:10 Musaddiq625

@robert-hebel-sb

Musaddiq625 avatar Oct 16 '25 06:10 Musaddiq625

@lukaszzazulak @robert-hebel-sb Can I get update on this please

Musaddiq625 avatar Oct 25 '25 07:10 Musaddiq625