Skip to content

Commit f77180f

Browse files
authored
Feature: Added placeholder for viewing release notes (#10971)
1 parent bbfde73 commit f77180f

File tree

2 files changed

+53
-12
lines changed

2 files changed

+53
-12
lines changed

src/Files.App/UserControls/AddressToolbar.xaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
55
xmlns:animatedvisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals"
66
xmlns:contract8Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,8)"
7+
xmlns:controls="using:CommunityToolkit.WinUI.UI.Controls"
78
xmlns:converters="using:Files.App.Converters"
89
xmlns:converters1="using:CommunityToolkit.WinUI.UI.Converters"
910
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
@@ -298,6 +299,7 @@
298299
x:Load="{x:Bind ViewModel.UpdateService.IsAppUpdated, Mode=OneWay}"
299300
AccessKey="2"
300301
AutomationProperties.Name="{helpers:ResourceString Name=ReleaseNotes}"
302+
Command="{x:Bind ViewModel.ViewReleaseNotesCommand, Mode=OneWay}"
301303
Style="{StaticResource AddressToolbarButtonStyle}"
302304
ToolTipService.ToolTip="{helpers:ResourceString Name=ReleaseNotes}">
303305
<FontIcon
@@ -332,6 +334,43 @@
332334
IsOpen="False"
333335
Subtitle="{helpers:ResourceString Name=OngoingTasksTeachingTip/Subtitle}"
334336
Target="{x:Bind OngoingTasks}" />
337+
338+
<!-- Release Notes Teaching Tip -->
339+
<TeachingTip
340+
x:Name="ReleaseNotesTeachingTip"
341+
Title="{helpers:ResourceString Name=ReleaseNotes}"
342+
IsLightDismissEnabled="True"
343+
IsOpen="{x:Bind ViewModel.IsReleaseNotesOpen, Mode=TwoWay}"
344+
Target="{x:Bind ViewReleaseNotesButton}">
345+
346+
<!-- Sponsor Button -->
347+
<TeachingTip.HeroContent>
348+
<Border
349+
Padding="12"
350+
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
351+
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
352+
BorderThickness="0,1,0,0">
353+
354+
<HyperlinkButton
355+
HorizontalAlignment="Center"
356+
Content="{helpers:ResourceString Name=SponsorUsOnGitHub}"
357+
NavigateUri="https://github.com/sponsors/yaira2" />
358+
</Border>
359+
</TeachingTip.HeroContent>
360+
361+
<!-- Markdown Content -->
362+
<TeachingTip.Content>
363+
<ScrollViewer
364+
Height="240"
365+
HorizontalScrollMode="Disabled"
366+
VerticalScrollMode="Enabled">
367+
<controls:MarkdownTextBlock
368+
Padding="0,12"
369+
Background="Transparent"
370+
Text="Coming Soon 👀" />
371+
</ScrollViewer>
372+
</TeachingTip.Content>
373+
</TeachingTip>
335374
</Grid>
336375

337376
<VisualStateManager.VisualStateGroups>

src/Files.App/ViewModels/ToolbarViewModel.cs

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -253,63 +253,55 @@ public bool IsAdaptiveLayoutEnabled
253253
=> UserSettingsService.FoldersSettingsService.EnableOverridingFolderPreferences;
254254

255255
private bool canCopyPathInPage;
256-
257256
public bool CanCopyPathInPage
258257
{
259258
get => canCopyPathInPage;
260259
set => SetProperty(ref canCopyPathInPage, value);
261260
}
262261

263262
private bool canGoBack;
264-
265263
public bool CanGoBack
266264
{
267265
get => canGoBack;
268266
set => SetProperty(ref canGoBack, value);
269267
}
270268

271269
private bool canGoForward;
272-
273270
public bool CanGoForward
274271
{
275272
get => canGoForward;
276273
set => SetProperty(ref canGoForward, value);
277274
}
278275

279276
private bool canNavigateToParent;
280-
281277
public bool CanNavigateToParent
282278
{
283279
get => canNavigateToParent;
284280
set => SetProperty(ref canNavigateToParent, value);
285281
}
286282

287283
private bool previewPaneEnabled;
288-
289284
public bool PreviewPaneEnabled
290285
{
291286
get => previewPaneEnabled;
292287
set => SetProperty(ref previewPaneEnabled, value);
293288
}
294289

295290
private bool canRefresh;
296-
297291
public bool CanRefresh
298292
{
299293
get => canRefresh;
300294
set => SetProperty(ref canRefresh, value);
301295
}
302296

303297
private string searchButtonGlyph = "\uE721";
304-
305298
public string SearchButtonGlyph
306299
{
307300
get => searchButtonGlyph;
308301
set => SetProperty(ref searchButtonGlyph, value);
309302
}
310303

311304
private bool isSearchBoxVisible;
312-
313305
public bool IsSearchBoxVisible
314306
{
315307
get => isSearchBoxVisible;
@@ -320,8 +312,14 @@ public bool IsSearchBoxVisible
320312
}
321313
}
322314

323-
private string? pathText;
315+
private bool isReleaseNotesOpen;
316+
public bool IsReleaseNotesOpen
317+
{
318+
get => isReleaseNotesOpen;
319+
set => SetProperty(ref isReleaseNotesOpen, value);
320+
}
324321

322+
private string? pathText;
325323
public string? PathText
326324
{
327325
get => pathText;
@@ -374,6 +372,7 @@ public ToolbarViewModel()
374372
ForwardClickCommand = new RelayCommand<RoutedEventArgs>(e => ForwardRequested?.Invoke(this, EventArgs.Empty));
375373
UpClickCommand = new RelayCommand<RoutedEventArgs>(e => UpRequested?.Invoke(this, EventArgs.Empty));
376374
RefreshClickCommand = new RelayCommand<RoutedEventArgs>(e => RefreshRequested?.Invoke(this, EventArgs.Empty));
375+
ViewReleaseNotesCommand = new RelayCommand(DoViewReleaseNotes);
377376

378377
dispatcherQueue = DispatcherQueue.GetForCurrentThread();
379378
dragOverTimer = dispatcherQueue.CreateTimer();
@@ -382,6 +381,11 @@ public ToolbarViewModel()
382381
UserSettingsService.OnSettingChangedEvent += UserSettingsService_OnSettingChangedEvent;
383382
}
384383

384+
private void DoViewReleaseNotes()
385+
{
386+
IsReleaseNotesOpen = true;
387+
}
388+
385389
private void UserSettingsService_OnSettingChangedEvent(object? sender, SettingChangedEventArgs e)
386390
{
387391
switch (e.SettingName)
@@ -622,23 +626,20 @@ public bool IsEditModeEnabled
622626
}
623627

624628
private bool manualEntryBoxLoaded;
625-
626629
public bool ManualEntryBoxLoaded
627630
{
628631
get => manualEntryBoxLoaded;
629632
set => SetProperty(ref manualEntryBoxLoaded, value);
630633
}
631634

632635
private bool clickablePathLoaded = true;
633-
634636
public bool ClickablePathLoaded
635637
{
636638
get => clickablePathLoaded;
637639
set => SetProperty(ref clickablePathLoaded, value);
638640
}
639641

640642
private string pathControlDisplayText;
641-
642643
public string PathControlDisplayText
643644
{
644645
get => pathControlDisplayText;
@@ -649,6 +650,7 @@ public string PathControlDisplayText
649650
public ICommand ForwardClickCommand { get; }
650651
public ICommand UpClickCommand { get; }
651652
public ICommand RefreshClickCommand { get; }
653+
public ICommand ViewReleaseNotesCommand { get; }
652654

653655
public void PathItemSeparator_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
654656
{

0 commit comments

Comments
 (0)