Re: The Trunk: Help-Squeak-Project-ct.115.mcz
"Marcel Taeumel (H) via Squeak-dev" <[email protected]> Sun, 2 Aug 2026 10:32:07 +0200
| Newsgroups | gmane.comp.lang.smalltalk.squeak.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Christoph, hi all -- I think that the case of re-use (or re-composition) of help topics such as this case here with "What is New?" is quite normal and should be expected in a modular and robust system. Any reliance on outside composition structures seems rather surprising and disregarding the "Law of Demeter" (i.e., "only talk to your direct neighours"). While we can still write this kind of code (here: #outlineRoots), we should be extra careful and prefer "simpler" solutions if they seem feasible. In general, we should also be attentive when writing commit messages (or any message to the community) to use non-violent phrasing whenever possible. In this case, a simple omission of the word "unorthodox" would not have done this message any harm. Kind regards, Marcel Am 02.08.2026 um 03:07 schrieb [email protected]: > Christoph Thiede uploaded a new version of Help-Squeak-Project to project The Trunk: > http://source.squeak.org/trunk/Help-Squeak-Project-ct.115.mcz > > ==================== Summary ==================== > > Name: Help-Squeak-Project-ct.115 > Author: ct > Time: 2 August 2026, 3:07:08.816874 am > UUID: 36b81c10-c8c3-43e4-ae42-a25885794d0e > Ancestors: Help-Squeak-Project-mt.114 > > Fixes release notes outline viewer for the unorthodox composition of the release notes under the "What is New?" page in the welcome contents. Also fixes a stupid slip in a #detect:ifNone:. > > This was urgent. :-) > > =============== Diff against Help-Squeak-Project-mt.114 =============== > > Item was changed: > ----- Method: SqueakHelpOutlineTool>>outlineRoots (in category 'accessing') ----- > outlineRoots > > | parentTopic topic | > outlineRoots ifNotNil: [^ outlineRoots]. > > parentTopic := self helpBrowser currentParentTopic. > topic := self helpBrowser currentTopic. > (parentTopic isNil or: [topic isNil]) ifTrue: [^ outlineRoots := #()]. > + (parentTopic respondsTo: #outlineRootsFor:in:) ifFalse: > + ["See ReleaseBuilder class>>#openWelcomeWorkspacesWith:" > + topic title asString asLowercase = 'What is New?' asLowercase ifTrue: > + [parentTopic := SqueakReleaseNotes]]. > (parentTopic respondsTo: #outlineRootsFor:in:) ifFalse: [^ outlineRoots := #()]. > ^ outlineRoots := parentTopic > outlineRootsFor: topic > in: self editedTopicContents! > > Item was changed: > ----- Method: SqueakReleaseNotes class>>findHelpBrowser (in category 'examples - support') ----- > findHelpBrowser > > + | windows | > + windows := (SystemWindow windowsIn: Project current world) > + select: [:ea | ea model isKindOf: HelpBrowser]. > + windows > - ^ ((SystemWindow windowsIn: Project current world) > - select: [:ea | ea model isKindOf: HelpBrowser]) > detect: [:ea | > ea model currentParentTopic isClassBasedHelpTopic > and: [ea model currentParentTopic helpClass = SqueakReleaseNotes]] > + ifFound: [:ea | ^ ea]. > + ^ windows > + ifNotEmpty: [windows anyOne] > + ifEmpty: [nil]! > - ifNone: [:ea | (ea ifEmpty: [^ nil]) first]! > > Squeak-dev mailing list -- [email protected] > To unsubscribe send an email to [email protected] Squeak-dev mailing list -- [email protected] To unsubscribe send an email to [email protected]