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

HDS-2245: login strict mode issues #1273

Merged
merged 4 commits into from
May 6, 2024
Merged

Conversation

NikoHelle
Copy link
Contributor

@NikoHelle NikoHelle commented Apr 26, 2024

Description

Login had issue with external modules and strict mode. Passed array was mishandled.

Added a utility function to detect ignoreable login callback errors. Kukkuu used the error message to detect these, so adding a function would make it less error prone.

Could not add strict mode to Storybook, because there is a add-on that fails. There is a separate ticket for that.

Related Issue

Closes HDS-2245

Motivation and Context

How Has This Been Tested?

Added local test for the function. StrictMode cannot be used in tests.

Demos:

Docs
React. It has strict mode on, because add-on was removed for this.

Screenshots (if appropriate):

Add to changelog

  • Added needed line to changelog

If modules are given from outside, the array is preserved and inner modules (sessionPollerSettings, apiTokensClient) are added again and again.
@NikoHelle NikoHelle requested a review from a team April 26, 2024 08:27
@NikoHelle NikoHelle force-pushed the hds-2245-login-strict-mode branch 2 times, most recently from f4652cf to 4a978cd Compare April 26, 2024 09:38
…eady

Kukkuu-ui used the error.message to detect can it be ignored, which is a fail-prone

Added a new .util.ts file or hds-js would add React to its bundle.
@NikoHelle NikoHelle force-pushed the hds-2245-login-strict-mode branch from 4a978cd to c392a63 Compare April 26, 2024 09:55
@laurakarhu laurakarhu requested a review from a team May 3, 2024 05:30
@laurakarhu laurakarhu added this to the HDS 3.8.0 milestone May 3, 2024
Copy link
Contributor

@laurakarhu laurakarhu left a comment

Choose a reason for hiding this comment

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

Looks good to me :)

Copy link
Contributor

@mrTuomoK mrTuomoK left a comment

Choose a reason for hiding this comment

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

Good good 👍

@NikoHelle NikoHelle merged commit ec57a94 into development May 6, 2024
7 checks passed
@NikoHelle NikoHelle deleted the hds-2245-login-strict-mode branch May 6, 2024 08:34
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.

3 participants