[squeak-dev] The Inbox: Monticello-ct.729.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Fri Sep 18 13:20:44 UTC 2020


Hi Christoph,

yeah, that warning is not helpful for inbox commits. 

It would be nice to have a version of text-only dialog that uses a pluggable text morph to scroll longer text messages. Maybe with a fixed  width of "60 ex" and height for 5-7 lines.

-1 for this trunction of information, though, because the user has no easy way to look at those 16 version names in that situation.

Best,
Marcel
Am 17.09.2020 19:09:07 schrieb Thiede, Christoph <christoph.thiede at student.hpi.uni-potsdam.de>:
Before:


After:


However, I have follow-up questions:

A. Why do clients need to care about #withNoLineLongerThan:/word-wrapping stuff? Shouldn't this be a responsibility of UserDialogBoxMorph instead?

B. Should we maybe turn off this warning for commits to the MCRepository inbox? In this particular case, our declared workflow says that you should ignore this message anyway, doesn't it?

Best,
Christoph
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von commits at source.squeak.org <commits at source.squeak.org>
Gesendet: Donnerstag, 17. September 2020 19:04:57
An: squeak-dev at lists.squeakfoundation.org
Betreff: [squeak-dev] The Inbox: Monticello-ct.729.mcz
 
A new version of Monticello was added to project The Inbox:
http://source.squeak.org/inbox/Monticello-ct.729.mcz [http://source.squeak.org/inbox/Monticello-ct.729.mcz]

==================== Summary ====================

Name: Monticello-ct.729
Author: ct
Time: 17 September 2020, 7:04:53.385813 pm
UUID: 5eea47cc-405e-7841-9544-0f57a9b92fa0
Ancestors: Monticello-cmm.726

Proposal: Enhance truncation of "newer versions avaiable" warning (and make it multilingual-ready)

=============== Diff against Monticello-cmm.726 ===============

Item was changed:
  ----- Method: MCWorkingCopyBrowser>>checkForNewerVersions (in category 'actions') -----
  checkForNewerVersions
+        "Answer true if there are no newer versions preventing us from saving a version."
+
         | newer |
         newer := workingCopy possiblyNewerVersionsIn: self repository.
+       
+        newer ifEmpty: [^ true].
+       
+        ^ self confirm: ('CAUTION!! {1}:\{2}\Do you really want to save this version?' withCRs translated format: {
+                newer size = 1
+                        ifTrue: ['This version in the repository may be newer' translated]
+                        ifFalse: ['These {1} versions in the repository may be newer' translated format: {newer size}].
+                (newer size > 3
+                        ifFalse: [newer]
+                        ifTrue: [(newer first: 3) , {'...'} , {newer last}]) asCommaString withNoLineLongerThan: 150
+        })!
-        ^ newer isEmpty or: [
-                self confirm: 'CAUTION!! These versions in the repository may be newer:',
-                        String cr, ((newer asCommaString withNoLineLongerThan:  150) truncateWithElipsisTo: 5 * 149), String cr,
-                        'Do you really want to save this version?'].!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200918/b9648652/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 58970 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200918/b9648652/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedImage.png
Type: image/png
Size: 27934 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200918/b9648652/attachment-0003.png>


More information about the Squeak-dev mailing list