Bug 112604 - Set a maximum width for the Calc Sort dialog
Summary: Set a maximum width for the Calc Sort dialog
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
5.3.4.2 release
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard: target:6.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-24 05:31 UTC by andréb
Modified: 2022-11-24 23:22 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
sample file showing bug (8.70 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-10-01 03:17 UTC, andréb
Details
Screenshot (91.73 KB, image/png)
2017-10-01 10:14 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andréb 2017-09-24 05:31:58 UTC
In previous version of Mageia (5) (Linux), with Libo 4.4.7.2 (and before), it was possible to have ascending and descending in the same sort, something which I use frequently.
After updating to the latest version of Mageia (6), which uses Libo 5.3.4.2, the option for ascending or descending is no longer available by field being sorted.
However pre-existing sorts seem to respect the previous functionality.

The problem is not hardware related, so should affect all hardware.
I expect that it would affect all operating systems since it is coded as such in the menus, so I marked it as all.  It definitely does affect Linux (Mageia)
Comment 1 andréb 2017-09-24 05:37:21 UTC
This should be marked as major as it is a serious regression in functionality which (in my case) requires returning to an older version of Libreoffice.
However your configuration refuses to let me mark it appropriately.
Comment 2 m_a_riosv 2017-09-24 22:00:08 UTC
No reproducible on Windows (Menu/Data/Sort).
Version: 5.3.4.1 (x64)
Build ID: 1b1606c6e1203cdc3fd5ffbc16e74ecea300241a
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; Layout Engine: new; 
Locale: es-ES (es_ES); Calc: CL
Version: 6.0.0.0.alpha0+
Build ID: 83288332f7ced698610739419989c464256f1c4d
CPU threads: 4; OS: Windows 6.19; UI render: default; 
Locale: es-ES (es_ES); Calc: CL
Comment 3 andréb 2017-09-28 17:01:34 UTC
Further tests show that libo apparently expands multiline heading fields to one (possibly very long) line, which did not occur with libo 4.4.7.2.
A resulting very long heading field can be long enough to occupy the maximum width in the sort selection window, meaning that the ascending/descending buttons are no longer displayed.
The solution is to reserve a space to the right for the ascending/descending buttons.
A multiline heading probably contains supplementary info ABOVE the main heading text, meaning that if such a heading becomes too long, it is better to omit text above, or to the left of a combined line.

eg.
----
very long
explanation
for a
description
----

could become

----
...explanation for a description
----

(Note that when libo combines lines it puts a space in place of CR)
Comment 4 m_a_riosv 2017-09-28 17:06:32 UTC
Please attach a sample file for test.
Comment 5 andréb 2017-10-01 03:17:08 UTC
Created attachment 136658 [details]
sample file showing bug

This file shows the problem, as reported.

One use case is any table where it is more convenient to put info to be continually displayed in a large heading field to minimize verticle screen space used.
eg. where other headings are already multi-line.
Comment 6 m_a_riosv 2017-10-01 10:14:54 UTC
Created attachment 136665 [details]
Screenshot

How do you expect that calc could know what word(s) in the cell should be the field's title?

First selecting Ascending/Descending works find for me.
Second I't possible to select the field to sort Asc/Des, the whole content of the cell is showed.

You can add a comment to the title's cell having it always showed, or add a line before to add some text about the field.
Comment 7 andréb 2017-10-01 17:13:19 UTC
(In reply to m.a.riosv from comment #6)
> Created attachment 136665 [details]
> Screenshot
> 
> How do you expect that calc could know what word(s) in the cell should be
> the field's title?
See comment 3.
Also note that if the long title is NOT a sort field, this is a moot point.

> 
> First selecting Ascending/Descending works find for me.
> Second I't possible to select the field to sort Asc/Des, the whole content
> of the cell is showed.
But it doesn't work in the sample file.  The ascending/descending buttons are not displayed.

What is needed is a simple maximum length for the sort field selection that always allows the display of the following ascending/descending buttons.
That is a design bug that should be fixed.
(At least I always fix such bugs in my own code.)
Comment 8 Buovjaga 2017-11-02 17:18:46 UTC
Ok, I have a wide screen so there is no problem for me, but I understand the point.

Arch Linux 64-bit, KDE Plasma 5
Version: 6.0.0.0.alpha1+
Build ID: fff7097f1ed8493de099d79aa0613ea6b309100a
CPU threads: 8; OS: Linux 4.13; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on November 2nd 2017
Comment 9 QA Administrators 2018-11-03 03:49:27 UTC Comment hidden (obsolete)
Comment 10 Roman Kuznetsov 2018-11-03 06:56:52 UTC
still repro in

Version: 6.2.0.0.alpha1+ (x64)
Build ID: b439cfda24676c5272e3fe30c0a521975f948274
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2018-10-24_08:08:13
Locale: ru-RU (ru_RU); Calc: threaded
Comment 11 Roman Kuznetsov 2018-11-05 14:38:45 UTC
https://gerrit.libreoffice.org/#/c/62905/
Comment 12 Commit Notification 2018-11-05 21:25:17 UTC
Roman Kuznetsov committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/d3b505c388537cc9a923da74b85aeeab79f3803a%5E%21

tdf#112604 Set a maximum width for the Calc Sort dialog

It will be available in 6.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Roman Kuznetsov 2019-11-27 17:20:06 UTC
my "fix" was absolutely wrong and it just doesn't work as I expected

I should reopen this
Comment 14 QA Administrators 2022-11-24 03:41:50 UTC Comment hidden (obsolete)
Comment 15 andréb 2022-11-24 23:22:28 UTC
The test file works for me now, by displaying the sort options in a popup with ascending/descending reserved in a column to the right.
The popup displays all 4 lines of the test heading of a wide column, with the middle of long lines being replaced by ... character.

To me that is a very satisfactory solution : not only are the sort order options displayed, but a considerable width is now displayed, making it easy to identify the column in question.

Tested with libo 7.3.6.2
(The latest version on the current official release of my distro of Linux)

Thanks for fixing the issue.

Will close as resolved / worksforme.