Skip to content

Commit

Permalink
address more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
karkarl committed Dec 12, 2024
1 parent 0b6d3a7 commit 71d2c0b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
26 changes: 24 additions & 2 deletions specs/TitleBar/titleBar-dev-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ How can we allow such customizations?
- Interactive content in TitleBar must also be capable of keyboard navigation.
They should be treated as normal elements in the app's visual tree.

- TitleBar should meet [Windows app design guidelines](https://learn.microsoft.com/en-us/windows/apps/design/basics/titlebar-design#icon):
- A single-click/tap on the icon should show system window menu.
- A double-click/tap should close the window.

- CoreApplicationViewTitleBar.LayoutMetricsChanged and IsVisibleChanged events from the UWP world is
missing in WinUI3:
- LayoutMetricsChanged: Update Left and Right Inset for on DPI changes.
Expand Down Expand Up @@ -169,14 +173,14 @@ TitleBar must handle mouse, touch, and keyboard scenarios.

# Appendix

## Non-considerations
## Out of Scope

### Tabbed TitleBar Scenarios
TitleBar is not needed for TabView scenarios - it may be considered as a separate `TabbedTitleBar` control.

Below scenarios demonstrate that when Tabview occupies the entire width when extending into title bar.
Header icons, buttons, and drag regions can be handled with TabView Header, and FooterArea.


![Terminal TitleBar](images/1p-terminal-titlebar.png)
![NotePad TitleBar with TabView](images/1p-notepad-titlebar.png)
![Edge TitleBar](images/1p-edge-titlebar.png)
Expand All @@ -185,3 +189,21 @@ Header icons, buttons, and drag regions can be handled with TabView Header, and
- TabView needs a property to make space for icon or other elements
- TabView also needs to make space for drag region on right.
- FileExplorer currently has their own implement by setting a drag region and CaptionControl placeholder in TabView.FooterArea

### AppWindow.TitleBar
Improvements to Window class to allow below syntax. This will greatly cut down the amount of code needed to
configure WinUI TitleBar.

```xml
<Window>
<Window.TitleBar>
<TitleBar />
</Window.TitleBar>
</Window>
```
Ideally, this should also expose TitleBar to below properties and methods:
- Window.Title and AppWindow.Title
- AppWindow.SetIcon()

This is out of scope for WinUI TitleBar hence will not be included in this spec.

3 changes: 1 addition & 2 deletions specs/TitleBar/titlebar-functional-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public MainWindow()
_Note: TitleBar currently needs to be set explicitly in the grid.row and referenced_
_by Window in codebehind as shown above._
_Improvements to Window are being considered to avoid this extra grid layout and codebehind._
_Please see Appendix of [Functional Spec](titleBar-functional-spec.md)._

## Scenario: TitleBar with WinUI Controls Integration
TitleBar with common WinUI Controls: `AutoSuggestBox`, `PersonPicture`, `AppBarButton`.
Expand Down Expand Up @@ -490,8 +491,6 @@ is content present in the `Header`, `Content`, and `Footer` content areas. Title
elements are present. As the content areas are empty by default, the default height for TitleBar is
`TitleBarCompactHeight`.



# Figma link

[Figma link](https://www.figma.com/file/sxPR9uvUNg6XQKSKOmlbK8/Fluent-Windows-Visual-Library?type=design&node-id=30201-110568&mode=design&t=ke7CzN5LvKzNA8LR-4)
Expand Down

0 comments on commit 71d2c0b

Please sign in to comment.