Group By not working as expected in Flat View

When I enable Flat View (Flat View > Mixed or Flat View > Mixed (No Folders)) and then select one of the Group By options, the result is not collapsed, even though I use
Set VIEW=Details GROUPCOLLAPSE=on GROUPBY=grouplist
(which works fine when I'm not in Flat view).

When I click None in this Group By list (so the None from GROUPBY=grouplist) and select a grouping again, the groups still don't collapse.

However, when I use the following custom None button to disable the grouping and then select a grouping again, the groups are collapsed.
Set VIEW=Details GROUPCOLLAPSE=on GROUPBY=off

Why is there a difference between the two None options?
Why does group collapse fail in flat view without having to switch to None first?

Also, when I first group and then go to Flat View, the grouping is maintained, but in the Group By menu, None is selected, so I cannot ungroup. My custom None button doesn't work either. I have to select a grouping first before I can select None.

Why is None selected when I enter Flat view?

When I disable grouping in Flat View and then turn Flat View off, grouping is still enabled in the normal detail view, using the original grouping. So it looks like the grouping in the Flat View is disconnected from the one in the normal view. Is this to be expected?

This is what my Flat View button looks like. Maybe some setting in this button is causing the issues I describe.

@toggle:if FLATVIEW=Toggle
@icon:flatviewmixednofolders,FLATVIEW=MixedNoFolders

@ifset:FLATVIEW=MixedNoFolders
Set FLATVIEW=Off
@ifset:else
Set FLATVIEW=On,MixedNoFolders

Doesn't seem to be anything to do with Flat View. That command won't collapse groups in any mode as far as I can tell.

Commands/arguments that generate a list of buttons can't generally be mixed with commands that don't. It's most likely being interpreted as just Set GROUPBY=grouplist and the other arguments are being ignored.

You can sometimes include other commands you want to run in each generated button within a [...] block after the main command that makes all the buttons, but I don't think that has been set up for this command. (Something we can probably add, though.) Although, in this case, you really want a way to run the extra commands before the main one, since Set GROUPCOLLAPSE=on affects what happens the next time things are grouped. (While Go GROUPCOLLAPSE * would work to collapse all current groups, which would work, but they'd be expanded for a moment first.) So we might need to handle this specially anyway, and maybe make Set GROUPCOLLAPSE=on GROUPBY=grouplist work or add a new argument to collapse the change that the same line is about to cause without affecting subsequent changes (which would be better, I think) and make it work when generating a list of buttons.

1 Like

Ah, so it was working most of the time because it was set for the next time. That's why it worked most of the time, but unpredictably.

I restored the group button to GROUPBY=grouplist.
I also made a dedicated button to set GROUPCOLLAPSE=on.
I've used this button to enable collapse in both the Detail view and Flat view.
Now the groups always collapse in both views, so this workaround works for me right now.
A special argument like you described would be the best solution.

There is still one issue though. The one where None is selected when I enter Flat view. Flat view has it's own grouping but since it is using the one from the Detail view in the first place, I expect the correct group to be selected in the menu.
Like I wrote in my previous post, this bug (which I think it is) makes it impossible to turn of grouping.

Edit: Always grouping in Flat View isn't working al the time. It loses the status of GROUPCOLLAPSE=on when I switch from Detail to Flat view. So when I change to a different group the groups are expanded again.

Flat View turning on or off will trigger a folder format change, which is probably all you're seeing. That would reset the group-collapse mode to the one saved in the new format.

Flat View's folder format can be edited or turned off in Preferences.

This does not explain why grouping is set to None while groups are still being displayed. This mismatch is just wrong.
Because grouping is set to None, Always collapse is turned off.

What are the exact steps to see that? Just turn on grouping and then flat view?

Yes, turn on grouping and then flat view.

We have a fix for that coming in the next beta.

(The toolbars/menus were correctly showing that grouping was switched off. The issue was that the Flat View folder format's grouping change wasn't being applied to the file display.)

1 Like