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

Port Editor Placeholder text and color properties #573

Merged
merged 16 commits into from
Mar 24, 2021

Conversation

brunck
Copy link
Contributor

@brunck brunck commented Mar 23, 2021

Description of Change

Implements #388

Additions made

  • Adds Placeholder (via the ITextView interface) and PlaceholderColor to the IEditor interface
  • Adds Placeholder and PlaceholderColor to property map for EditorHandler
  • Adds Placeholder and PlaceholderColor mapping methods to EditorHandler for Android and iOS
  • Adds extension methods to update Placeholder and PlaceholderColor on Android/iOS
  • Adds MauiTextView class for iOS to add placeholder functionality to UITextView
  • Adds x-plat device tests to test initialization and updating of Placeholder and PlaceholderColor properties

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)
  • Targets a single property for a single control (or intertwined few properties)
  • Adds the property to the appropriate interface
  • Avoids any changes not essential to the handler property
  • Adds the mapping to the PropertyMapper in the handler
  • Adds the mapping method to the Android, iOS, and Standard aspects of the handler
  • Implements the actual property updates (usually in extension methods in the Platform section of Core)
  • Tags ported renderer methods with [PortHandler]
  • Adds an example of the property to the sample project (MainPage)
  • Adds the property to the stub class
  • Implements basic property tests in DeviceTests

# Conflicts:
#	src/Core/src/Core/IEditor.cs
#	src/Core/src/Handlers/Editor/EditorHandler.Android.cs
#	src/Core/src/Handlers/Editor/EditorHandler.Standard.cs
#	src/Core/src/Handlers/Editor/EditorHandler.cs
#	src/Core/src/Handlers/Editor/EditorHandler.iOS.cs
#	src/Core/src/Platform/Android/EditorExtensions.cs
#	src/Core/src/Platform/iOS/EditorExtensions.cs
#	src/Core/tests/DeviceTests/Handlers/Editor/EditorHandlerTests.Android.cs
#	src/Core/tests/DeviceTests/Handlers/Editor/EditorHandlerTests.cs
#	src/Core/tests/DeviceTests/Handlers/Editor/EditorHandlerTests.iOS.cs
#	src/Core/tests/DeviceTests/Stubs/EditorStub.cs
Copy link
Member

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

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

Very very nice! Thanks for this PR.

I just got one change, but other than that... Merges will happen!

src/Core/src/Handlers/Editor/EditorHandler.iOS.cs Outdated Show resolved Hide resolved

namespace Microsoft.Maui.Platform.iOS
{
public class MauiTextView : UITextView
Copy link
Member

Choose a reason for hiding this comment

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

Nice.

@mattleibow
Copy link
Member

I notice the placeholder is a bit off center... However, this seems to be an exact copy from Forms so might be a bug there. Not sure if we need to fix that here. But if it is an easy fix then maybe?

image

Maybe @PureWeen knows?

@azure-pipelines

This comment has been minimized.

1 similar comment
@azure-pipelines

This comment has been minimized.

@azure-pipelines

This comment has been minimized.

@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Jul 11, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 22, 2023
@Eilon Eilon removed the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants