Page MenuHome

Info Editor: Add ability to filter reports by type
Needs ReviewPublic

Authored by Valentin (Poulpator) on Feb 24 2020, 10:36 PM.

Details

Summary

This patch add the ability to filter report by type, as suggested in T68448

the code was mostly here but commented out, I may have missed something, I don't know.

Here what it's look like:

Diff Detail

Repository
rB Blender

Event Timeline

Valentin (Poulpator) edited the summary of this revision. (Show Details)

Excellent. Thank you.

This revision is now accepted and ready to land.Feb 24 2020, 11:06 PM

Okay, that is pretty sweet!

Can we think of any better way to do the UI filter selecting? The header buttons seem a bit terse.

Ideally it would be nice to have something that connected the icon with the text description ("Warnings", "Errors", etc) since the main list does not include that. So the filter could then act a bit as an index or legend. It would also help a bit in case we ever decide to give more granularity to the filtering. For example we are now using the one icon for all reports of type "Error" but there are actually four subtypes of error. So if we used a menu, popover, or something else then we could filter out just RPT_ERROR_OUT_OF_MEMORY while still showing RPT_ERROR_INVALID_INPUT (if we ever want to do that) while still only ever using the one icon for all of that type of report.

I don't think menus would work for this. Although we can have checkboxes for each type, we can't also have the icons too. An enum list on a popover? Not sure.

But again, this is a nice improvement. It would just be nice to have something that showed both ⚠ and "Warnings" together somehow.

William Reynish (billreynish) retitled this revision from UI: Filter reports by type to Info Editor: Add ability to filter reports by type.Mar 1 2020, 9:20 PM
Campbell Barton (campbellbarton) requested changes to this revision.Mar 2 2020, 1:23 AM
Campbell Barton (campbellbarton) added inline comments.
source/blender/editors/space_info/space_info.c
64

This will need versioning any time a new report type is added, prefer to rename this to report_mask_exclude then a default value of 0 will show all reports.

The RNA can remain the same, just change RNA_def_property_boolean_sdna to RNA_def_property_boolean_negative_sdna.

source/blender/makesdna/DNA_space_types.h
128

If the flag is inverted, this is no longer needed.

This revision now requires changes to proceed.Mar 2 2020, 1:23 AM
  • Adressed comment: rename rpt_mask to report_mask_exclude (and inverted flag) to avoid versioning issues

@Harley Acheson (harley)

Can we think of any better way to do the UI filter selecting? The header buttons seem a bit terse.

Popover would work nicely here, for example in the image included above.
Subtype could be added later with indentation to differentiate them from main types.

the popover is not implement in this diff but can be found in P1320

It would just be nice to have something that showed both ⚠ and "Warnings" together somehow.

Currently user can at least know the name of the filter type with the tooltip, but I agree it's not ideal.

  • Fixed conflits with current master
  • UI: change buttons style

Personally I would go for this style:

I would like to make following changes (which are already made on branch) soc-2020-info-editor, but it is time consuming to separate them:

  • add remaining errors to filter:

  • use enum instead of bool: presented UI makes for inconsistent selection pattern with similar buttons. in enum you need to hold shift to select multiple.