Page MenuHome

File Browser GUI Redesign
ClosedPublic

Authored by Julian Eisel (Severin) on Aug 27 2019, 12:33 AM.

Details

Summary

File Browser GUI Redesign

NOTE: To see the updates to export and import operator settings, checkout the filebrowser_redesign Add-ons branch.

General Changes

  • The file browser now opens as temporary floating window. It closes on {shortcut Esc}. The header is hidden then
  • When the file browser is opened as regular editor, the header remains visible.

Keymap:

Keymap is now consistent with other list-based views in Blender, such as the Outliner:

  • Left click to select, double-click to open
  • Right-click context menus
  • Shift-click to fill selection
  • Ctrl-click to extend selection

Operator options

These previously overlapped with the source list, which caused numerous issues with resizing and presenting many settings in a small panel area. It was also generally inconsistent with Blender.

  • Moved to new sidebar, which can easily be shown or hidden using the Options toggle
  • IO operators have new layouts to match this new sidebar, using real panels, in a separate filebrowser_redesign branch of the Addons git repo.

General Layout

The layout has been changed to be simpler, more standard, and fits better in with Blender 2.8:

  • More standard layout (file path at top, file name at the bottom, execute/cancel buttons in bottom right)
  • Use of popovers to group controls, and allow for more descriptive naming
  • Search box is always live now, just like Outliner

Views

  • Details columns are now toggleable for all table views, they are not hardcoded display type.
  • File sizes now show as B, KB, MB, ... rather than B, KiB, MiB, … They are now also calculated using base 10 of course.
Vertical List View:
  • This view now used a much simpler single vertical list with columns for information.
  • Users can click on the headers of these columns to other by that category, and click again to reverse the ordering.
  • Date Modified column combines both date and time, also uses user friendly strings for recent dates (Yesterday, Today).
Icon View
  • Updated icons by Jendrzych, with better centering

Icons

  • Files and folders have new icons in Icon view
  • Both files and folders have reworked superimposed icons that show users the file/folder type
  • 3D file documents correctly use the 3d file icon, which was unused previously

Screenshots


The Browser used with Open


Display popover


Filter popover


File icons


Folder icons


Example of the new operator settings sidebar


Combined effort by @William Reynish (billreynish), @Harley Acheson (harley), @Andrzej Ambroz (jendrzych), my university colleague Brian Meisenheimer and myself.

Diff Detail

Repository
rB Blender
Branch
filebrowser_redesign
Build Status
Buildable 4606
Build 4606: arc lint + arc unit

Event Timeline

Julian Eisel (Severin) retitled this revision from # File Browser GUI Redesign to File Browser GUI Redesign.Aug 27 2019, 12:34 AM
Julian Eisel (Severin) edited the summary of this revision. (Show Details)

Submitted wrong patch state.

William Reynish (billreynish) edited the summary of this revision. (Show Details)
Bastien Montagne (mont29) requested changes to this revision.Aug 27 2019, 11:28 AM

All in all, this looks like a very nice update of the filebrowser to me.

I did not really check all the detailed UI code changes, don't think there is much general design issues (code-wise) here anyway.

My main concern is the handling of the new invert sorting flag, this has to be changed a bit (see comment for details). And as usual looks like UI translations have been forgotten... :'(

PS: there is probably something missing in OBJ changes:

rna_uiItemR: property not found: EXPORT_SCENE_OT_obj.use_mesh_modifiers_render
/home/guest/blender/__work__/build_master_debug/bin/2.81/scripts/addons/io_scene_obj/__init__.py:314
source/blender/blenlib/intern/BLI_filelist.c
374–378

Those needs to be translated

source/blender/editors/space_file/filelist.c
575–588

I don't think this is going to work well with the asset engines. Sorting/filtering callback should handle 100% of the work imho, otherwise you may get some rather weird effects.

As a remainder, asset engine and changes it involved in filebrowser code are designed to only generate a small portion of the full listing, since some asset repos might potentially have thousands of items to list. In that case, that this simple approach will fail completely (as it would just reverse the order of the ten first items e.g., instead of showing the ten last...).

So please let the callbacks do their job. :)

2150

isn't gltf missing a dot here?

source/blender/editors/space_file/filesel.c
646–652

Strings should be tagged for translation

source/blender/editors/space_file/space_file.c
568–611

Those kind of ifdef'd blocks should be cleaned up I think?

source/blender/makesdna/DNA_screen_types.h
530–534

Please at least change this to use proper bitshift operator (and even better if possible, make this an enum).

source/blender/makesdna/DNA_space_types.h
682–683

Comment should be below pad...

source/blender/makesrna/intern/rna_ui.c
1297–1298

No final points in UI messages...

This revision now requires changes to proceed.Aug 27 2019, 11:28 AM

Does this break Python API compatibility for add-ons? Or will existing importers/exporters keeping working, just without taking advantage of multiple panel layout?

Campbell Barton (campbellbarton) requested changes to this revision.Aug 27 2019, 12:36 PM

Directory-only selection isn't working as before.

File -> External Data -> Find Missing Files has a filename field.

@Brecht Van Lommel (brecht) existing IO addons keep working as-is with no modification.

But to take better advantage of the sidebar we can update their UI separately.

if I have to make an observation .. I find it uncomfortable for these 3 buttons to be hidden

Julian Eisel (Severin) marked 7 inline comments as done.
  • General minor cleanup
  • Fix missing dot for .gltf file recognition
  • Fix strings not translated
  • Disable the file name button for directory-only browsing
  • Open "Volumes" panel by default
source/blender/blenlib/intern/BLI_filelist.c
374

You also need to tag the strings for i18n message extraction tool (N_() macro). Same with other strings of course.

source/blender/editors/space_file/filesel.c
646–652

I don’t think using IFACE_() is valid here, thinkyou only want to tag the strings for message extraction (N_()), and do the translation when you are actually displaying them. Otherwise if user changes its language after this is called, it won't be updated.

Thanks all for checking immediately. We're really hoping to get this in ASAP, I'll try to be quick with updates from my side.

@Bastien Montagne (mont29) Addressed all mentioned issues except of the one on inverted sorting, will do that next.

@Brecht Van Lommel (brecht) Like William said, they keep working. Although I should add, there is a small unrelated change to the API, that is the reorganization of the display types (LIST_SHORT, LIST_LONG -> LIST_VERTICAL, LIST_HORIZONTAL). We grepped over existing scripts and found no usage of the old identifiers. We can keep the old names for compatibility, but I'll leave that decision up to you.

@noki paike (amonpaike) design feedback should go into the design task, T62971.

@Campbell Barton (campbellbarton) indeed. Addressed this by disabling the file name button now. Think that is better than hiding it entirely, the empty space looks a bit odd then.

Brecht Van Lommel (brecht) requested changes to this revision.Aug 27 2019, 3:11 PM

Some issues from a quick test of the patch:

  • Create new directory should not have a confirmation menu.
  • The file browser window should open in the center of the parent window, not the top left (happens for me on Linux with factory settings).
  • Ideally this should also be a blocking modal child window, but that's probably out of scope.
  • Is there going to be a preference to open the file browser fullscreen as before?
This revision now requires changes to proceed.Aug 27 2019, 3:11 PM

@Brecht Van Lommel (brecht) Like William said, they keep working. Although I should add, there is a small unrelated change to the API, that is the reorganization of the display types (LIST_SHORT, LIST_LONG -> LIST_VERTICAL, LIST_HORIZONTAL). We grepped over existing scripts and found no usage of the old identifiers. We can keep the old names for compatibility, but I'll leave that decision up to you.

Breaking compatibility there is fine.

Julian Eisel (Severin) updated this revision to Diff 17585.EditedAug 27 2019, 4:35 PM
Julian Eisel (Severin) marked 2 inline comments as done.
  • Correct string translation logic

    Refactored BLI_filelist_entry_datetime_to_string() for this, so we create the UI strings outside of BLI.
  • Remove confirmation popup for creating new directory
  • Cleanup: Remove outdated TODO comments
  • Open file browser window in center of parent window

@Brecht Van Lommel (brecht) addressed the first two points. Re blocking window - we wanted to avoid making this a blocking window. We don't do that for other temp windows either. OTOH, there's a technical issue: The file browser OP settings (and related buttons) disappear when performing undo in any other window. Not a big issue though, in master that happens too with multi-window setups.
We were planning to add a preference to select the opening mode for all temp windows. I'm not too sure about this though (you may want to open the file browser and render window in fullscreen, but not the preferences), but I see that as a separate issue outside the scope of this patch.

Small icons were updated as well, but screenies show old pictograms. I wonder if redesigned 16x16 Folder icon works well.

@Andrzej Ambroz (jendrzych) - I wonder if redesigned 16x16 Folder icon works well.

I wonder too. It is on my list of things to check later. The older 16x16 folder icon sits just one pixel too low in its space to line up perfectly among the other icons. I wasn't going to mention that until seeing the new one in place.

@Andrzej Ambroz (jendrzych) we didn't include your new regular icon updates here, but indeed they would fit well and make things more consistent. We could simply update the icon set separately after this is merged.

I'm just afraid that the small Folder icon will not be clear enough and will blend with the rest of small pictograms. I will be grateful for the screenshot that will help determine if everything's OK and what changes should be made to the design in case it's not OK.

I'm just afraid that the small Folder icon will not be clear enough and will blend with the rest of small pictograms. I will be grateful for the screenshot that will help determine if everything's OK and what changes should be made to the design in case it's not OK.

To my eye the new version is going going to look awesome and line up perfectly.

If anything I would consider adding the same low-opacity filled center to the small one as is on the larger one. I think it is a 20% white on the inside of the large version. We might later add an option to theme color the folder and file icons so the difference would be more apparent without the middle.

Julian Eisel (Severin) updated this revision to Diff 17602.EditedAug 28 2019, 1:45 AM
Julian Eisel (Severin) marked an inline comment as done.
  • Refactor inverted sorting to be applyied in sort callbacks already
  • Cleanup: Rename column types to be less ambiguous

Should now be ready for further reviews.

You are properly aware of this, but the order of Okay and Cancel is in the Mac order, so for Windows users their muscle-memory will let them click Cancel when they want to Okay:

Brecht Van Lommel (brecht) requested changes to this revision.Aug 29 2019, 4:52 PM

Did a more careful review now, just a few smaller issues. This seems very close to being mergeable.

UI suggestions:

  • T-key works, but N-key does not. Would make sense to support that if there is no key conflict.
  • The "Hide Options" buttons is strangely placed on the other end of the window. An alternative would be an icon button in the top right, right above where the settings will then appear (maybe same icon as presets in panel headers).

@Brecht Van Lommel (brecht) addressed the first two points. Re blocking window - we wanted to avoid making this a blocking window. We don't do that for other temp windows either. OTOH, there's a technical issue: The file browser OP settings (and related buttons) disappear when performing undo in any other window. Not a big issue though, in master that happens too with multi-window setups.

Other temp windows have different use cases, for this it should be blocking. I don't think the patch has to wait for that to be committed, but I would like see this fixed for the 2.81 release.

We were planning to add a preference to select the opening mode for all temp windows. I'm not too sure about this though (you may want to open the file browser and render window in fullscreen, but not the preferences), but I see that as a separate issue outside the scope of this patch.

There should not be a global settings for all temp windows, each one has a different use case.

My main concern here is users that preferred the previous system, where you could more easily browser a large amount of files (even if it was non-standard). We can wait to see what the user feedback is, but if there is a significant number that still want the file browser to open bigger, we should add an option.

For me personally, I prefer it to be bigger (like 1200 x 800 or just fullscreen). But I'm probably the exception, and find file browser dialogs to be too small in other applications too.

source/blender/editors/space_file/space_file.c
700

What is the reason for this? I don't see much immediate use for categories, but it's not obvious to me why they would need to be explicitly disabled.

There should at least be a comment explaining the reason.

source/blender/makesrna/intern/rna_ui.c
1293–1298

We currently handle this registering panels to the header for popover from the header. Let's not add a secondary mechanism used only by the file browser.

If we want to change this we can do it everywhere.

This revision now requires changes to proceed.Aug 29 2019, 4:52 PM

Did a more careful review now, just a few smaller issues. This seems very close to being mergeable.

UI suggestions:

  • T-key works, but N-key does not. Would make sense to support that if there is no key conflict.

Yep, we can add this - no issue.

  • The "Hide Options" buttons is strangely placed on the other end of the window. An alternative would be an icon button in the top right, right above where the settings will then appear (maybe same icon as presets in panel headers).

We did play around with this, and did try what you suggest, and we had the same thought too. But, moving it there has other drawbacks:

  • Less space for file path
  • You lose the connection to the file at the bottom
  • in some OS's, you'll see an Options button in lower left

So, we could do it but we already discarded this idea for the above reasons.

There should not be a global settings for all temp windows, each one has a different use case.

I wanted it to be a single preference, mainly to avoid adding too many, but I do realize that that's problematic becasuse the render window has special preference options just for it anyway. So, the simplest/easiest solution is to do what you suggest, to add separate preferences per temp window.

  • The "Hide Options" buttons is strangely placed on the other end of the window. An alternative would be an icon button in the top right, right above where the settings will then appear (maybe same icon as presets in panel headers).

We did play around with this, and did try what you suggest, and we had the same thought too. But, moving it there has other drawbacks:

  • Less space for file path
  • You lose the connection to the file at the bottom
  • in some OS's, you'll see an Options button in lower left

So, we could do it but we already discarded this idea for the above reasons.

Agreed the way it is now isn't too great, but I think it's acceptable. IMHO the main point for it is that it's hard to miss with the big button in the lower left. Just another icon button in the upper bar wouldn't be very visible OTOH.

source/blender/editors/space_file/space_file.c
700

This is using the UI region, which expects bl_category to be set. If not, it prints a warning to the console, if it is set, the tabs are drawn. I think a region-type flag to explicitly disable categories where they don't make sense is reasonable.
But yes, will add a comment (if you don't disagree about the approach).

source/blender/makesrna/intern/rna_ui.c
1293–1298

We could just use region type HEADER for the popover panels, but that does seem a bit odd. Alternatives:

  • Make bl_region_type optional
  • Allow bl_region_type = 'NONE'

(If we decided to keep this flag, I'd consider renaming it to REGISTER_ONLY though).

Ok, we can keep the options button in the same place.

source/blender/editors/space_file/space_file.c
700

I think category tabs only appear when there are active panels for multiple categories?

At least in the video sequencer it seems to be work this way. Without a strip it shows no tabs, and once you add a strip they appear.

source/blender/makesrna/intern/rna_ui.c
1293–1298

Please use HEADER like other popovers for now. If we want to change the convention here, let's do it in a separate code review.

I don't particularly like the use of HEADER, but to me it's also not that crazy with the panel popover being available from the header.

Maybe this is for after a merge, but here's the Preferences with separate options for the temp windows:

To make this consistent, we should also move the render window setting into preferences, which makes much more sense anyway.

  • Don't clear file name on directory selection
  • Keymap: 'N' to toggle right side options region
  • Remove 'HIDDEN' panel flag, use existing convention
  • Remove flag to disable categories per region-type
Julian Eisel (Severin) marked 2 inline comments as done.Sep 1 2019, 2:15 PM
Julian Eisel (Severin) added inline comments.
source/blender/editors/space_file/space_file.c
700

Yes but I didn't want to add a dummy bl_category to multiple rather unrelated panels and like said the explicitly disabling categories here seemed reasonable.
Anyway, we now only register one panel to the UI region, so it's not worth the extra flag. Removed.

Julian Eisel (Severin) marked an inline comment as done.
  • Fix context menu handling when clicking on file icons & thumbnails (rB2356f60c62)
  • Fix empty tool settings region with old files
  • Gray out number increment/decrement button for file open operations

Looks good to me now.

This revision was not accepted when it landed; it landed in state Needs Review.Sep 3 2019, 4:11 PM
This revision was automatically updated to reflect the committed changes.

Pushed to master.
Thanks for the feedback and reviews!