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

[NUI] Public APIs Copy, Cut, Paste and SelectText #1736

Merged
merged 1 commit into from
Dec 26, 2022

Conversation

shrouqsabah
Copy link
Contributor

Change Description

Public APIs Copy, Cut, Paste and SelectedText in TextField or TextEditor

According to ACR request.
We need to explain how to use public APIs Copy, Cut, Paste and SelectedText in TextField or TextEditor.

Added at the end of docs in "docs/application/dotnet/guides/user-interface/nui/text.md" a header.
The header is "Use public APIs Copy, Cut, Paste and SelectedText in TextField or TextEditor"
Explained APIs and added sequence of steps how to use them together.

For instance,

API Changes

For instance,

  • ACR: ACR-455

@TizenDocsBot
Copy link
Collaborator

checkout the webpage https://docs1.stg.tizen.org/staging/1736/

@TizenDocsBot
Copy link
Collaborator

Check Broken Link: Not found any broken link

@TizenDocsBot
Copy link
Collaborator

✔️ [Keywords] Candidate keywords ordered by rank:

  • text
  • property
  • value
  • color
  • character
  • example
  • TextField
  • style
  • attribute
  • font
  • line
  • label
  • default
  • TextLabel
  • class
  • control
  • input
  • String
  • parameter
  • size
  • Float
  • PropertyMap
  • json
  • TextEditor
  • StyleManager
  • encoding

Copy link
Collaborator

@omar-srbd omar-srbd left a comment

Choose a reason for hiding this comment

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

Hello @shrouqsabah, I hope you are doing well.
I have checked the parts from your commit and left some correction suggestions.
Please incorporate them at your earliest convenience.
Thank you.

@TizenDocsBot
Copy link
Collaborator

checkout the webpage https://docs1.stg.tizen.org/staging/1736/

@TizenDocsBot
Copy link
Collaborator

Check Broken Link: Not found any broken link

@TizenDocsBot
Copy link
Collaborator

✔️ [Keywords] Candidate keywords ordered by rank:

  • text
  • property
  • value
  • color
  • character
  • example
  • TextField
  • style
  • attribute
  • font
  • line
  • label
  • control
  • default
  • TextLabel
  • class
  • input
  • String
  • size
  • Float
  • PropertyMap
  • pixel
  • json
  • TextEditor
  • StyleManager
  • encoding

Copy link
Collaborator

@omar-srbd omar-srbd left a comment

Choose a reason for hiding this comment

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

Hello @shrouqsabah, thanks for your most recent commit implementing the changes.
After another check of the file I have found a few more issues that need to be addressed, please incorporate the changes at your earliest convenience.
Thanks.

@TizenDocsBot
Copy link
Collaborator

checkout the webpage https://docs1.stg.tizen.org/staging/1736/

@TizenDocsBot
Copy link
Collaborator

Check Broken Link: Not found any broken link

@TizenDocsBot
Copy link
Collaborator

✔️ [Keywords] Candidate keywords ordered by rank:

  • text
  • property
  • value
  • color
  • character
  • example
  • style
  • attribute
  • TextField
  • font
  • line
  • label
  • control
  • default
  • TextLabel
  • class
  • input
  • String
  • size
  • Float
  • PropertyMap
  • pixel
  • json
  • TextEditor
  • StyleManager
  • encoding

Copy link
Collaborator

@omar-srbd omar-srbd left a comment

Choose a reason for hiding this comment

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

@shrouqsabah, thanks for incorporating all the changes as per the suggestion.

@asm-foysal @mijin85cho, I am approving this PR for merging.

@asm-foysal
Copy link
Collaborator

@omar-srbd is the heading count right? This file looks like it should be a second heading (at the same level as TextField and TextEditor) since it's reflecting data for both those sections... Also, the heading name seems too big, could we shorten it somehow?
@mijin85cho what do you think?

@mijin85cho
Copy link
Contributor

mijin85cho commented Dec 9, 2022

@omar-srbd is the heading count right? This file looks like it should be a second heading (at the same level as TextField and TextEditor) since it's reflecting data for both those sections... Also, the heading name seems too big, could we shorten it somehow? @mijin85cho what do you think?

I agree to your comments.

  1. According to the context, this new paragraph would be much better to use 2nd heading.
  2. The title would be better to shorten if possible. Concise title is recommended.

@@ -756,6 +756,105 @@ The following table lists the available `TextEditor` properties:
| `TranslatableText` | String | Specifies the `TranslatableText` property that sets the SID value. |


### Use public APIs to copy, cut, paste, and select text in TextField or TextEditor
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hello @shrouqsabah, I had a query regarding the heading.
The heading here seems to be a bit too long, we recommend using something concise for headings.

In this case, could you please clarify if the heading should emphasize the functionality of Copy, cut, paste, and select text or the usage of public APIs? Depending on your clarification I can provide an alternate for the heading or it would be better if you could change the heading to something concise.

Thank you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hello @omar-srbd ,
We need to explain how to use APIs.
Here's the original request from ACR.
TCSACR-455 : Please add how to use new APIs. When you update the API guides, it will be good if you add how to use SelectedText API.

Let's me know what you suggest :)
Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@omar-srbd What do you think about this ( How to use Clipboard APIs with Select Text )?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@shrouqsabah,

I have left another review incorporating your suggestion for the heading.
Please look into it and update accordingly.

Thanks.

Copy link
Collaborator

@omar-srbd omar-srbd left a comment

Choose a reason for hiding this comment

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

Hello @shrouqsabah,

Please update the heading accordingly.

Thanks you.

@@ -756,6 +756,105 @@ The following table lists the available `TextEditor` properties:
| `TranslatableText` | String | Specifies the `TranslatableText` property that sets the SID value. |


### Use public APIs to copy, cut, paste, and select text in TextField or TextEditor
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
### Use public APIs to copy, cut, paste, and select text in TextField or TextEditor
## How to use clipboard APIs with select text

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@TizenDocsBot
Copy link
Collaborator

checkout the webpage https://docs1.stg.tizen.org/staging/1736/

@TizenDocsBot
Copy link
Collaborator

Check Broken Link: Not found any broken link

Copy link
Collaborator

@omar-srbd omar-srbd left a comment

Choose a reason for hiding this comment

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

@shrouqsabah, after another review I found a few more issues that need to be addressed and left correction suggestions for them.
Please incorporate them at your convenience.


```csharp
// Step 04: Select text from source text filed
textFieldSrc.SelectText (0,8); // "Welcome!" is the selected text
Copy link
Collaborator

Choose a reason for hiding this comment

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

I have a doubt regarding the selected text based on the declared indexes (0,8).
According to your declared indexes, the selected text should not include a space after the exclamation mark (!).
Can you please check this?

Suggested change
textFieldSrc.SelectText (0,8); // "Welcome!" is the selected text
textFieldSrc.SelectText (0,7); // "Welcome!" is the selected text

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checked.
I added the below note for description of SelectText. And fixed the first example:
`

Note

The selected text includes the start index.
But, the selected text does not include the end index.

textFieldSrc.SelectText (9,16); //"This is" is the selected text
`

@TizenDocsBot
Copy link
Collaborator

checkout the webpage https://docs1.stg.tizen.org/staging/1736/

@TizenDocsBot
Copy link
Collaborator

Check Broken Link: Not found any broken link

Copy link
Collaborator

@omar-srbd omar-srbd left a comment

Choose a reason for hiding this comment

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

@shrouqsabah, after a review of your last commit, I found one issue that needs to be addressed.
Please check the suggestion and incorporate the change accordingly.
Thanks.

Comment on lines 781 to 782
> The selected text includes the start index.
> But, the selected text does not include the end index.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
> The selected text includes the start index.
> But, the selected text does not include the end index.
> The selected text includes the start index, but it does not include the end index.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@omar-srbd ,
Done. Thank you,

@TizenDocsBot
Copy link
Collaborator

checkout the webpage https://docs1.stg.tizen.org/staging/1736/

@TizenDocsBot
Copy link
Collaborator

Check Broken Link: Not found any broken link

Copy link
Collaborator

@omar-srbd omar-srbd left a comment

Choose a reason for hiding this comment

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

@shrouqsabah, thanks for incorporating all the suggested changes.

@mijin85cho @asm-foysal I am approving this PR for merging.

@@ -756,6 +756,108 @@ The following table lists the available `TextEditor` properties:
| `TranslatableText` | String | Specifies the `TranslatableText` property that sets the SID value. |


## How to use clipboard APIs with select text
Copy link
Collaborator

Choose a reason for hiding this comment

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

@shrouqsabah Hello. Hope you are well!

After checking before merging, I have a query regarding this PR.

In the heading, you have mentioned SelectedText, but in your changes here, you have written SelectText API. From what I have observed, SelectText is the appropriate name, as mentioned here. Can you please confirm if it should be SelectedText API or SelectText API?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@safir-srbd , Hello, I hope you well too.
Yes, you are right. It should be SelectText.
I will update title.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@shrouqsabah Thank you for your response!

In that case, I have a heading suggestion for this section which would be more aligned with the rest of the titles in this document.
What do you think of "Use clipboard and SelectText APIs" as the heading?
If it seems ok, please update it and we can merge this PR.

@shrouqsabah shrouqsabah changed the title [NUI] Public APIs Copy, Cut, Paste and SelectedText [NUI] Public APIs Copy, Cut, Paste and SelectText Dec 20, 2022
@TizenDocsBot
Copy link
Collaborator

checkout the webpage https://docs1.stg.tizen.org/staging/1736/

@TizenDocsBot
Copy link
Collaborator

Check Broken Link: Not found any broken link

@TizenDocsBot
Copy link
Collaborator

checkout the webpage https://docs1.stg.tizen.org/staging/1736/

@TizenDocsBot
Copy link
Collaborator

Check Broken Link: Not found any broken link

Copy link
Collaborator

@safir-srbd safir-srbd left a comment

Choose a reason for hiding this comment

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

@shrouqsabah Thank you for making the suggested change. All my comments have been addressed.

I am approving this PR for merging.

@asm-foysal asm-foysal merged commit 95b54d0 into Samsung:master Dec 26, 2022
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.

6 participants