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

4712-Text-Core-package-documentation-and-test #4715

Merged
merged 19 commits into from
Oct 3, 2019
Merged

4712-Text-Core-package-documentation-and-test #4715

merged 19 commits into from
Oct 3, 2019

Conversation

hilaire
Copy link

@hilaire hilaire commented Sep 24, 2019

WIP #4712
On TextStream

On TextStream
@Ducasse
Copy link
Member

Ducasse commented Sep 25, 2019

This is cool!

@MarcusDenker
Copy link
Member

should we merge this already?

Copy link
Member

@jecisc jecisc left a comment

Choose a reason for hiding this comment

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

Cool!

I suggested some changes to have better logs in the CI in case it fails in the future.

hilaire and others added 3 commits September 25, 2019 18:24
Co-Authored-By: CyrilFerlicot <cyril@ferlicot.me>
Co-Authored-By: CyrilFerlicot <cyril@ferlicot.me>
Co-Authored-By: CyrilFerlicot <cyril@ferlicot.me>
@hilaire
Copy link
Author

hilaire commented Sep 25, 2019

@MarcusDenker About merging, I don't know but I have not finished. Is it ok after merge to add commit to this PR or should I open another PR?

@jecisc
Copy link
Member

jecisc commented Sep 25, 2019

You can still add commits on the branch, but you’ll need to open a new PR

On TextColor
@hilaire
Copy link
Author

hilaire commented Sep 26, 2019

@jecisc, I fetched these 3 tiny changes and Iceberg is pulling a full set of changes not related. I specifically asked a pull for these 3 changes. Took too long and I have now unwished changes in my image I will have to pay attention on when commiting.

Btw, I can't create a new PR on the same branch. It is refused. Or do I miss something?

Capture

@hilaire
Copy link
Author

hilaire commented Sep 26, 2019

@jecisc , looks like the commit got it way to the existing PR even if merged. But was it merged after all?

@hilaire
Copy link
Author

hilaire commented Sep 26, 2019

See the comment of TextAttribute. What is still relevant in this comment

Tells a piece of text to be a certain way.

Select text, press Command-6, choose a attribute.  If selected text is of the form 
	Hi There<Smalltalk beep>
the part in angle brackets is saved for action, and the Hi There appears in the paragraph.  If selection has no angle brackets, use the whole thing as both the text and the action.

TextDoIt  --  eval as a Smalltalk expression (the part in angle brackets)

TextLink -- Show a method, class comment, class hierarchy, or class defintion.
	<Point extent:>, <Point Comment>, <Point Hierarchy>, or <Point Defintion> are what you type.

TextURL -- Show the web page. <www.disney.com>

These attributes of text need to be stored on the disk in a regular file-out.  It is done in this form: 	Hi There   
	in the text, and a Run containing   dSmalltalk beep;;
	Click here to see the extent:   
	in the text, and a Run containing   method LPoint extent:;
See RunArray class scanFrom: where decoding is done.

@hilaire
Copy link
Author

hilaire commented Sep 26, 2019

I propose this new comment for TextAttribute. Once I learn enough of TextAttribute I can amend it.

I am an abstract class to represent a text attribute, the way a portion of text is graphically represented.
My sub-classes specify these representations:
- colouring (TextColor), 
- bold, italic, underlined, 
- narrow, strike out (TextEmphasis), 
- alignment (TextAlignment),
- indentation (TextIndent),
- font change (TextFontChange),
- kerning (TextKern),
- url and related action (TextAction hierarchy).

My instances are stored in the Text instance runs variable (a RunArray).

hilaire added 2 commits September 27, 2019 10:19
On TextAlignement, TextAttribute, TextColor
On TextAction
@hilaire
Copy link
Author

hilaire commented Sep 28, 2019

I see the PluggableTextAttribute with no user. Do we need it? Can we deprecate it?

hilaire added 5 commits September 28, 2019 11:29
On TextAction, TextDoIt, TextPrint, TextURL
On TextTest and TextEmphasisTest
On TextEmphasisTest
On TextFontChange, TextFontReference, TextEmphasis, TextIndent
Fix a miss use of TextIndent
hilaire added 2 commits September 30, 2019 20:56
Basic tests for Text
On Text
@MarcusDenker
Copy link
Member

Should this be merged?

I propose to do small PRs that we can merge fast... especially tests and comments

hilaire added 2 commits October 2, 2019 17:38
On TextTest
Reorganize the text test classes.
@hilaire
Copy link
Author

hilaire commented Oct 2, 2019

Yes, you can merge. I will come back to it later then.

@MarcusDenker
Copy link
Member

Two tests are failing:

testNoUnusedTemporaryVariablesLeft
the following methods have unused temporary variables and should be cleaned: an OrderedCollection(TextEmphasisTest>>#testDominates)

SystemDependenciesTest>>testExternalMorphicDependencies
Given Collections do not match! additions : #(#'WebBrowser-Core') missing: #()

Remove unused local variable.
@hilaire
Copy link
Author

hilaire commented Oct 3, 2019

Fix the first failing test. The second fail, AFAIK, has nothing to do with my commits in this pull.

@Ducasse
Copy link
Member

Ducasse commented Oct 3, 2019

Hilaire I do not get why when I look at the files changed I have
HashAndEqualsTestCase >> testEquality [
"Check that TextFontChanges report equality correctly"
"Check TextAttribute subclasses with equality message report it correctly"

????

@Ducasse
Copy link
Member

Ducasse commented Oct 3, 2019

also SycAbstractAllInstVarAccessorsCommand class

A more meaningful comment.
@hilaire
Copy link
Author

hilaire commented Oct 3, 2019

Ah this is unwished comits. Can you delete these changes?

@Ducasse
Copy link
Member

Ducasse commented Oct 3, 2019

No we cannot (for now and the soon future) cherry pick on merge.

Removed unwished changes
@hilaire
Copy link
Author

hilaire commented Oct 3, 2019

Fix it.
Is there any left unwished changes?

@Ducasse
Copy link
Member

Ducasse commented Oct 3, 2019

Thanks Hilaire.
Let's me check.

@Ducasse
Copy link
Member

Ducasse commented Oct 3, 2019

Did you remove this change

@@ -21,7 +21,7 @@ HashAndEqualsTestCase >> setUp [

{ #category : #tests }
HashAndEqualsTestCase >> testEquality [
"Check TextAttribute subclasses with equality message report it correctly"
"Check that TextAttribute subclasses report equality correctly"
prototypes
do: [:p | self
should: [(EqualityTester with: p) result]]

because it looks still there.

@hilaire
Copy link
Author

hilaire commented Oct 3, 2019

That's correct, I updated the comment.

@Ducasse
Copy link
Member

Ducasse commented Oct 3, 2019

Ok

@Ducasse Ducasse merged commit 9d7c50b into pharo-project:Pharo8.0 Oct 3, 2019
@MarcusDenker
Copy link
Member

nevertheless, now in the build we have two tests failing that did not fail before:

#4818
#4819

I checked and for the SystemDependencies, it is indeed this PR that makes them faill

@@ -1,66 +0,0 @@
"
I command to launch the Abstract refactorings: create accessors and abstract the direct instance variable uses into accessors.
Copy link
Member

Choose a reason for hiding this comment

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

Was this class removal wanted?

Copy link
Author

Choose a reason for hiding this comment

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

I don't understand this change. At some point, Iceberg did some unwished changes to my working image. I tried to revert it. Was it a left over, I can't tell for sure.

@tesonep
Copy link
Collaborator

tesonep commented Oct 4, 2019

We have to remove the dependency of WebBrowser from Text, it does not have any sense there.
It should be handled by the block in the text element.
If not, we will revert the whole PR

@Ducasse
Copy link
Member

Ducasse commented Oct 4, 2019

Yes this is strange since I did not see the dependencies when I checked the tests.
@cyril probably hilaire wanted to remove a change from within his PR and it was converted to a removal.
I should say that I do not really know how to use iceberg for cherry picking.

@Ducasse
Copy link
Member

Ducasse commented Oct 4, 2019

Pablo technically can hilaire still do it in his PR or should we create a new issue to fix it.

@hilaire
Copy link
Author

hilaire commented Oct 4, 2019

TextUrl attribute needs to know about WebBrowser to open an URL, so there is sense.
Will adding a "Smalltalk tools webBrowser" solve the dependency?

@hilaire
Copy link
Author

hilaire commented Oct 10, 2019

@tesonep, what about my previous question?

TextUrl attribute needs to know about WebBrowser to open an URL, so there is sense.
Will adding a "Smalltalk tools webBrowser" solve the dependency?

If so I can open an issue.

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.

5 participants