grass icon indicating copy to clipboard operation
grass copied to clipboard

[Feat] wxGUI/dbmgr: add show/hide column functionality

Open tmszi opened this issue 2 months ago • 2 comments

Is your feature request related to a problem? Please describe.

Sometimes some vector maps tables has many number of columns. For better readability I would like hide some columns and show them again as needed. Back in the days, I saw similar functionality implemented in the proprietary and commercial ESRI ArcGIS ArcView 3.x/ArcMap 9.x version software.

Describe the solution you'd like

  1. Global enabling/disabling this functionality via preference dialog (Enable hide/show column)
  2. Append menu item (Hide column and Show all columns) in the column right click menu
  3. Save hidden columns settings as persistent settings in the global attribute table manager (atm) settings

Example of attribute table manager hidden columns settings (wx.json file), see enableHiddenCols and hiddenCols field:

  "atm": {
    "highlight": {
      "color": "#ffff00ff",
      "width": 2,
      "auto": true
    },
    "leftDbClick": {
      "selection": 1
    },
    "askOnDeleteRec": {
      "enabled": true
    },
    "keycolumn": {
      "value": "cat"
    },
    "encoding": {
      "value": ""
    },
    "enableHiddenCols": {
      "enabled": true
    },
    "hiddenCols": {
      "/tmp/grassdata/nc_basic_spm_grass7/PERMANENT": {
        "railroads@PERMANENT": {
          "railroads": [
            "MINOR1",
            "MAJOR1",
            "RR24_100_",
            "LENGTH",
            "OBJECTID"
          ]
        },
        "firestations@Test": {
          "firestations": [
            "PUMPER_TAN",
            "PUMPERS"
          ]
        },
        "firestations@PERMANENT": {
          "firestations": [
            "CITY",
            "LOCATION",
            "LABEL"
          ]
        }
      }
    }
  },

Additional context

https://github.com/user-attachments/assets/400b83ff-cf94-408a-a81e-163419a9c495

tmszi avatar Nov 06 '25 08:11 tmszi

I find the global setting to enable hiding strange. Maybe it is not need. Maybe it can be in ATM. It is disconnected in the global settings, currently.

wenzeslaus avatar Nov 06 '25 13:11 wenzeslaus

I find the global setting to enable hiding strange. Maybe it is not need. Maybe it can be in ATM. It is disconnected in the global settings, currently.

Global hidden columns setting comes from my practical usage of this feature.

tmszi avatar Nov 09 '25 20:11 tmszi