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

♻️ Mobile | Improve code input when answering quizzes #934

Merged
merged 2 commits into from
May 31, 2024

Conversation

zacharykeeping
Copy link
Member

@zacharykeeping zacharykeeping commented May 30, 2024

  1. What triggered this change? (PBI link, Email Subject, conversation + reason, etc)

Closes #925

  1. What was changed?
  1. Sets the keyboard to "Plain" on the Editor for quizzes to make it easier to input code without autocorrect getting in the way.
  2. Replaces special characters like em dashes and curly quotes in the inputted text as the keyboard's Smart Punctuation can insert these and cause issues when code is expected, like in the linked issue.
  1. Did you do pair or mob programming?

No

@zacharykeeping zacharykeeping marked this pull request as ready for review May 30, 2024 02:16
Copy link
Member

@AntPolkanov AntPolkanov left a comment

Choose a reason for hiding this comment

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

Thanks for fixing it! Finally the CSS quiz will stop failing :)

Just there is one thing I wanted to discuss with you. If the Smart Punctuation rules change in the future iOS release, we will have to update this code. Can please just disable Smart Punctuation on iOS?

We can update the EditorHandler in MauiProgram.cs:

Microsoft.Maui.Handlers.EditorHandler.Mapper.AppendToMapping(nameof(Editor), (handler, editor) =>
        {
            handler.PlatformView.TintColor = UIKit.UIColor.FromRGB(204,65,65);
            handler.PlatformView.SmartDashesType = UITextSmartDashesType.No;
            handler.PlatformView.SmartQuotesType = UITextSmartQuotesType.No;
        });
        ```

@zacharykeeping
Copy link
Member Author

Thanks for fixing it! Finally the CSS quiz will stop failing :)

Just there is one thing I wanted to discuss with you. If the Smart Punctuation rules change in the future iOS release, we will have to update this code. Can please just disable Smart Punctuation on iOS?

We can update the EditorHandler in MauiProgram.cs:

Microsoft.Maui.Handlers.EditorHandler.Mapper.AppendToMapping(nameof(Editor), (handler, editor) =>
        {
            handler.PlatformView.TintColor = UIKit.UIColor.FromRGB(204,65,65);
            handler.PlatformView.SmartDashesType = UITextSmartDashesType.No;
            handler.PlatformView.SmartQuotesType = UITextSmartQuotesType.No;
        });
        ```

Done - I've added this code.

Copy link
Member

@AntPolkanov AntPolkanov left a comment

Choose a reason for hiding this comment

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

Thanks 👍 🚀

@AntPolkanov AntPolkanov merged commit 3e9e4b8 into main May 31, 2024
6 checks passed
@AntPolkanov AntPolkanov deleted the editor-chars branch May 31, 2024 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Mobile | CSS quiz, variables
2 participants