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

Some improvements around building common shapes #15652

Merged
merged 7 commits into from
Apr 4, 2024
Merged

Conversation

MikeAlhayek
Copy link
Member

No description provided.

@@ -97,8 +98,8 @@ public async Task<IHtmlContent> ExecuteAsync(DisplayContext context)
await shapeDescriptor.DisplayingAsync.InvokeAsync((action, displayContext) => action(displayContext), displayContext, _logger);

// Copy all binding sources (all templates for this shape) in order to use them as Localization scopes.
shapeMetadata.BindingSources = shapeDescriptor.BindingSources.Where(x => x != null).ToList();
if (!shapeMetadata.BindingSources.Any())
shapeMetadata.BindingSources = shapeDescriptor.BindingSources;
Copy link
Member

Choose a reason for hiding this comment

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

Can you check that no null values can be set as Bindingsources in any way?

Copy link
Member Author

Choose a reason for hiding this comment

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

in the ShapeAlterationBuilder.cs which is why I added a null check. and if needed, we can add .Where(x => x != null) in the ShapeDescriptorIndex class instead so it is not evaluated on every call.

@agriffard agriffard changed the title Some improvments around building common shapes Some improvements around building common shapes Apr 4, 2024
Copy link

github-actions bot commented Apr 4, 2024

This pull request has merge conflicts. Please resolve those before requesting a review.

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.

None yet

2 participants