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

Documentation for RichSuggestBox control #558

Merged
merged 9 commits into from
Sep 20, 2021

Conversation

huynhsontung
Copy link
Contributor

@huynhsontung huynhsontung commented Aug 21, 2021

Docs for Toolkit PR #3650

What changes to the docs does this PR provide?

Add documentation for the new RichSuggestBox control.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Correctly picked the right branch to base the change off (dev for new features, master for typos/improvements)
  • For new pages, used the provided template
  • For new features, added an entry in the Table of Contents
  • Ran against a spell and grammar checker
  • Contains NO breaking changes

Other information

@ghost
Copy link

ghost commented Aug 21, 2021

CLA assistant check
All CLA requirements met.

@opbld33
Copy link

opbld33 commented Aug 21, 2021

Docs Build status updates of commit 458350e:

⚠️ Validation status: warnings

File Status Preview URL Details
docs/controls/RichSuggestBox.md ⚠️Warning View Details
docs/resources/images/Controls/RichSuggestBox.gif ✅Succeeded View

docs/controls/RichSuggestBox.md

  • Line 70, Column 130: [Warning-hard-coded-locale] Link 'https://docs.microsoft.com/en-us/dotnet/api/system.char.ispunctuation' contains locale code 'en-us'. For localizability, remove 'en-us' from links to most Microsoft sites.
  • Line 119, Column 3: [Warning-hard-coded-locale] Link 'https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.autosuggestbox' contains locale code 'en-us'. For localizability, remove 'en-us' from links to most Microsoft sites.
  • Line 120, Column 3: [Warning-hard-coded-locale] Link 'https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.richeditbox' contains locale code 'en-us'. For localizability, remove 'en-us' from links to most Microsoft sites.
  • Line 70, Column 130: [Suggestion-docs-link-absolute] Absolute link 'https://docs.microsoft.com/en-us/dotnet/api/system.char.ispunctuation' will be broken in isolated environments. Replace with a relative link.
  • Line 119, Column 3: [Suggestion-docs-link-absolute] Absolute link 'https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.autosuggestbox' will be broken in isolated environments. Replace with a relative link.
  • Line 120, Column 3: [Suggestion-docs-link-absolute] Absolute link 'https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.richeditbox' will be broken in isolated environments. Replace with a relative link.

For more details, please refer to the build report.

If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

@opbld33
Copy link

opbld33 commented Aug 21, 2021

Docs Build status updates of commit 248842a:

✅ Validation status: passed

File Status Preview URL Details
docs/controls/RichSuggestBox.md 💡Suggestion View Details
docs/resources/images/Controls/RichSuggestBox.gif ✅Succeeded View

docs/controls/RichSuggestBox.md

  • Line 70, Column 130: [Suggestion-docs-link-absolute] Absolute link 'https://docs.microsoft.com/dotnet/api/system.char.ispunctuation' will be broken in isolated environments. Replace with a relative link.
  • Line 119, Column 3: [Suggestion-docs-link-absolute] Absolute link 'https://docs.microsoft.com/uwp/api/windows.ui.xaml.controls.autosuggestbox' will be broken in isolated environments. Replace with a relative link.
  • Line 120, Column 3: [Suggestion-docs-link-absolute] Absolute link 'https://docs.microsoft.com/uwp/api/windows.ui.xaml.controls.richeditbox' will be broken in isolated environments. Replace with a relative link.

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@opbld32
Copy link

opbld32 commented Aug 21, 2021

Docs Build status updates of commit 50e615f:

✅ Validation status: passed

File Status Preview URL Details
docs/controls/RichSuggestBox.md ✅Succeeded View
docs/resources/images/Controls/RichSuggestBox.gif ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@opbld32
Copy link

opbld32 commented Aug 22, 2021

Docs Build status updates of commit f36c5d9:

✅ Validation status: passed

File Status Preview URL Details
docs/controls/RichSuggestBox.md ✅Succeeded View
docs/resources/images/Controls/RichSuggestBox.gif ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@opbld30
Copy link

opbld30 commented Aug 22, 2021

Docs Build status updates of commit 606e4af:

✅ Validation status: passed

File Status Preview URL Details
docs/controls/RichSuggestBox.md ✅Succeeded View
docs/resources/images/Controls/RichSuggestBox.gif ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@opbld31
Copy link

opbld31 commented Aug 22, 2021

Docs Build status updates of commit a86e7d6:

✅ Validation status: passed

File Status Preview URL Details
docs/controls/RichSuggestBox.md ✅Succeeded View
docs/resources/images/Controls/RichSuggestBox.gif ✅Succeeded View
docs/toc.md ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@huynhsontung huynhsontung marked this pull request as ready for review August 22, 2021 22:02
@michael-hawker michael-hawker changed the base branch from master to dev/7.1.0 August 23, 2021 07:19
Co-authored-by: Michael Hawker MSFT (XAML Llama) <[email protected]>
@opbld32
Copy link

opbld32 commented Aug 23, 2021

Docs Build status updates of commit 2031e70:

✅ Validation status: passed

File Status Preview URL Details
docs/controls/RichSuggestBox.md ✅Succeeded View
docs/resources/images/Controls/RichSuggestBox.gif ✅Succeeded View
docs/toc.md ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

ghost pushed a commit to CommunityToolkit/WindowsCommunityToolkit that referenced this pull request Aug 26, 2021
<!-- 🚨 Please Do Not skip any instructions and information mentioned below as they are all required and essential to evaluate and test the PR. By fulfilling all the required information you will be able to reduce the volume of questions and most likely help merge the PR faster 🚨 -->

<!-- 📝 It is preferred if you keep the "☑️ Allow edits by maintainers" checked in the Pull Request Template as it increases collaboration with the Toolkit maintainers by permitting commits to your PR branch (only) created from your fork.  This can let us quickly make fixes for minor typos or forgotten StyleCop issues during review without needing to wait on you doing extra work. Let us help you help us! 🎉 -->


## Fixes #
<!-- Add the relevant issue number after the "#" mentioned above (for ex: Fixes #1234) which will automatically close the issue once the PR is merged. -->
Closes #3649 

<!-- Add a brief overview here of the feature/bug & fix. -->
Implement rich suggest text control as discussed in the issue.

## PR Type
What kind of change does this PR introduce?
<!-- Please uncomment one or more that apply to this PR. -->

<!-- - Bugfix -->
- Feature
<!-- - Code style update (formatting) -->
<!-- - Refactoring (no functional changes, no api changes) -->
<!-- - Build or CI related changes -->
<!-- - Documentation content changes -->
<!-- - Sample app changes -->
<!-- - Other... Please describe: -->


## What is the current behavior?
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->
None. The control did not exist before this PR.


## What is the new behavior?
<!-- Describe how was this issue resolved or changed? -->
'RichSuggestBox' is now a usable control in the `Microsoft.Toolkit.Uwp.UI.Controls` namespace.


## PR Checklist

Please check if your PR fulfills the following requirements:

- [ ] Tested code with current [supported SDKs](../readme.md#supported)
- [x] Pull Request has been submitted to the documentation repository [instructions](..\contributing.md#docs). Link: MicrosoftDocs/WindowsCommunityToolkitDocs#558
- [x] Sample in sample app has been added / updated (for bug fixes / features)
    - [x] Icon has been created (if new sample) following the [Thumbnail Style Guide and templates](https:/windows-toolkit/WindowsCommunityToolkit-design-assets)
- [ ] New major technical changes in the toolkit have or will be added to the [Wiki](https:/windows-toolkit/WindowsCommunityToolkit/wiki) e.g. build changes, source generators, testing infrastructure, sample creation changes, etc...
- [x] Tests for the changes have been added (for bug fixes / features) (if applicable)
- [x] Header has been added to all new source files (run *build/UpdateHeaders.bat*)
- [x] Contains **NO** breaking changes

<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. 
     Please note that breaking changes are likely to be rejected within minor release cycles or held until major versions. -->


## Other information

### Convenient issue tracker

- Limited styling options for tokens. Only text styling options are available.
- Tokens are raw text and not UI elements. UI events (e.g. `UIElement.PointerEntered`) are not available. ~~This makes behaviors like showing flyout when hover mouse over the token impossible.~~
- Tokens are always underlined.
- Tokens cannot adapt to theme change dynamically. They will lose foreground color while having the same background color which will most likely introduce bad contrast.
- Cannot disable spelling check on tokens (token text may have red underline).
- ~~Cannot use Tab to select a suggestion due to conflict with the accessibility feature.~~
- Deleted tokens will be kept in an internal list until cleared programmatically to support Undo and Redo.

### RichEditBox issues

Below are `RichEditBox` related issues encountered during the development of this control.

- Getting `Link` property from a range might change the range.
- Replacing a formatted link at the beginning of the document does not reset the formatting. The replaced text still has the same formatting.
- Setting the `Link` property can sometimes fail but only when the target text is at the beginning of the document.
- There is no event for when text is about to change. `TextChanging` and `SelectionChanging` are invoked after the text has changed.
- Character format foreground color cannot display a range of colors (e.g. #F7FFB3)
@michael-hawker michael-hawker changed the base branch from dev/7.1.0 to master September 16, 2021 22:18
@michael-hawker michael-hawker added this to the 7.1 milestone Sep 16, 2021
The token text inserted into the document has the following layout: ZWSP - Prefix character - Display text - ZWSP.

For example, a token with "@" as the prefix and "John Doe" as the display text is inserted as:
```cs
Copy link
Contributor

Choose a reason for hiding this comment

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

This code fragment appeared in-line with the text before it, and didn't appear to be outputting what would be expected. I put in a blank line before the '''cs, and here's the output:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have added a blank line before the code block.

@opbld32
Copy link

opbld32 commented Sep 17, 2021

Docs Build status updates of commit 65e9865:

✅ Validation status: passed

File Status Preview URL Details
docs/controls/RichSuggestBox.md ✅Succeeded View
docs/resources/images/Controls/RichSuggestBox.gif ✅Succeeded View
docs/toc.md ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@opbld30
Copy link

opbld30 commented Sep 20, 2021

Docs Build status updates of commit 133f8f6:

✅ Validation status: passed

File Status Preview URL Details
docs/controls/RichSuggestBox.md ✅Succeeded View
docs/resources/images/Controls/RichSuggestBox.gif ✅Succeeded View
docs/toc.md ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@michael-hawker michael-hawker merged commit a6d9298 into MicrosoftDocs:master Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants