Skip to content
This repository was archived by the owner on Nov 15, 2025. It is now read-only.

Update#217

Closed
Samuel12321 wants to merge 1 commit intomainfrom
Updates
Closed

Update#217
Samuel12321 wants to merge 1 commit intomainfrom
Updates

Conversation

@Samuel12321
Copy link
Copy Markdown
Member

Due to the extensive changes (largely done by intelisense code cleanup) just want to get your approval @ShankarBUS and to make sure no bugs.

  • Update Packages to .Net5 (release not preview)
  • Microsoft.Toolkit.Mvvm updated to preview 4
  • WpfAnalyzers enabled
  • Trimmode Enabled
  • Modified startup code location for Appcentre
  • Intelisense / Resharper code clean-up and auto optimisation run

- Microsoft.Toolkit.Mvvm updated to preview 4
- WpfAnalyzers enabled
- Trimmode Enabled
- Modified startup code location for Appcentre
- Intelisense / Resharper code cleanup and auto optimisation  run
@Samuel12321 Samuel12321 self-assigned this Nov 14, 2020
Copy link
Copy Markdown
Member

@ShankarBUS ShankarBUS left a comment

Choose a reason for hiding this comment

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

I'm not approving this!

Reasons:

  • Empty line endings are removed
  • Empty spaces are removed (they're inconsistently removed here and there)
  • SetCurrentValue() is un-necessarily introduced! (here and there)
  • Text after #endregion
  • And some other changes.

Any non-cleanup change made by you are approved.

Open a new PR with just the changes you made.
Changes made by Intellisense are stupid and inconsistent. Please don't get me wrong for saying this.

}

#endregion
#endregion App activation & Single instancing
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Text after #endregion will make maintaining the code complex. It would be better the way it was.

}
}
}
} No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why are line endings removed everywhere?

It's a convention to keep a empty line at the end of a code file, isn't it?

Could this be reverted?

xmlns:ui="http://schemas.modernwpf.com/2019"
xmlns:utils="clr-namespace:ModernFlyouts.Utilities"
xmlns:resx="clr-namespace:ModernFlyouts.Properties"
xmlns:resx="clr-namespace:ModernFlyouts.Properties" xmlns:modernflyouts="clr-namespace:ModernFlyouts" d:DataContext="{d:DesignInstance Type=modernflyouts:AirplaneModeFlyoutHelper}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No need to set the design time datacontext as the flyout will only be initialized at runtime.

There is a check in the helpers to design time and not do anything.
This will just make the xaml complex. No use. Revert it

private const string SecondTemplatePartName = "SecondContentPresenter";
#endregion

#endregion Constants and Statics
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you just revert this?
It's hard to keep adding the same text on the start and end of a region. It requires both titles to be same. Please?

TimeBar.Value = 0;

TimelineInfoButton.Visibility = Visibility.Collapsed;
TimelineInfoButton.SetCurrentValue(VisibilityProperty, Visibility.Collapsed);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No no not this please! Revert them!!

UpdatePlaybackInfo(session);

await SetThumbnailAsync(mediaInfo.Thumbnail, playback.PlaybackType);
await SetThumbnailAsync(mediaInfo.Thumbnail, session.GetPlaybackInfo().PlaybackType);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Revert this one too.

The GetPlaybackInfo() call is expensive. Calling it multiple times will result in increase in memory usage.

Comment on lines +524 to +528
ThumbnailBackgroundBrush.SetCurrentValue(Brush.OpacityProperty, 0.0);
ThumbnailImageBrush.SetCurrentValue(Brush.OpacityProperty, 0.0);
TextBlockGrid.SetCurrentValue(OpacityProperty, 0.0);
mediaArtistBlockTranslateTransform.SetCurrentValue(TranslateTransform.YProperty, 0.0);
mediaTitleBlockTranslateTransform.SetCurrentValue(TranslateTransform.YProperty, 0.0);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh God! 🤦‍♂️

Comment on lines +216 to +217
T1.SetCurrentValue(System.Windows.Media.TranslateTransform.YProperty, (double)-40);
if (ContentGrid != null) ContentGrid.SetCurrentValue(OpacityProperty, (double)0);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please revert every change that introduced SetCurrentValue. This is insane! What happened to Intellisense!
Is it on drugs?

var defaultPosition = toDefault ? FlyoutHandler.Instance.DefaultFlyoutPosition : AppDataHelper.FlyoutPosition;

Left = defaultPosition.X - leftShadowMargin; Top = defaultPosition.Y;
Left = defaultPosition.X - leftShadowMargin; SetCurrentValue(TopProperty, defaultPosition.Y);
Copy link
Copy Markdown
Member

@ShankarBUS ShankarBUS Nov 14, 2020

Choose a reason for hiding this comment

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

This is inconsistent!

Left is untouched but Top is modified!

Comment on lines 6 to 13
public const string ChevronLeft = "\uE00E";

public const string ChevronRight = "\uE00F";

public const string ChevronUp = "\uE010";

public const string ChevronDown = "\uE011";

public const string Refresh = "\uE149";
Copy link
Copy Markdown
Member

@ShankarBUS ShankarBUS Nov 14, 2020

Choose a reason for hiding this comment

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

It removed empty spaces only in some places.

Other places are left untouched.

@ShankarBUS ShankarBUS closed this Nov 14, 2020
@ShankarBUS
Copy link
Copy Markdown
Member

Open a new PR only with these changes. Sorry for not approving this PR 😅. The cleanup made a large mess!

  • Update Packages to .Net5 (release not preview)
  • Microsoft.Toolkit.Mvvm updated to preview 4
  • WpfAnalyzers enabled
  • Trimmode Enabled
  • Modified startup code location for Appcentre

@Samuel12321
Copy link
Copy Markdown
Member Author

Wow, after looking a the things you pointed out i see why people don't use intelisense.

Open a new PR only with these changes. Sorry for not approving this PR 😅. The cleanup made a large mess!

all good, the reason i made this as a PR was because i was questioning how good intelisense's changes were.

@Samuel12321 Samuel12321 deleted the Updates branch November 14, 2020 09:28
ShankarBUS added a commit that referenced this pull request Nov 19, 2020
Based on #217

Co-Authored-By: Sam <35312698+Samuel12321@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants