Skip to content

[Windows] Fix for IndicatorView using templated icons not working #28905

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

Merged
merged 10 commits into from
Apr 22, 2025

Conversation

SyedAbdulAzeemSF4852
Copy link
Contributor

Issue Details

  • When defining a data template in the IndicatorView, the data template is not applied, and instead, a circle shape is displayed.

Root Cause

  • Once the indicator's view data template is updated, the shapes are also being applied, which overrides the data template and displays the shapes instead.

Description

  • If a data template is specified, then skipped the creation of shapes and the updating of indicator colors.

Validated the behaviour in the following platforms

  • Windows
  • Android
  • iOS
  • Mac

Issues Fixed

Fixes #7144

Output

Before After

@dotnet-policy-service dotnet-policy-service bot added community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration labels Apr 10, 2025
@jsuarezruiz jsuarezruiz added area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/windows labels Apr 10, 2025
public void IndicatorViewWithTemplatedIcon()
{
App.WaitForElement("descriptionLabel");
VerifyScreenshot();
Copy link
Contributor

Choose a reason for hiding this comment

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

Pending snapshots in all platforms.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jsuarezruiz , I've attached the screenshots for the Android and iOS platforms. I will add the screenshots for the other platforms in the next CI run​.

@SyedAbdulAzeemSF4852 SyedAbdulAzeemSF4852 force-pushed the fix-7144 branch 2 times, most recently from 434dece to 3ae6618 Compare April 11, 2025 10:46
@SyedAbdulAzeemSF4852 SyedAbdulAzeemSF4852 marked this pull request as ready for review April 11, 2025 13:24
@SyedAbdulAzeemSF4852 SyedAbdulAzeemSF4852 requested a review from a team as a code owner April 11, 2025 13:24
@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rmarinho
Copy link
Member

/azp run

rmarinho
rmarinho previously approved these changes Apr 15, 2025
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@@ -36,8 +36,10 @@ public void SetIndicatorView(IIndicatorView indicatorView)

internal void UpdateIndicatorsColor()
{
if (_indicatorView == null)
if (_indicatorView is null || (_indicatorView is ITemplatedIndicatorView templatedView && templatedView.IndicatorsLayoutOverride is not null))
Copy link
Contributor

Choose a reason for hiding this comment

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

This condition is repeated 2 times, can create an internal property like:

internal bool UseShapeIndicator  =>
    _indicatorView == null || 
    (_indicatorView is ITemplatedIndicatorView templatedView && templatedView.IndicatorsLayoutOverride != null);


if (UseShapeIndicator)
{

}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jsuarezruiz , Thanks for the suggestion! I've updated the code to use an internal property as you recommended.

@PureWeen PureWeen moved this from Todo to Ready To Review in MAUI SDK Ongoing Apr 18, 2025
@github-project-automation github-project-automation bot moved this from Ready To Review to Approved in MAUI SDK Ongoing Apr 21, 2025
@rmarinho
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen changed the base branch from main to inflight/current April 22, 2025 09:56
@PureWeen PureWeen merged commit 78fabe8 into dotnet:inflight/current Apr 22, 2025
126 of 129 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in MAUI SDK Ongoing Apr 22, 2025
PureWeen pushed a commit that referenced this pull request Apr 23, 2025
…8905)

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working ) SyedAbdulAzeemSF4852 SyedAbdulAzeemSF4852 committed last week

* Have added snapshots for iOS and Android

* Have added the snapshots

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )
github-actions bot pushed a commit that referenced this pull request Apr 28, 2025
…8905)

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working ) SyedAbdulAzeemSF4852 SyedAbdulAzeemSF4852 committed last week

* Have added snapshots for iOS and Android

* Have added the snapshots

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )
anandhan-rajagopal pushed a commit to anandhan-rajagopal/maui that referenced this pull request May 2, 2025
…tnet#28905)

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working ) SyedAbdulAzeemSF4852 SyedAbdulAzeemSF4852 committed last week

* Have added snapshots for iOS and Android

* Have added the snapshots

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )
anandhan-rajagopal pushed a commit to anandhan-rajagopal/maui that referenced this pull request May 2, 2025
…tnet#28905)

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working ) SyedAbdulAzeemSF4852 SyedAbdulAzeemSF4852 committed last week

* Have added snapshots for iOS and Android

* Have added the snapshots

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )
PureWeen pushed a commit that referenced this pull request May 2, 2025
…8905)

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working ) SyedAbdulAzeemSF4852 SyedAbdulAzeemSF4852 committed last week

* Have added snapshots for iOS and Android

* Have added the snapshots

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )
SuthiYuvaraj pushed a commit to SuthiYuvaraj/maui that referenced this pull request May 9, 2025
…tnet#28905)

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working ) SyedAbdulAzeemSF4852 SyedAbdulAzeemSF4852 committed last week

* Have added snapshots for iOS and Android

* Have added the snapshots

* [Windows] Fix for 7144 ( IndicatorView using templated icons not working )
@github-actions github-actions bot locked and limited conversation to collaborators May 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/windows
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Windows] [Scenario Day] IndicatorView using templated icons not working
4 participants