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

User/savoyschuler/pagercontrol #88

Draft
wants to merge 50 commits into
base: master
Choose a base branch
from
Draft
Changes from 2 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
9526410
Create PagerControl.md
SavoySchuler Apr 22, 2019
06eb0d1
Added template and carried API notes over from proposal.
SavoySchuler Apr 22, 2019
7a2c5ef
Creating images folder with placeholder file.
SavoySchuler May 13, 2019
f374490
[PM] Adding example pager control images.
SavoySchuler May 13, 2019
8a700a6
[PM] Added basic examples, description, and...
SavoySchuler May 13, 2019
bcbd98a
Deleting placeholder file used to add images folder.
SavoySchuler May 13, 2019
37cfe57
[DEV] [PM] Added API Details.
SavoySchuler May 13, 2019
c59b0d5
[PM] Updated Example APIs.
SavoySchuler May 15, 2019
e7cac61
[DEV] Removed API Surface example, rearranged NumberOfPages...
SavoySchuler May 15, 2019
eb8d93b
[DEV] [PM] Added command APIs to IDL and Examples.
SavoySchuler May 15, 2019
6ca1d2a
[PM] Corrected Example uses of suffix to add hard coded page number.
SavoySchuler May 15, 2019
7bea33c
[PM] Updated Description section definition for the control
SavoySchuler May 15, 2019
daacb33
Update PagerControl.md
MarissaMatt Jun 2, 2020
2bd81a6
Update PagerControl.md
MarissaMatt Jun 3, 2020
7d1b6ba
Update PagerControl.md
MarissaMatt Jun 9, 2020
f3382f4
Update PagerControl.md
MarissaMatt Jun 9, 2020
3193a6c
Update PagerControl.md
MarissaMatt Jun 30, 2020
ab66a9d
Update PagerControl.md
MarissaMatt Jun 30, 2020
60cb6a1
Added selected index property
MarissaMatt Jun 30, 2020
9a2fa2a
Update active/PagerControl/PagerControl.md
MarissaMatt Jul 2, 2020
737f5a1
Update active/PagerControl/PagerControl.md
MarissaMatt Jul 2, 2020
e198965
Accessibility and API description updates
MarissaMatt Jul 7, 2020
131e96e
Merge branch 'user/savoyschuler/pagercontrol' of https://github.com/m…
MarissaMatt Jul 7, 2020
4c1b015
Updated formatting
MarissaMatt Jul 7, 2020
9b7df8d
Update active/PagerControl/PagerControl.md
MarissaMatt Jul 8, 2020
a6fe102
Updated with new images and examples to t
MarissaMatt Jul 16, 2020
1bf8d1d
Formatting updates
MarissaMatt Jul 16, 2020
2ab8c61
Removed glyph and text properties and updated example defaults.
MarissaMatt Jul 21, 2020
9e5b9fc
Added more accessibility and a few open questions.
MarissaMatt Aug 6, 2020
5b740b7
Update PagerControl.md
MarissaMatt Aug 13, 2020
d24b663
Updated API and Examples
MarissaMatt Aug 18, 2020
5342ef0
Update PagerControl.md
MarissaMatt Aug 18, 2020
b369b49
Update PagerControl.md
MarissaMatt Aug 18, 2020
fabb49f
Update PagerControl.md
MarissaMatt Aug 19, 2020
45b0fd6
Update PagerControl.md
MarissaMatt Aug 21, 2020
8d36d41
Update active/PagerControl/PagerControl.md
MarissaMatt Sep 8, 2020
e927765
Added samples and updated API notes and UIA sections.
MarissaMatt Sep 9, 2020
9f91751
Merge branch 'user/savoyschuler/pagercontrol' of https://github.com/m…
MarissaMatt Sep 9, 2020
00b7236
Update PagerControl.md
MarissaMatt Sep 10, 2020
71aa153
Added code sample
MarissaMatt Sep 11, 2020
2434231
Updated code sample to a simpler example.
MarissaMatt Sep 11, 2020
12af7ee
Removed open questions.
MarissaMatt Sep 11, 2020
eafc9a8
Updated formatting and sample.
MarissaMatt Sep 16, 2020
057b93d
Added remaining comps and updated API names.
MarissaMatt Sep 16, 2020
cf22121
Fixed formatting.
MarissaMatt Sep 16, 2020
79ecc16
Update active/PagerControl/PagerControl.md
MarissaMatt Sep 16, 2020
99848d2
Added template settings and updated API.
MarissaMatt Sep 16, 2020
ba0cea8
Merge branch 'user/savoyschuler/pagercontrol' of https://github.com/m…
MarissaMatt Sep 16, 2020
124615c
Updated API names to match everywhere in document.
MarissaMatt Sep 21, 2020
6615ca5
updated spec to match implementation
MarissaMatt Oct 29, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 44 additions & 18 deletions active/PagerControl/PagerControl.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ only when there's a bug in the caller, such as argument exception. But if for s
reason it's necessary for a caller to catch an exception from an API, call that
out with an explanation either here or in the Examples -->

### Adding a PagerControl to Your Application

Here is the XAML to show how to add the PagerControl to your application. It can be added on the page as shown below, or can be used in the template of the layout view you prefer to use. PagerControl is added to the template for DataGrid and ItemsRepeater in WinUI 2.x and will be added to ListView and GridView in WinUI 3.

## API Notes
MarissaMatt marked this conversation as resolved.
Show resolved Hide resolved
<!-- Option 1: Give a one or two line description of each API (type
and member), or at least the ones that aren't obvious
Expand All @@ -163,6 +167,25 @@ isn't the type's default (for example an int-typed property that doesn't default

<!-- Option 2: Put these descriptions in the below API Details section,
with a "///" comment above the member or type. -->
| Name | Description|
|:---:|:---|
| PagerDisplayMode | Enum that contains 4 values (Auto, ComboBox, NumberBox, ButtonPanel) that the developer can change to fit their scenario. When auto is selected, the display mode will be ComboBox. The control will default to auto.
| NumberOfPages | Sets the max number of pages the index control will iterate through.
| ButtonVisibilityMode | Enum (Auto, AlwaysVisible, HiddenOnLast, None) that allows the app developer to hide or show the first, last, next, and previous buttons. When auto is selected, the visibility mode will be AlwaysVisible. The control will default to auto.
Button Commands
| First, Previous, Next, and Last ButtonCommand | Specially handle the button pressed event for when the end user selects the first button.
| First, Previous, Next, and Last ButtonGlyph | Give the developer the option to customize the control by changing the glyph for the first button.
| First, Previous, Next, and Last ButtonText | Give the developer the option to customize the control by changing the text for the first button.
| NumberOfIndicesShowing | Determine the number of indices showing in the number panel display mode. If the max number of pages is 10 but the number of indices is 5, the number panel will show 1,2,3,4,5 and when the user selects next, the indices will be 2,3,4,5,6.
| EllipsisEnabled | Boolean to display the ellipses for the buttonpanel display mode.
| EllipsisShowFirstAndLast | Boolean to display the first and last index of a buttonpanel if the ellipsis is enabled.
| EllipsisMaxBefore | How many indices are shown before the ellipses.
| EllipsisMaxAfter | How may indices are shown after the ellipses.
| SelectedIndex | The index that is currently selected. By default this value will be 1.
| PrefixText | Developer can change the prefix text for the combobox display mode option.
| SuffixText | Developer can change the suffix text for the combobox display mode option.
| SelectedIndex| The index that the user has navigated to and is currently viewing.
| PagerControlPageChangedEvent | Event that is fired when the end user selects a button from the number panel, any of the 4 directional buttons, or selects an option from the combobox or enters a number in the numberbox. This event will return the index number that the end user selected. If the end user enters a number greter than the number of pages this event will return the last page. If the end user enters a number less than 1 the event will return 1.

### Visual Components
MikeHillberg marked this conversation as resolved.
Show resolved Hide resolved

Expand All @@ -173,7 +196,7 @@ with a "///" comment above the member or type. -->
| FirstButton | * Button displaying text and/or glyph indicating that the user may navigate to the first index. <br> * Automatically disabled when at first index. <br> * Can be set to not be visible when at the first index. <br><br> ![image](https://user-images.githubusercontent.com/16964652/49760409-485b8580-fc79-11e8-9545-a580f6016f6c.png) |
| NextButton | * Button displaying text and/or glyph indicating that the user may navigate to the next index. <br> * Automatically disabled when at last index. <br> * Can be set to not be visible when at the last index. <br><br> ![image](https://user-images.githubusercontent.com/16964652/49760426-54474780-fc79-11e8-9446-ee2886941a24.png) |
| PreviousButton | * Button displaying text and/or glyph indicating that the user may navigate to the previous index. <br> * Automatically disabled when at first index. <br> * Can be set to not be visible when at the first index. <br><br> ![image](https://user-images.githubusercontent.com/16964652/49760443-62956380-fc79-11e8-8f93-562a92fde666.png) |
| Ellipsis | * Inactive Button, often reading "...", used between indexes and before or after the first/last index to indicate an accessible but omitted range of indexes. <br> * MaxBefore and MaxAfter properties can be used to set how many indices appear between the current page and the ellipsis before/after it. <br> * Visibility of the first/last index can be disabled. <br> * Only visible when using button panel as the display mode. <br><br> ![image](https://user-images.githubusercontent.com/16964652/49760513-85277c80-fc79-11e8-926e-3453ea29b0a3.png) |
| Ellipsis | * Button, often reading "...", used between indexes and before or after the first/last index to indicate an accessible but omitted range of indexes. <br> * MaxBefore and MaxAfter properties can be used to set how many indices appear between the current page and the ellipsis before/after it. <br> * Visibility of the first/last index can be disabled. <br> <br> * Only visible when using button panel as the display mode. <br><br> ![image](https://user-images.githubusercontent.com/16964652/49760513-85277c80-fc79-11e8-926e-3453ea29b0a3.png) |
| PrefixText | * Text displayed before the editable ComboBox indexing component. <br><br> ![image](https://user-images.githubusercontent.com/16964652/49760540-93759880-fc79-11e8-9c4f-3c3222b95a13.png) |
| NumberOfPages | * When a total number of indices (N) is given, this suffix string will appear after the editable ComboBox indexing component and read "of N". Localization will put "N" where it should be in a given language. <br><br> ![image](https://user-images.githubusercontent.com/16964652/49760557-9a9ca680-fc79-11e8-943f-3425d993fdeb.png) |

Expand All @@ -189,7 +212,6 @@ enum PagerDisplayMode
ButtonPanel,
};


enum ButtonVisibilityMode
MarissaMatt marked this conversation as resolved.
Show resolved Hide resolved
{
Auto,
Expand Down Expand Up @@ -308,25 +330,29 @@ For example, implementation details. -->
### UI Automation Patterns

### Keyboarding

* End users should be able to tab to focus on the control.
* Pager Control should be added as a navigation landmark.
* End users should be able to tab to put focus on the control.
* Left and right arrows will navigate between the items in the control.
* Page up and page down buttons should advance the focused index by a large amount (the amount can be configured by the developer).
* An example is if the user is interacting with the number panel mode and the focus is on the page 2 button, when the user hits page down, the focus will move to the page 12 button (if page 12 exists) or the last page button.
* Home/escape keys should move focus from an individual item back to the entire control.
* (Combo box mode only) If the end user is focused on the combo box, the user can hit enter to expand the drop down menu.
* (Combo box mode only) If the end user is focused on the combo box and the drop down is expanded, the home/escape key should collapse the drop down menu and have focus remain on the combo box.
* (Combo box mode only) Alt + down shortcut should expand the drop down menu
* (Combo box mode only) Alt + up shortcut should collapse the drop down menu
* (Number box mode only) Up and down arrows should increase or decrease the value in the number box by 1.

Accessibility for Combo Box Only
MarissaMatt marked this conversation as resolved.
Show resolved Hide resolved
* If the end user is focused on the combo box, the user can hit enter to expand the drop down menu.
* If the end user is focused on the combo box and the drop down is expanded, the home/escape key should collapse the drop down menu and have focus remain on the combo box.
* If the end user has expanded the drop down list, the PgUp and PgDn buttons should move focus to the first and last items in the list.
* Alt + down shortcut should expand the drop down menu.
* Alt + up shortcut should collapse the drop down menu.

Keyboarding for Number Box Only
* Up and down arrows should increase or decrease the value in the box by 1.
* PgUp and PgDown arrows will increase or decrease the value in the box by x. The developer will be able to set the amount the value will increase or decrease by.

### Narrator
* Should be added as a navigation landmark.
* When the focus is on the control, narrator will announce _____.
* When the focus is on the control, narrator will announce "pager control".
* When the focus is on the first, last, previous, or next button narrator will announce "first page", "last page", "next page", or "previous page".
* If the buttons have text properties set by the developer, narrator will announce that text instead of the default announcement.
* When the focus is on a number button, narrator will announce " page x".
* Combo box and number box modes will use the default narrator announcements for combo box and number box.
* When the focus is on a number button, narrator will announce "page x".
MarissaMatt marked this conversation as resolved.
Show resolved Hide resolved
* Combo box and number box modes will use the default narrator announcements for combo box and number box when the user puts focus on them.
* When the user enters a value in to the number box, narrator will announce the number entered.

## Data and Intellegence Metrics

Expand All @@ -335,7 +361,6 @@ Adoption and validation of the control in the community
* Measurement: Count of posts providing feedback to us through Github and Discord.

Questions that can be answered through telemetry metrics to help focus future features and improvements:

Which display mode is the most commonly used?
* Measurement: Count of how many applications include the pager control type broken out by display mode.

Expand All @@ -347,9 +372,10 @@ How often are developers using this control with an indefinite number of pages?


## Open Questions

* I need help understanding how to choose what automation control type could be used for a control like this. Can it be a combination of control types?
* Can the default behavior for combo box and number box be added to pager control? Does anything special need to happen in order to get that functionality?
* I'm not sure what narrator should announce when focus is on the control.
* Accessibility suggested that this control should be added as a navigation landmark. Does the team agree with that suggestion?
* It would be cool to measure which layout view is most commonly used with the pager control, is that possible to measure using telemetry?