-
Notifications
You must be signed in to change notification settings - Fork 32
Respect doNotPromptForParty
profile preference
#1204
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work! 🚀
Isn't this, in a way, a breaking change? Behavior seems to change from how it was before, at least. I know we'll get complaints if we just roll this out in a patch release, even if it just a bugfix for a property we didn't properly respect before. How do we manage this to properly notify everyone? Calling on @RonnyB71. I know at least some external cypress tests will fail if this selector suddenly interferes - we're not the only ones running e2e-tests on apps. |
Okey so what should be done about this?
Also, if this issue need some more time, should we fix the instance sender PDF bug in app-lib for now? Altinn/app-lib-dotnet#245 |
That sounds like a good approach to me! 🤔 Another way could be to keep the implementation as it is, but make it a feature toggle in the app-frontend code. I'm doing that for #1175 in this file here, and then just using an if/else everywhere in the code so that I can toggle the new/old functionality. That way, we can remove the constant in v4 and roll it out then - in essence making breaking changes now that are deactivated until everyone are ready to start v4 (and avoiding having to maintain and merge back and forth between a main and v4 branch that are guaranteed to get out-of-sync quickly when we start making large sweeping changes). |
@olemartinorg let me know if you think the feature toggle strategy is fine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good! 🥳 I absolutely agree with the feature toggle functionality. In time I guess we should also make it controllable using a cookie (read on app load, set for each app using the /{org}/{app}
path), and extend the developer tools to let you toggle on/off features in preview for the next major version (which should reload the page using that feature).
SonarCloud Quality Gate failed. |
Description
Respect the profile preference that implies that you should always be presented with party selection on new instantiation unless you specifically ask not to have this happen.
What happenes now?
To make this possible I had to always pull the list of valid parties and store in state.party.parties, before, it would only get this list when entering party selection, and would just put the current party in otherwise. This change will possibly fix Altinn/app-lib-dotnet#244 as well.
I manually updated the profile preferences for all of the test users in tt02 that we use in cypress to have
doNotPromptForParty=true
, that way all the existing tests work without modification. I have also updated this inapp-localtest
: Altinn/app-localtest#42Related Issue(s)
Verification/QA
src/layout/layout.d.ts
andlayout.schema.v1.json
, and these are all backwards-compatiblekind/*
label to this PR for proper release notes grouping