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

Add support for controlling entity settings visibility during runtime #7816

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

jweak
Copy link
Contributor

@jweak jweak commented Jun 1, 2023

Extension might want to control visibility of entity settings during runtime. This change adds this ability. Has the same logic than earlier implementation for AppPreferenceTabRegistration

Resolves #7815

@jweak jweak added the enhancement New feature or request label Jun 1, 2023
@jweak jweak added this to the 6.5.3 milestone Jun 1, 2023
@jweak jweak requested a review from a team as a code owner June 1, 2023 07:03
@jweak jweak requested review from Iku-turso, gabriel-mirantis and a team and removed request for a team June 1, 2023 07:03
@@ -36,6 +39,7 @@ export interface RegisteredEntitySetting {
components: EntitySettingComponents;
source?: string;
group: string;
isShown: IComputedValue<boolean>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not call this also visible?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to replicate the existing behavior that was implemented with AppPreferenceTabRegistration. I think it's a convention in this code base for Showable and such

@@ -36,6 +39,7 @@ export interface RegisteredEntitySetting {
components: EntitySettingComponents;
source?: string;
group: string;
isShown: IComputedValue<boolean>;
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this should be optional to not break something..

Copy link
Contributor Author

@jweak jweak Jun 1, 2023

Choose a reason for hiding this comment

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

The EntitySettingRegistration from extension has optional visible. When the extension settings are read the extension settings are converted to RegisteredEntitySetting and then we can make this not optional which is nicer for the users of RegisteredEntitySetting. We default to visible then if the visible property is not set

Copy link
Collaborator

@Nokel81 Nokel81 left a comment

Choose a reason for hiding this comment

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

Could we get a unit test showing that this implementation is working please?

@Nokel81
Copy link
Collaborator

Nokel81 commented Jun 1, 2023

Also this is an enhancement, it should not go against a patch release @jweak

@jweak
Copy link
Contributor Author

jweak commented Jun 1, 2023

Also this is an enhancement, it should not go against a patch release @jweak

Okay I'm not that familiar how the milestones work. There's a high prio bug in an extension that needs this though.

@Nokel81
Copy link
Collaborator

Nokel81 commented Jun 1, 2023

oh okay I see, sure

@jweak
Copy link
Contributor Author

jweak commented Jun 2, 2023

Could we get a unit test showing that this implementation is working please?

Good point! Added unit tests.

@jweak jweak requested a review from Nokel81 June 2, 2023 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Entity Settings visibility during runtime
3 participants